diff --git a/README.md b/README.md index b3fc0e2c..134065fd 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/platform.txt b/platform.txt index 8fc5e800..d291fec0 100644 --- a/platform.txt +++ b/platform.txt @@ -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" \ No newline at end of file diff --git a/programmers.txt b/programmers.txt index 45663a61..5217aca2 100644 --- a/programmers.txt +++ b/programmers.txt @@ -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=;