There are some notes when you want to debug pico on openocd.
Refer document: https://datasheets.raspberrypi.org/pico/getting-started-with-pico.pdf
Require:
- 2 pi pico micro controller.
- openocd software which support picoprobe (window binary here)
- eclipse IDE (optional)
Wiring debug pico with picoprobe pico together
After all connection is done, run openocd as a server.
$ ./openocd.exe -f interface/picoprobe.cfg -f target/rp2040.cfg -s tcl
As normal working, the output look likes
Open On-Chip Debugger 0.10.0+dev-g14c0d0d-dirty (2021-01-27-15:43)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'swd'
Warn : Transport "swd" was already selected
adapter speed: 5000 kHz
Info : Hardware thread awareness created
Info : Hardware thread awareness created
Info : RP2040 Flash Bank Command
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
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
Then open new terminal, run gdb-multiarch.exe
$ gdb-multiarch.exe tinyPromptPico.elf
(gdb) target remote localhost:3333
(gdb) load
(gdb) break main
(gdb) continue
...
Setup Eclipse Note





Comments
Post a Comment