在用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浏览量
40875
发布评论请先 登录
相关推荐
评论