Skip to content

Add support for Black Magic Probe #186

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 9 commits into from
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,13 @@ For 64-bit Linux users, ```libc6:i386```, ```libstdc++6:i386```, ```libncurses5

__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

###### Driver Setup for Black Magic Probe
1. Download .inf file drivers from [blacksphere github](https://github.com/blacksphere/blackmagic/tree/master/driver)
2. Plugin Black Magic Probe
3. Point the installer to the folder containing blackmagic.inf

__NOTE__: If using Windows 10 or Linux then two UART COM ports will be visible without requiring additional drivers

### Selecting a SoftDevice
SoftDevices contain the BLE stack and housekeeping, and must be downloaded once before a sketch using BLE can be loaded.
The SD consumes ~5k of Ram + some extra based on actual BLE configuration.
Expand Down
24 changes: 24 additions & 0 deletions platform.txt
Original file line number Diff line number Diff line change
Expand Up @@ -129,3 +129,27 @@ tools.openocd.erase.pattern=
tools.openocd.bootloader.params.verbose=-d2
tools.openocd.bootloader.params.quiet=-d0
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;"

#
# blackmagic probe upload
#
tools.blackmagicprobe.path={runtime.tools.gcc-arm-none-eabi-5_2-2015q4.path}/bin/
tools.blackmagicprobe.cmd=arm-none-eabi-gdb

tools.blackmagicprobe.upload.speed=230400

tools.blackmagicprobe.erase.params.verbose=
tools.blackmagicprobe.erase.params.quiet=-q --batch-silent
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"

tools.blackmagicprobe.upload.params.verbose=
tools.blackmagicprobe.upload.params.quiet=-q --batch-silent
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"

tools.blackmagicprobe.program.params.verbose=
tools.blackmagicprobe.program.params.quiet=-q --batch-silent
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"

tools.blackmagicprobe.bootloader.params.verbose=
tools.blackmagicprobe.bootloader.params.quiet=-q --batch-silent
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"
8 changes: 8 additions & 0 deletions programmers.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,11 @@ cmsisdap.protocol=cmsis-dap
cmsisdap.program.protocol=cmsis-dap
cmsisdap.program.tool=openocd
cmsisdap.program.setup_command=;

bmp.name=Black Magic Probe (GDB)
bmp.communication=USB
bmp.protocol=
bmp.program.protocol=
bmp.program.tool=blackmagicprobe
bmp.bootloader.tool=sandeepmistry:blackmagicprobe
bmp.program.extra_params=;