-
-
Notifications
You must be signed in to change notification settings - Fork 799
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
changed bmp gdb init #4521
base: develop
Are you sure you want to change the base?
changed bmp gdb init #4521
Conversation
@esden, could you review this PR? |
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.
So, not Esden, obviously, but rather the lead dev for the Black Magic Debug project. This change looks good to us with some notes (below) for general improvements that could be made that future-proof this a bit and bring the PlatformIO notes on BMD slightly more into line with the upstream project and the direction being taken in the future.
|
||
debug_port = port [monitor_cmd] | ||
|
||
debug_port can be /dev/ttyACM0 (/dev/ttyBmpGdb if you use the udev rules) or a Windows COM port, I use `${this.upload_port}` to use the same. |
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.
Small nitpick, /dev/ttyACM0 is unreliable in name - the kernel gives us no guarantees that it didn't bring BMP up as some other name instead, hence the project udev rules. Second note, if a user wishes to connect to a specific BMP by serial number, they can update their udev rules and use /dev/ttyBmpGdb<serial>
. The udev rules and serial number stuff is stable through releases
eval "monitor $arg%d enable", $i | ||
set $i = $i + 1 | ||
end | ||
monitor swdp_scan |
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.
we would suggest using the short name here (mon swd
) as this might change through releases. Also, on a new enough BMP (v1.8 firmware or newer), mon auto
allows what we've named "auto scan" which tries first JTAG and then SWD which opens this up to more targets.
@@ -20,12 +20,25 @@ | |||
class BlackmagicDebugConfig(DebugConfigBase): |
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.
20
Blackmagic Probe improvements
I needed SRST under reset feature, this command has to be issued before scan, but this is currently impossible with current variables.
By changing the gdb init a bit this or even target power is possible
See: "Embedded Debugging with the Black Magic Probe", pp. 28
debug_port = port [monitor_cmd]
debug_port can be /dev/ttyACM0 (/dev/ttyBmpGdb if you use the udev rules) or a Windows COM port, I use
${this.upload_port}
to use the same.An optional param can be used to enable eg:
Currently it's not possibe to enable both, but this can easily be changed (iterate over args)