RT-Thread Studio 版本: 2.2.6
DAP-Link使用的是Air32 CMSIS-DAPLink,刷的V2版本
pyocd配置
使用CMD检查库安装状态,实际已经安装了
pyocd pack -f gd32f450zk
Part Vendor Pack Version Installed
---------------------------------------------------------------------------
GD32F450ZK GigaDevice GigaDevice.GD32F4xx_DFP 3.0.3 True
pyocd list
# Probe/Board Unique ID Target
---------------------------------------------------------------------------------------
0 Arm Air32 CMSIS-DAP 000100011a5a5bb600000000000a2411a5a5a5a597969908 n/a
LuatOS Air32 MINI DAPLink
如图所示
RTTstudio配置
下载失败,返回结果如下
D:\RT-ThreadStudio>cd /d D:\RT-ThreadStudio\repo\Extract\Debugger_Support_Packages\RealThread\PyOCD\0.2.1
D:\RT-ThreadStudio\repo\Extract\Debugger_Support_Packages\RealThread\PyOCD\0.2.1>pyocd.exe flash --target=GD32F450ZK --erase=auto -a=0x08000000 --frequency=1000000 D:\AAAworkspace\gd32f450_test\Debug\rtthread.bin
0000617 W Board ID 0001 is not recognized [mbed_board]
0001635 W Overlapping memory regions in file packs\Keil.STM32L4xx_DFP.2.3.0-small.pack (STM32L412C8Tx); deleting outer region. Further warnings will be suppressed for this file. [cmsis_pack]
Exception in thread load-svd:
Traceback (most recent call last):
File "threading.py", line 1038, in _bootstrap_inner
File "pyocd\debug\svd\loader.py", line 72, in run
File "pyocd\debug\svd\loader.py", line 48, in load
File "pyocd\debug\svd\parser.py", line 74, in for_xml_file
File "xml\etree\ElementTree.py", line 1218, in parse
File "xml\etree\ElementTree.py", line 580, in parse
xml.etree.ElementTree.ParseError: XML or text declaration not at start of entity: line 1, column 2
0002968 W Invalid coresight component, cidr=0x0 [rom_table]
0002982 I Loading D:\AAAworkspace\gd32f450_test\Debug\rtthread.bin at 0x08000000 [load_cmd]
0003158 E Error during board uninit: [session]
0003159 C No ACK received [__main__]
执行完毕, 耗时:4312ms.
更换了排线线序和短一点的线,能够下载和仿真调试了,https://wiki.luatos.com/chips/air32f103/daplink.html
使用CMD 然后指定pack的话,就不会识别错了,STudio加了这个也不行

--pack=D:\RT-ThreadStudio\repo\Extract\Debugger_Support_Packages\RealThread\PyOCD\0.2.1\packs\GigaDevice.GD32F4xx_DFP.3.1.0.pack
CMD加了—pack的效果
不加的效果,跟studio一样
另外有点报错,可以这样,参考https://zhuanlan.zhihu.com/p/599711058