#申请原创# 今天在用RT-Thread Studio 给N32L403开发板下载程序时报错.pack包错误:
开始下载程序:2023-04-19 14:56:57D:\RT-ThreadStudio>cd /d D:\RT-ThreadStudio\repo\Extract\Debugger_Support_Packages\RealThread\PyOCD\0.1.6 D:\RT-ThreadStudio\repo\Extract\Debugger_Support_Packages\RealThread\PyOCD\0.1.6>pyocd.exe flash --target=N32L406CB --erase=auto --frequency=1000000 D:\RT-ThreadStudio\workspace\N32L40_CAN\Debug\rtthread.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 <https://github.com/pyocd/pyOCD/blob/master/docs/target_support.md> for how to install additional target support. [__main__][2mTraceback (most recent call last): File "pyocd\board\board.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 "pyocd\subcommands\load_cmd.py", line 92, in invoke File "pyocd\core\helpers.py", line 263, in session_with_chosen_probe File "pyocd\core\session.py", line 213, in __init__ File "pyocd\board\board.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 <https://github.com/pyocd/pyOCD/blob/master/docs/target_support.md> for how to install additional target support.[0m执行完毕, 耗时:1510ms.
英文不大熟练,经查看许多,最后看到了一个重点:See <https://github.com/pyocd/pyOCD/blob/master/docs/target_support.md> 这一句,是说去这里看帮助。经学习,错误是出在.pack包没有找到。
后面找到pyocd的目录下,发现了一个专门用于存放.pack的包目录,目录下果然没有这个包。我就有点奇怪,为什么N32G457的有,这个没有。
到资料网
ftp://download.nationstec下载到了N32L40X的资料包,把.pack包复制进来。
3、把包的信息添加到pyocd.yaml文件里面:
然后就顺利的用板载的DAP-LINK把程序下载到开发板了。
|