diff options
| author | Dima Barsky <[email protected]> | 2021-04-16 14:23:27 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-04-16 20:23:27 +0700 |
| commit | 9f925bc900d397461adafeff4a43dce6a74f68d0 (patch) | |
| tree | 36e868e7413b22e27b4950ec0f7fc6b9e4b6737c /examples/rules.mk | |
| parent | c611199632b9288eff76c1c4bfdce5d8cc024748 (diff) | |
Added support for Black Magic Probe (#787)
* Added flash-bmp and debug-bmp targets; added .gdb_history to .gitignore
* Added the BMP variable, defaults to /dev/ttyBmpGdb
The name of the BMP device is different on different systems. On Linux (after installing the recommended udev rules) it'll be /dev/ttyBmpGdb, but the user should be able to override it.
* Update rules.mk
Diffstat (limited to 'examples/rules.mk')
| -rw-r--r-- | examples/rules.mk | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/examples/rules.mk b/examples/rules.mk index a19cd678e..e5fbee828 100644 --- a/examples/rules.mk +++ b/examples/rules.mk @@ -170,6 +170,16 @@ flash-pyocd: $(BUILD)/$(PROJECT).hex pyocd flash -t $(PYOCD_TARGET) $< pyocd reset -t $(PYOCD_TARGET) +# flash with Black Magic Probe + +# This symlink is created by https://github.com/blacksphere/blackmagic/blob/master/driver/99-blackmagic.rules +BMP ?= /dev/ttyBmpGdb + +flash-bmp: $(BUILD)/$(PROJECT).elf + $(GDB) --batch -ex 'target extended-remote $(BMP)' -ex 'monitor swdp_scan' -ex 'attach 1' -ex load $< + +debug-bmp: $(BUILD)/$(PROJECT).elf + $(GDB) -ex 'target extended-remote $(BMP)' -ex 'monitor swdp_scan' -ex 'attach 1' $< #-------------- Artifacts -------------- |
