-
Notifications
You must be signed in to change notification settings - Fork 143
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
[rp2040] Add support for custom OpenOCD path #846
Conversation
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.
Very nice solution!
I would like to see some documentation about this feature in the board/rp_pico/module.md
otherwise it's not discoverable, which would be a shame.
I'll check how to extend this to the Make and CMake build system in the meantime.
0b296c5
to
5218f0a
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.
I just streamlined the docs as a fixup if you want to squash and rebase.
Based on discussion modm-io#845 Raspberry Pi Pico provides its own version of OpenOCD which can be used with Raspberry Pi Picoprobe. Assuming you have RPi Pico stuff stored under ~/projects/pico/...: 1. Build and install OpenOCD cd ~/projects/pico git clone https://github.com/raspberrypi/openocd.git cd openocd ./bootstrap mkdir build cd build ../configure --prefix=$(realpath ../install) make install 2. Use it in your build terminal export MODM_OPENOCD_BINARY=$HOME/projects/pico/openocd/install/bin/openocd scons program scons: Reading SConscript files ... scons: done reading SConscript files. scons: Building targets ... ╭────────────── build/scons-release/pico-blinky.elf ╰───OpenOCD───> rp2040 Open On-Chip Debugger 0.11.0-g4f2ae61 (2022-04-12-12:01) Licensed under GNU GPL v2 For bug reports, read http://openocd.org/doc/doxygen/bugs.html Info : only one transport option; autoselect 'swd' Info : Hardware thread awareness created Info : Hardware thread awareness created Info : RP2040 Flash Bank Command Info : clock speed 5000 kHz Info : SWD DPIDR 0x0bc12477 Info : SWD DLPIDR 0x00000001 Info : SWD DPIDR 0x0bc12477 Info : SWD DLPIDR 0x10000001 Info : rp2040.core0: hardware has 4 breakpoints, 2 watchpoints Info : rp2040.core1: hardware has 4 breakpoints, 2 watchpoints Info : starting gdb server for rp2040.core0 on 3333 Info : Listening on port 3333 for gdb connections target halted due to debug-request, current mode: Thread xPSR: 0xf1000000 pc: 0x000000ee msp: 0x20041f00 target halted due to debug-request, current mode: Thread xPSR: 0xf1000000 pc: 0x000000ee msp: 0x20041f00 ** Programming Started ** Info : RP2040 B0 Flash Probe: 2097152 bytes @10000000, in 512 sectors target halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x0000012a msp: 0x20041f00 target halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x0000012a msp: 0x20041f00 target halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x0000012a msp: 0x20041f00 target halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x0000012a msp: 0x20041f00 target halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x0000012a msp: 0x20041f00 Info : Writing 4096 bytes starting at 0x0 target halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x0000012a msp: 0x20041f00 target halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x0000012a msp: 0x20041f00 target halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x0000012a msp: 0x20041f00 target halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x0000012a msp: 0x20041f00 target halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x0000012a msp: 0x20041f00 target halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x0000012a msp: 0x20041f00 ** Programming Finished ** ** Verify Started ** target halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x0000012a msp: 0x20041f00 target halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x0000012a msp: 0x20041f00 target halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x0000012a msp: 0x20041f00 ** Verified OK ** shutdown command invoked scons: done building targets
Based on discussion #845
Raspberry Pi Pico provides its own version of OpenOCD
which can be used with Raspberry Pi Picoprobe.
Assuming you have RPi Pico stuff stored under ~/projects/pico/...: