summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPooya Moradi <pvonmoradi@gmail.com>2020-12-04 16:01:19 +0330
committerDamien George <damien@micropython.org>2021-11-17 14:32:02 +1100
commit95ccd9a005c09c58d7a74af97e990c798cb5c4f7 (patch)
tree79a8982d34258f344f6dae7c33dc364db9954b6c
parent19f09414a624914b29188b23f9d0da7d4b04e358 (diff)
nrf/Makefile: Improve Black Magic Probe commands.
Used batch mode to get rid of the confirmation prompt on flashing. Used 'compare-sections' to verify flash. Removed the unnecessary `quit` at the end.
-rw-r--r--ports/nrf/Makefile9
1 files changed, 5 insertions, 4 deletions
diff --git a/ports/nrf/Makefile b/ports/nrf/Makefile
index a8a522827..423323a9c 100644
--- a/ports/nrf/Makefile
+++ b/ports/nrf/Makefile
@@ -430,19 +430,19 @@ else ifeq ($(FLASHER), bmp)
BMP_PORT ?= /dev/ttyACM0
deploy: $(BUILD)/$(OUTPUT_FILENAME).elf
- $(Q)$(GDB) \
+ $(Q)$(GDB) -nx --batch \
-ex 'target extended-remote $(BMP_PORT)' \
-ex 'monitor tpwr enable' \
-ex 'monitor swdp_scan' \
-ex 'attach 1' \
-ex 'set mem inaccessible-by-default off' \
-ex 'load' \
+ -ex 'compare-sections' \
-ex 'kill' \
- -ex 'quit' \
$<
sd: $(BUILD)/$(OUTPUT_FILENAME).elf
- $(Q)$(GDB) \
+ $(Q)$(GDB) -nx --batch \
-ex 'target extended-remote $(BMP_PORT)' \
-ex 'monitor tpwr enable' \
-ex 'monitor swdp_scan' \
@@ -450,10 +450,11 @@ sd: $(BUILD)/$(OUTPUT_FILENAME).elf
-ex 'set mem inaccessible-by-default off' \
-ex 'monitor erase_mass' \
-ex 'load' \
+ -ex 'compare-sections' \
-ex 'file $(SOFTDEV_HEX)' \
-ex 'load' \
+ -ex 'compare-sections' \
-ex 'kill' \
- -ex 'quit' \
$<
else ifeq ($(FLASHER), openocd)