在用rtthread studio創建工程后,編譯不報錯。在下載時報pyocd找不到包的的錯誤,具體如下:
開始下載程序:2023-04-19 14:56:57
D:RT-ThreadStudio>cd /d D:RT-ThreadStudiorepoExtractDebugger_Support_PackagesRealThreadPyOCD?.1.6
D:RT-ThreadStudiorepoExtractDebugger_Support_PackagesRealThreadPyOCD?.1.6>pyocd.exe flash --target=N32L406CB --erase=auto --frequency=1000000 D:RT-ThreadStudioworkspaceN32L40_CANDebugrtthread.bin
0000672 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]
0000882 C Target type n32l406cb not recognized. Use 'pyocd list --targets' to see currently available target types. See for how to install additional target support. [__main__]
[2mTraceback (most recent call last):
File "pyocdboardboard.py", line 100, in __init__
KeyError: 'n32l406cb'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "pyocd__main__.py", line 161, in run
File "pyocdsubcommandsload_cmd.py", line 92, in invoke
File "pyocdcorehelpers.py", line 263, in session_with_chosen_probe
File "pyocdcoresession.py", line 213, in __init__
File "pyocdboardboard.py", line 106, in __init__
pyocd.core.exceptions.TargetSupportError: Target type n32l406cb not recognized. Use 'pyocd list --targets' to see currently available target types. See for how to install additional target support.[0m
執行完畢, 耗時:1510ms.
經查找查看報錯信息,提示pyocd在下載時找不到.pack包。
解決方法
1、在國民技術的資料包的目錄:H:N32L40XCLN32L40xxx_V2.1.06-軟件開發套件(Software Development Kit)下面有.pack包:
2、找到pyocd目錄下面,把包拷貝到指定目錄,如下圖:
3、把包的信息添加到pyocd.yaml文件里面:
最后就可以順利下載程序了
【總結】
rtthread在錯誤提示方面非常優秀,經查看錯誤日志,根據提示,很快就解決問題。
-
RTThread
+關注
關注
8文章
132瀏覽量
40811
發布評論請先 登錄
相關推薦
評論