raspberry pi pico, 如何在macos平台使用picoprobe,vscode来debug程序

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

```

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值