-
Notifications
You must be signed in to change notification settings - Fork 132
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
[scons] Add Black Magic Probe Programming method (again) #168
Conversation
The issue is fundamentally that the SCons tools in xpcc didn't really deal with the user's programmer/debugger stack very well and I removed it in modm since there still wasn't a unified concept with how to deal with accessing targets. I would like to see a concept for retargeting the existing semantics of the CLI onto the user's specific targets:
This needs to work WITHOUT hardcoding information as an lbuild option, since the Ideally I would like to see an automated guess as to what programmer to use, probably using pyUSB to check the connected programmers and before choosing one.
Add it to PS: Something with the CI is wrong, it seems to show an incomplete output from your own CI fork. |
Alternatively to the automated detection, I'd also be ok with using arguments to specify the programmer and port: scons program type=bmp # automatically choose port for BMP
scons program type=bmp port=/dev/usbserial.foobar # use specific BMP
scons program type=openocd usbid=serial # in case your have multiple openocd programmers connected
scons program # use OpenOCD
scons program # in future: automatically choose programmer and port This would just default |
openocd != ST-Link, but so far this is the only combination we use. openocd offers many other debug adapters. arm-none-eabi-gdb + Black Magic Probe is the other combination I am using. Also to be considered:
I am in favour of
And How to proceed? |
Ok, agreed. I never like
Yes, good point! The intergrated STM32 bootloaders would be very nice to have. I would very much prefer to delegate this to other projects (like OpenOCD or BMP) though, instead of duplicating this effort somehow in modm.
A "proper" solution requires larger changes that need to be planned and prototyped. I'm opening a new issue to keep track of this discussion. For this PR I would the BMP functionality as the |
What is the best way to read the command line parameter in the script? Is there any example that uses command line parameters already? |
See the user guide: |
Yeah ;-) |
2043543
to
3158d27
Compare
3158d27
to
99972ea
Compare
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.
Thanks!
99972ea
to
21c0840
Compare
This was added back in 2016 in 7f0d2ef, but disappeared when migrated to modm.
This shall solve #148 Add "programming capabilities/scons/Black Magic Probe"
Add debugging method like.scons openocd-debug
/scons bmp-debug
Postponed to a rework of the
upload
feature of modm.