Skip to content

Commit d91502d

Browse files
micookesandeepmistry
authored andcommitted
Black magic probe issue #183 (#196)
* In support of 'issue' #183 - Add Black Magic Probe (BMP) upload method This is basically a merge of work done by @rogerclarkmelbourne in arduino-nRF5-customised, with the addition of bootloader uploading as per @sandeepmistry openocd reference in platform.txt Note: This incorporates changes based off feedback from @sandeepmistry, @dmikhalsky, @dlabun * README.md - BMP driver installation details * platform.txt - BMP tool setup * programmers.txt - Add BMP as a programmer option * In support of 'issue' #183 - Add Black Magic Probe (BMP) upload method This is basically a merge of work done by @rogerclarkmelbourne in arduino-nRF5-customised, with the addition of bootloader uploading as per @sandeepmistry openocd reference in platform.txt Note: This incorporates changes based off feedback from @sandeepmistry, @dmikhalsky, @dlabun * README.md - BMP driver installation details * platform.txt - BMP tool setup * programmers.txt - Add BMP as a programmer option * Update programmers.txt Remove accidental references to sandeepmistry:openocd for openocd methods * Update programmers.txt * * rename bmp programmer to the more descriptive blackmagicprobe * * remove accidental addition of bootloader.tool to openocd methods
1 parent 32ebbe0 commit d91502d

File tree

3 files changed

+39
-0
lines changed

3 files changed

+39
-0
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,13 @@ For 64-bit Linux users, ```libc6:i386```, ```libstdc++6:i386```, ```libncurses5
7676

7777
__NOTE__: To roll back to the original driver go to: Device Manager -> Right click on device -> Check box for "Delete the driver software for this device" and click Uninstall
7878

79+
###### Driver Setup for Black Magic Probe
80+
1. Download .inf file drivers from [blacksphere github](https://github.com/blacksphere/blackmagic/tree/master/driver)
81+
2. Plugin Black Magic Probe
82+
3. Point the installer to the folder containing blackmagic.inf
83+
84+
__NOTE__: If using Windows 10 or Linux then two UART COM ports will be visible without requiring additional drivers
85+
7986
### Selecting a SoftDevice
8087
SoftDevices contain the BLE stack and housekeeping, and must be downloaded once before a sketch using BLE can be loaded.
8188
The SD consumes ~5k of Ram + some extra based on actual BLE configuration.

platform.txt

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,3 +129,27 @@ tools.openocd.erase.pattern=
129129
tools.openocd.bootloader.params.verbose=-d2
130130
tools.openocd.bootloader.params.quiet=-d0
131131
tools.openocd.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -f interface/{program.protocol}.cfg -c "{program.setup_command}" -f target/{upload.target}.cfg -c "init; halt; nrf51 mass_erase; program {{{runtime.platform.path}/cores/nRF5/SDK/components/softdevice/{softdevice}/hex/{softdevice}_{upload.target}_{softdeviceversion}_softdevice.hex}} verify reset; shutdown;"
132+
133+
#
134+
# blackmagic probe upload
135+
#
136+
tools.blackmagicprobe.path={runtime.tools.gcc-arm-none-eabi-5_2-2015q4.path}/bin/
137+
tools.blackmagicprobe.cmd=arm-none-eabi-gdb
138+
139+
tools.blackmagicprobe.upload.speed=230400
140+
141+
tools.blackmagicprobe.erase.params.verbose=
142+
tools.blackmagicprobe.erase.params.quiet=-q --batch-silent
143+
tools.blackmagicprobe.erase.pattern="{path}{cmd}" -quiet -ex "target extended-remote \\.\{serial.port}" -ex "monitor swdp_scan" -ex "attach 1" -ex "monitor erase mass" -ex "echo \nErase finished!\n" -ex "detach" -ex "quit"
144+
145+
tools.blackmagicprobe.upload.params.verbose=
146+
tools.blackmagicprobe.upload.params.quiet=-q --batch-silent
147+
tools.blackmagicprobe.upload.pattern="{path}{cmd}" -quiet -cd "{build.path}" -b {upload.speed} -l 10 -ex "set debug remote 0" -ex "set target-async off" -ex "set remotetimeout 10" -ex "set mem inaccessible-by-default off" -ex "set confirm off" -ex "set height 0" -ex "target extended-remote \\.\{serial.port}" -ex "monitor swdp_scan" -ex "attach 1" -ex "file {build.project_name}.elf" -ex "load" -ex "tbreak main" -ex "run" -ex "echo \nUpload complete!\n" -ex "quit"
148+
149+
tools.blackmagicprobe.program.params.verbose=
150+
tools.blackmagicprobe.program.params.quiet=-q --batch-silent
151+
tools.blackmagicprobe.program.pattern="{path}{cmd}" -quiet -cd "{build.path}" -b {upload.speed} -l 10 -ex "set debug remote 0" -ex "set target-async off" -ex "set remotetimeout 10" -ex "set mem inaccessible-by-default off" -ex "set confirm off" -ex "set height 0" -ex "target extended-remote \\.\{serial.port}" -ex "monitor swdp_scan" -ex "attach 1" -ex "file {build.project_name}.elf" -ex "load" -ex "tbreak main" -ex "run" -ex "echo \nProgram complete!\n" -ex "quit"
152+
153+
tools.blackmagicprobe.bootloader.params.verbose=
154+
tools.blackmagicprobe.bootloader.params.quiet=-q --batch-silent
155+
tools.blackmagicprobe.bootloader.pattern="{path}{cmd}" -quiet -cd "{runtime.platform.path}/cores/nRF5/SDK/components/softdevice/{softdevice}/hex/" -ex "target extended-remote \\.\{serial.port}" -ex "monitor swdp_scan" -ex "attach 1" -ex "monitor erase mass" -ex "load {softdevice}_{upload.target}_{softdeviceversion}_softdevice.hex" -ex "echo \nSoftdevice upload complete!\n" -ex "detach" -ex "quit"

programmers.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,11 @@ cmsisdap.protocol=cmsis-dap
1818
cmsisdap.program.protocol=cmsis-dap
1919
cmsisdap.program.tool=openocd
2020
cmsisdap.program.setup_command=;
21+
22+
blackmagicprobe.name=Black Magic Probe (GDB)
23+
blackmagicprobe.communication=USB
24+
blackmagicprobe.protocol=
25+
blackmagicprobe.program.protocol=
26+
blackmagicprobe.program.tool=blackmagicprobe
27+
blackmagicprobe.bootloader.tool=sandeepmistry:blackmagicprobe
28+
blackmagicprobe.program.extra_params=;

0 commit comments

Comments
 (0)