Skip to content
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

support for black magic probe upload method #25

Open
mczerski opened this issue Mar 16, 2021 · 4 comments
Open

support for black magic probe upload method #25

mczerski opened this issue Mar 16, 2021 · 4 comments

Comments

@mczerski
Copy link

Hi,
It would be great if BMP were supported. Currently I'm using BMP with OpenOCD upload method but I need to modify mbed-cmake.gdbinit generated file to be able to debug.

@multiplemonomials
Copy link
Contributor

Hmm, I can look into this. Does this probe have its own uploader and/or gdb server? What are the modifications you need to make?

@mczerski
Copy link
Author

BMP runs its own gdbserver (on the probe itself) and comunicates over usb serial. So to use it I just start gdb and then connect to it with:

target extended-remote <path to serial device like ttyACM0>

and then to connect to the mcu I do:

monitor swdp (scan for connected devices)
attach <n> (connect to n'th device)

After that I can load/debug/or whatever. So basically my .gdbinit file has those three lines.
So to use debug-<target_name> target I need to change mbed-cmake.gdbinit file to have those three lines in it.
The flash-<target_name> is not usable with BMP now since it uses openocd. To support flashing with BMP the flash target would need to use gdb (connect/load/exit).

@multiplemonomials
Copy link
Contributor

Hmm, that sounds like it could be tough because every build target would need its own gdbinit. Hmm maybe there's a way to pass commands to gdb on the command line instead.

@mczerski
Copy link
Author

maybe --eval-command and --init-eval-command options may help with this ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants