Skip to content

Black magic probe issue #183 #196

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

Merged
merged 7 commits into from
Nov 21, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you replace the {runtime.tools.gcc-arm-none-eabi-5_2-2015q4.path}/bin/ with {compiler.path} here?

That way if gcc is upgraded, only one line needs to be updated:

compiler.path={runtime.tools.gcc-arm-none-eabi-5_2-2015q4.path}/bin/

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unfortunately it looks like {compiler.path} is not visible to tools, only to the compiler itself and recipes.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed.

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=;

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