本帖最后由 割れたリンゴ 于 2017-12-7 16:30 编辑
开发环境: 1.CLion + openocd_cubemx 插件 2.openocd
3.cmsisdap(stm32F103C8T6)
4.jlinkob (STM32F072C8T6)
自娱自乐制作的JLINK CMSIS-DAP
下面是烧写同一个程序时,jlinkob和cmsisdap的不同表现
- swd
- adapter speed: 1000 kHz
- adapter_nsrst_delay: 100
- none separate
- cortex_m reset_config sysresetreq
- Info : CMSIS-DAP: SWD Supported
- Info : CMSIS-DAP: Interface Initialised (SWD)
- Info : CMSIS-DAP: FW Version = 1.0
- Info : SWCLK/TCK = 1 SWDIO/TMS = 1 TDI = 0 TDO = 0 nTRST = 0 nRESET = 1
- Info : CMSIS-DAP: Interface ready
- Info : clock speed 1000 kHz
- Info : SWD DPIDR 0x1ba01477
- Info : stm32f1x.cpu: hardware has 6 breakpoints, 4 watchpoints
- target halted due to debug-request, current mode: Thread
- xPSR: 0x01000000 pc: 0x08000200 msp: 0x20005000
- ** Programming Started **
- auto erase enabled
- Info : device id = 0x20036410
- Info : flash size = 128kbytes
- wrote 20480 bytes from file /home/ailike/Private/Workplace/STM32/f103RB/cmake-build-debug/f103RB.elf in 2.676811s (7.472 KiB/s)
- ** Programming Finished **
- shutdown command invoked
- ///////////////////////////////////////////////////
- swd
- adapter speed: 1000 kHz
- adapter_nsrst_delay: 100
- none separate
- cortex_m reset_config sysresetreq
- Info : No device selected, using first device.
- Info : J-Link OB-STM32F072-CortexM compiled Mar 8 2333 11:15:54
- Info : Hardware version: 1.00
- Info : VTarget = 3.300 V
- Info : clock speed 1000 kHz
- Info : SWD DPIDR 0x1ba01477
- Info : stm32f1x.cpu: hardware has 6 breakpoints, 4 watchpoints
- target halted due to debug-request, current mode: Thread
- xPSR: 0x01000000 pc: 0x08000200 msp: 0x20005000
- ** Programming Started **
- auto erase enabled
- Info : device id = 0x20036410
- Info : flash size = 128kbytes
- wrote 20480 bytes from file /home/ailike/Private/Workplace/STM32/f103RB/cmake-build-debug/f103RB.elf in 1.176331s (17.002 KiB/s)
- ** Programming Finished **
- shutdown command invoked
复制代码 可以看出在调试频率相同的情况下,jlink的flash烧写速度远超cmsisdap
本来是怀疑cmsisdap下载算法有问题
但是在keil中使用时,二者速度相差无几
。。。怀疑是openocd的cmsisdap驱动问题
google了一下,果不其然
sourceforge讨论地址
cmsisdap的openocd驱动还处于测试阶段,性能比较糟糕
准备有空用一下arm自家的python库-----pyOCD测试cmsisdap下载速度
写个python脚本代替openocd来下载和仿真
|
vllink lite用bulk做了cmsis-dap协议兼容,异步乒乓传输,swd在16M时钟下,速度可达400KB/S。
不过只提供基于gd32f350的固件。