summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Thompson <daniel.thompson@linaro.org>2017-04-27 09:33:31 +0100
committerAnas Nashif <nashif@linux.intel.com>2017-04-27 13:01:08 +0000
commit955ba7302416b2a51f9b8fde71dccf4fbb1bac12 (patch)
treed2c11a9e565ada4a3b469977a82334d4a0ecf5ee
parentb3311edff62fb9470df0e1cfec15840f272bff09 (diff)
scripts: openocd.sh: Honour V=1
Currently running "make V=1 flash/debug" does not result in the caller discovering what commands are run to perform the action because make calls into an opaque script (which then makes complex invokations of both openocd and gdb). Make the script more transparent by conditionally enabling enabling tracing within the script. We also remove the "Done flashing" message. It is pointless because openocd has already *told* us it has done flashing ["wrote 16384 bytes from file .../zephyr.elf in 0.802135s (19.947 KiB/s)"]. It is also potentially misleading since it tells us we are "Done flashing" even when we failed to flash anything which risks misleading someone unfamiliar with openocd. Change-Id: Icaea28c4b00ac10965726dd4502162b7de080953 Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
-rwxr-xr-xscripts/support/openocd.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/support/openocd.sh b/scripts/support/openocd.sh
index 55f0b0319..d2824fcf5 100755
--- a/scripts/support/openocd.sh
+++ b/scripts/support/openocd.sh
@@ -43,7 +43,6 @@ do_flash() {
${OPENOCD_POST_CMD:+-c $OPENOCD_POST_CMD} \
-c 'reset run' \
-c 'shutdown'"
- echo 'Done flashing'
}
@@ -91,6 +90,11 @@ do_debugserver() {
CMD="$1"
shift
+if [ "$KBUILD_VERBOSE" -eq 1 ]
+then
+ set -x
+fi
+
case "${CMD}" in
flash)
echo "Flashing Target Device"