OpenEdv-开源电子网

 找回密码
 立即注册
正点原子全套STM32/Linux/FPGA开发资料,上千讲STM32视频教程免费下载...
查看: 5184|回复: 1

如何配置openocd使用正点原子DAP下载调试代码

[复制链接]

3

主题

11

帖子

0

精华

初级会员

Rank: 2

积分
98
金钱
98
注册时间
2021-5-2
在线时间
15 小时
发表于 2022-7-29 10:35:49 | 显示全部楼层 |阅读模式
1金钱
本帖最后由 samuelhg 于 2022-7-31 07:26 编辑

在使用clion开发时,配合openocd下载烧录代码配置STLINK很方便,
配置文件如下
  1. source [find interface/stlink.cfg]
  2. transport select hla_swd
  3. source [find target/stm32f1x.cfg]

  4. adapter speed 10000
复制代码
但是在配置DAP时,就不行了配置文件如下
  1. <blockquote># choose dap-link
复制代码
结果
  1. Open On-Chip Debugger 0.11.0 (2021-11-18) [https://github.com/sysprogs/openocd]
  2. Licensed under GNU GPL v2
  3. libusb1 09e75e98b4d9ea7909e8837b7a3f00dda4589dc3
  4. For bug reports, read
  5.         http://openocd.org/doc/doxygen/bugs.html
  6. Info : DEPRECATED target event trace-config; use TPIU events {pre,post}-{enable,disable}
  7. adapter speed: 10000 kHz

  8. Info : Listening on port 6666 for tcl connections
  9. Info : Listening on port 4444 for telnet connections
  10. Info : CMSIS-DAP: SWD  supported
  11. Info : CMSIS-DAP: JTAG supported
  12. Info : CMSIS-DAP: Atomic commands supported
  13. Info : CMSIS-DAP: FW Version = 2.0.0
  14. Info : CMSIS-DAP: Interface Initialised (SWD)
  15. Info : SWCLK/TCK = 1 SWDIO/TMS = 1 TDI = 1 TDO = 1 nTRST = 1 nRESET = 1
  16. Info : CMSIS-DAP: Interface ready
  17. Info : clock speed 10000 kHz
  18. Error: Error connecting DP: cannot read IDR

复制代码


请教如何解决?




正点原子逻辑分析仪DL16劲爆上市
回复

使用道具 举报

0

主题

1

帖子

0

精华

新手入门

积分
5
金钱
5
注册时间
2022-8-22
在线时间
1 小时
发表于 2022-8-22 11:13:02 | 显示全部楼层
source [find interface/cmsis-dap.cfg]
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则



关闭

原子哥极力推荐上一条 /2 下一条

正点原子公众号

QQ|手机版|OpenEdv-开源电子网 ( 粤ICP备12000418号-1 )

GMT+8, 2025-2-26 07:00

Powered by OpenEdv-开源电子网

© 2001-2030 OpenEdv-开源电子网

快速回复 返回顶部 返回列表