Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[openocd] Add support for custom OpenOCD path
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/...: 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
- Loading branch information