N32L40XCL-STB模块评测—如何手工添加.pack包解决下载报错问题

电子说

1.3w人已加入

描述

在用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包:

RTThread

2、找到pyocd目录下面,把包拷贝到指定目录,如下图:

RTThread

3、把包的信息添加到pyocd.yaml文件里面:

RTThread

最后就可以顺利下载程序了

RTThread

【总结】

rtthread在错误提示方面非常优秀,经查看错误日志,根据提示,很快就解决问题。

打开APP阅读更多精彩内容
声明:本文内容及配图由入驻作者撰写或者入驻合作网站授权转载。文章观点仅代表作者本人,不代表电子发烧友网立场。文章及其配图仅供工程师学习之用,如有内容侵权或者其他违规问题,请联系本站处理。 举报投诉

全部0条评论

快来发表一下你的评论吧 !

×
20
完善资料,
赚取积分