Skip to content

How to integrate custom rp2040 version of openocd (+configs) into 'scons program' command? #845

Answered by salkinium
cocasema asked this question in Q&A
Discussion options

You must be logged in to vote

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#L47

It's not super elegant, but finding the path automatically is probably not doable generically due to installation location differences per OS.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@salkinium
Comment options

Answer selected by salkinium
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants