debugprobe, 80元人民币
再买一块pico, 刷上debug程序,仅要16元,当然用便宜的。
在mac上的vs code总是遇见问题
单独运行openocd时,也有问题,出现错误: CMSIS-DAP command CMD_DAP_SWJ_CLOCK failed
详细信息如下:
```
sudo ./build/src/openocd -f interface/cmsis-dap.cfg -f target/rp2040.cfg -s tcl
Open On-Chip Debugger 0.11.0-g8e3c38f (2023-04-03-14:21)
Licensed under GNU GPL v2
For bug reports, read
OpenOCD: Bug Reporting
Info : auto-selecting first available session transport "swd". To override use 'transport select '.
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 : Using CMSIS-DAPv2 interface with VID:PID=0x2e8a:0x000c, serial=E6614103E745A024
Info : CMSIS-DAP: SWD Supported
Info : CMSIS-DAP: FW Version = 2.0.0
Info : CMSIS-DAP: Interface Initialised (SWD)
Info : SWCLK/TCK = 0 SWDIO/TMS = 0 TDI = 0 TDO = 0 nTRST = 0 nRESET = 0
Error: CMSIS-DAP command CMD_DAP_SWJ_CLOCK failed.
```
经过搜索,发现需要设置dap的速率,
直接修改rp2040.cfg, 添加速度。
adapter speed 5000,
都正常了。
正常的打印信息:
```
sudo ./build/src/openocd -c "gdb_port 50000" -c "tcl_port 50001" -c "telnet_port 50002" -c "adapter speed 5000" -f interface/cmsis-dap.cfg -f target/rp2040.cfg -s tcl
Open On-Chip Debugger 0.11.0-g8e3c38f (2023-04-03-15:59)
Licensed under GNU GPL v2
For bug reports, read
OpenOCD: Bug Reporting
adapter speed: 5000 kHz
Info : auto-selecting first available session transport "swd". To override use 'transport select '.
Info : Hardware thread awareness created
Info : Hardware thread awareness created
Info : RP2040 Flash Bank Command
Info : Listening on port 50001 for tcl connections
Info : Listening on port 50002 for telnet connections
Info : Using CMSIS-DAPv2 interface with VID:PID=0x2e8a:0x000c, serial=E6614103E745A024
Info : CMSIS-DAP: SWD Supported
Info : CMSIS-DAP: FW Version = 2.0.0
Info : CMSIS-DAP: Interface Initialised (SWD)
Info : SWCLK/TCK = 0 SWDIO/TMS = 0 TDI = 0 TDO = 0 nTRST = 0 nRESET = 0
Info : CMSIS-DAP: Interface ready
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 50000
Info : Listening on port 50000 for gdb connections
```
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)