你的浏览器版本过低,可能导致网站不能正常访问!
为了你能正常使用网站功能,请使用这些浏览器。

在linux下使用openocd时 cmsis-dap下载速度奇慢的问题

[复制链接]
割れたリンゴ 提问时间:2017-12-7 16:09 /
本帖最后由 割れたリンゴ 于 2017-12-7 16:30 编辑

开发环境: 1.CLion + openocd_cubemx 插件 2.openocd
3.cmsisdap(stm32F103C8T6)
4.jlinkob (STM32F072C8T6)
DeepinScreenshot_20171207160416.png 自娱自乐制作的JLINK CMSIS-DAP
QQ图片20171207162023.jpg
下面是烧写同一个程序时,jlinkob和cmsisdap的不同表现
  1. swd
  2. adapter speed: 1000 kHz
  3. adapter_nsrst_delay: 100
  4. none separate
  5. cortex_m reset_config sysresetreq
  6. Info : CMSIS-DAP: SWD  Supported
  7. Info : CMSIS-DAP: Interface Initialised (SWD)
  8. Info : CMSIS-DAP: FW Version = 1.0
  9. Info : SWCLK/TCK = 1 SWDIO/TMS = 1 TDI = 0 TDO = 0 nTRST = 0 nRESET = 1
  10. Info : CMSIS-DAP: Interface ready
  11. Info : clock speed 1000 kHz
  12. Info : SWD DPIDR 0x1ba01477
  13. Info : stm32f1x.cpu: hardware has 6 breakpoints, 4 watchpoints
  14. target halted due to debug-request, current mode: Thread
  15. xPSR: 0x01000000 pc: 0x08000200 msp: 0x20005000
  16. ** Programming Started **
  17. auto erase enabled
  18. Info : device id = 0x20036410
  19. Info : flash size = 128kbytes
  20. wrote 20480 bytes from file /home/ailike/Private/Workplace/STM32/f103RB/cmake-build-debug/f103RB.elf in 2.676811s (7.472 KiB/s)
  21. ** Programming Finished **
  22. shutdown command invoked

  23. ///////////////////////////////////////////////////

  24. swd
  25. adapter speed: 1000 kHz
  26. adapter_nsrst_delay: 100
  27. none separate
  28. cortex_m reset_config sysresetreq
  29. Info : No device selected, using first device.
  30. Info : J-Link OB-STM32F072-CortexM compiled Mar  8 2333 11:15:54
  31. Info : Hardware version: 1.00
  32. Info : VTarget = 3.300 V
  33. Info : clock speed 1000 kHz
  34. Info : SWD DPIDR 0x1ba01477
  35. Info : stm32f1x.cpu: hardware has 6 breakpoints, 4 watchpoints
  36. target halted due to debug-request, current mode: Thread
  37. xPSR: 0x01000000 pc: 0x08000200 msp: 0x20005000
  38. ** Programming Started **
  39. auto erase enabled
  40. Info : device id = 0x20036410
  41. Info : flash size = 128kbytes
  42. wrote 20480 bytes from file /home/ailike/Private/Workplace/STM32/f103RB/cmake-build-debug/f103RB.elf in 1.176331s (17.002 KiB/s)
  43. ** Programming Finished **
  44. shutdown command invoked
复制代码
可以看出在调试频率相同的情况下,jlink的flash烧写速度远超cmsisdap
本来是怀疑cmsisdap下载算法有问题
但是在keil中使用时,二者速度相差无几
。。。怀疑是openocd的cmsisdap驱动问题
google了一下,果不其然
sourceforge讨论地址
DeepinScreenshot_select-area_20171207155917.png
cmsisdap的openocd驱动还处于测试阶段,性能比较糟糕
准备有空用一下arm自家的python库-----pyOCD测试cmsisdap下载速度
写个python脚本代替openocd来下载和仿真





收藏 评论1 发布时间:2017-12-7 16:09

举报

1个回答
le062 回答时间:2018-11-5 20:48:46
这是因为CMSIS-DAP为了免驱,选用了HID协议,全速上限64KB,而openocd以同步方式发收命令和应答,速度上限只有32KB,再考虑协议开销,读写速度只有25KB左右了。
vllink lite用bulk做了cmsis-dap协议兼容,异步乒乓传输,swd在16M时钟下,速度可达400KB/S。
不过只提供基于gd32f350的固件。

所属标签

相似问题

关于意法半导体
我们是谁
投资者关系
意法半导体可持续发展举措
创新和工艺
招聘信息
联系我们
联系ST分支机构
寻找销售人员和分销渠道
社区
媒体中心
活动与培训
隐私策略
隐私策略
Cookies管理
行使您的权利
关注我们
st-img 微信公众号
st-img 手机版