5 STM32F401RC 用 RT-Thread Studio 烧写不了程序

发布于 2020-09-01 23:07:36

STM32F401RC 用 RT-Thread Studio 基于芯片建立工程,编译后在IDE中点击下载按钮,无法下载至MCU,Jlink灯闪了一下就熄灭了,烧写不了程序,供电都是可靠的(外部3.3V供电)。

同样的硬件环境下,用STM32CubeMX建立工程后是可以用Jlink正常烧写的,也能正常执行程序。

同样用 RT-Thread Studio 基于芯片建立工程,创建一个STM32F429IG工程,编译后在IDE中点击下载按钮,是可以烧写STM32F429IG芯片的。基于STM32F401RC 建立就无法烧写STM32F401RC,不知道是BUG还是哪里配置不对?

Log如下所示:

Download Start Address: 0x08000000

开始下载程序:2020-09-01 22:56:13
D:RT-ThreadStudio>"D:/RT-ThreadStudio/repo/Extract/Debugger_Support_Packages/SEGGER/J-Link/6.80d/JLink.exe" -device STM32F401RC -ExitOnError -CommanderScript D:RT-ThreadStudioworkspace/.metadata/Temp/rtthread_download_init.jlink
SEGGER J-Link Commander V6.80d (Compiled Jun 26 2020 17:17:12)
DLL version V6.80d, compiled Jun 26 2020 17:16:09
J-Link Commander will now exit on Error
J-Link Command File read successfully.
Processing script file...
J-Link connection not established yet but required for command.
Connecting to J-Link via USB...O.K.
Firmware: J-Link ARM-OB STM32 compiled Aug 22 2012 19:52:04
Hardware version: V7.00
S/N: -2127392711
License(s): RDI,FlashDL,FlashBP,JFlash,GDBFull
VTref=3.300V
Selecting SWD as current target interface.
Device "STM32F401RC" selected.
Selecting auto as target interface speed
Target connection not established yet but required for command.
Device "STM32F401RC" selected.
Connecting to target via SWD
Found SW-DP with ID 0x2BA01477
Found SW-DP with ID 0x2BA01477
Unknown DP version. Assuming DPv0
Scanning AP map to find all available APs
AP[1]: Stopped AP scan as end of AP map has been reached
AP[0]: AHB-AP (IDR: 0x24770011)
Iterating through AP map to find AHB-AP to use
AP[0]: Core found
AP[0]: AHB-AP ROM base: 0xE00FF000
CPUID register: 0x410FC241. Implementer code: 0x41 (ARM)
Found Cortex-M4 r0p1, Little endian.
FPUnit: 6 code (BP) slots and 2 literal slots
CoreSight components:
ROMTbl[0] @ E00FF000
ROMTbl0: E000E000, CID: B105E00D, PID: 000BB00C SCS-M7
ROMTbl0: E0001000, CID: B105E00D, PID: 003BB002 DWT
ROMTbl0: E0002000, CID: B105E00D, PID: 002BB003 FPB
ROMTbl0: E0000000, CID: B105E00D, PID: 003BB001 ITM
ROMTbl0: E0040000, CID: B105900D, PID: 000BB9A1 TPIU
ROMTbl0: E0041000, CID: B105900D, PID: 000BB925 ETM
Cortex-M4 identified.
Reset delay: 0 ms
Reset type NORMAL: Resets core & peripherals via SYSRESETREQ & VECTRESET bit.
Reset: Halt core after reset via DEMCR.VC_CORERESET.
Reset: Reset device via AIRCR.SYSRESETREQ.
PC = 080001A8, CycleCnt = 00000000
R0 = 00000000, R1 = 00000000, R2 = 00000000, R3 = 00000000
R4 = 00000000, R5 = 00000000, R6 = 00000000, R7 = 00000000
R8 = 00000000, R9 = 00000000, R10= 00000000, R11= 00000000
R12= 00000000
SP(R13)= 20000410, MSP= 20000410, PSP= 00000000, R14(LR) = FFFFFFFF
XPSR = 01000000: APSR = nzcvq, EPSR = 01000000, IPSR = 000 (NoException)
CFBP = 00000000, CONTROL = 00, FAULTMASK = 00, BASEPRI = 00, PRIMASK = 00
FPS0 = 00000000, FPS1 = 00000000, FPS2 = 00000000, FPS3 = 00000000
FPS4 = 00000000, FPS5 = 00000000, FPS6 = 00000000, FPS7 = 00000000
FPS8 = 00000000, FPS9 = 00000000, FPS10= 00000000, FPS11= 00000000
FPS12= 00000000, FPS13= 00000000, FPS14= 00000000, FPS15= 00000000
FPS16= 00000000, FPS17= 00000000, FPS18= 00000000, FPS19= 00000000
FPS20= 00000000, FPS21= 00000000, FPS22= 00000000, FPS23= 00000000
FPS24= 00000000, FPS25= 00000000, FPS26= 00000000, FPS27= 00000000
FPS28= 00000000, FPS29= 00000000, FPS30= 00000000, FPS31= 00000000
FPSCR= 00000000
Downloading file [D:RT-ThreadStudioworkspacePZ_0001_testDebugrtthread.bin]...
Error: Failed to prepare RAMCode using RAM
Unspecified error -1
Script processing completed.
执行完毕, 耗时:554ms.

查看更多

关注者
0
被浏览
168
rcp
rcp 认证专家 2020-09-02

Keil和studio烧写原理有些不同,studio利用jlink.exe来烧写,从日志上看,有可能是您的jlink固件版本过低(Firmware: J-Link ARM-OB STM32 compiled Aug 22 2012 19:52:04),而jlink 6.8d软件版本过高造成的。建议升级下jlink调试器固件版本后再试试看

2 个回答
mii
mii 2020-09-02

你用了JLINK的SWD接口下载?

撰写答案

请登录后再发布答案,点击登录

发布
问题

分享
好友

手机
浏览

扫码手机浏览