-
Raspberry Pi Pico provides its own version of openocd which can be used with picoprobe (additional rp2040 board) to flash and debug the board. It would be extremely convenient to have it working via Is there a way to customize scons files to support this?
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Yeah, I saw that too and was hoping they would merge it back into upstream by the time I got around to dealing with it. It's not super elegant, but finding the path automatically is probably not doable generically due to installation location differences per OS. |
Beta Was this translation helpful? Give feedback.
Yeah, I saw that too and was hoping they would merge it back into upstream by the time I got around to dealing with it.
You would need to adapt the openocd command here and make the binary an argument: https://github.com/modm-io/modm/blob/develop/tools/modm_tools/openocd.py#L81
Then in the SCons wrapper you query it from the command line via
ARGUMENTS.get("path", "openocd")
(usage:scons program path=/path/to/pico/openocd
): https://github.com/modm-io/modm/blob/develop/tools/build_script_generator/scons/site_tools/openocd.py#L47It's not super elegant, but finding the path automatically is probably not doable generically due to installation location differences per OS.