-
-
Notifications
You must be signed in to change notification settings - Fork 284
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
Changes from 2 commits
7f50be8
f27bf9b
9c9bc3f
6643415
b894834
1e28ddd
c8f6c9b
f2010f2
e5133ca
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -129,3 +129,26 @@ 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.bmp_upload.cmd=arm-none-eabi-gdb | ||
tools.bmp_upload.path={runtime.tools.gcc-arm-none-eabi-5_2-2015q4.path}/bin/ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could we use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's a direct copy from the openocd path in boards.txt. Ill investigate (because im not familiar enough with this work) and make changes if there is no issue There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @sandeepmistry - doesnt look like we have access to this as a global parameter :
After some experimenting, tools only have access to their recipe parameters and the default global parameters. I looked at the platform link, the tool uses a static link not the global (because it doesnt work). Compiler options can use any global you define, which doesnt help. Some ways to make it easier to upgrade:
|
||
|
||
tools.bmp_upload.upload.speed=230400 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do different boards need different values? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not that ive noticed. Ive tried two different nrf51822 chips over 3 boards and have never had an issue. @rogerclarkmelbourne - have you had any problems with this upload speed with your nRF51 or nRF52 boards? |
||
|
||
tools.bmp_upload.erase.params.verbose= | ||
tools.bmp_upload.erase.params.quiet=-q --batch-silent | ||
tools.bmp_upload.erase.pattern="{path}{cmd}" -quiet -cd "{build.path}" -ex "target extended-remote \\.\{serial.port}" -ex "monitor swdp_scan" -ex "attach 1" -ex "monitor erase mass" -ex "echo \n\n\Erase finished!" -ex "detach" -ex "quit" | ||
|
||
tools.bmp_upload.upload.params.verbose= | ||
tools.bmp_upload.upload.params.quiet=-q --batch-silent | ||
tools.bmp_upload.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 \n\n\nUpload finished!\n" -ex "quit" | ||
|
||
tools.bmp_upload.program.params.verbose= | ||
tools.bmp_upload.program.params.quiet=-q --batch-silent | ||
tools.bmp_upload.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 \n\n\nProgram finished!\n" -ex "quit" | ||
#tools.bmp_upload.program.pattern="{path}{cmd}" -quiet -cd "{build.path}" -b {upload.speed} -l 10 -ex "set debug remote 0" -ex "target extended-remote \\.\{serial.port}" -ex "monitor swdp_scan" -ex "attach 1" -ex "file {build.project_name}.elf" -ex "load" -ex "run" -ex "echo \n\n\nProgram finished!\n" -ex "quit" | ||
|
||
tools.bmp_upload.bootloader.params.verbose= | ||
tools.bmp_upload.bootloader.params.quiet=-q --batch-silent | ||
tools.bmp_upload.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 "detach" -ex "target extended-remote \\.\{serial.port}" -ex "monitor swdp_scan" -ex "attach 1" -ex "load {softdevice}_{upload.target}_{softdeviceversion}_softdevice.hex" -ex "echo \n\n\nSoftdevice Uploaded!\n" -ex "detach" -ex "quit" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A more descriptive name than
bmp_upload
would be nice, maybeblackmagicprobe
?Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sandeepmistry sounds good