环境 Win10 64位 RT-Thread Studio 2.2.1 工程:sdk-bsp-stm32h750-realthread-artpiprojectsart_pi_net_player 问题描述 使用RT-Thread Studio 进行下载,发现有的工程可以正常的下载,有的工程,怎么下载都是失败 对比了下成功与失败的原因,确认与硬件开发板没有关系 下载成功的信息: 开始下载程序:2022-03-29 00:44:34 D:RT-ThreadStudio>cd /dD:RT-ThreadStudiorepoExtractDebugger_Support_PackagesSTMicroelectronicsST-LINK_Debugger1.6.0toolsbin D:RT-ThreadStudiorepoExtractDebugger_Support_PackagesSTMicroelectronicsST-LINK_Debugger1.6.0toolsbin>D:RT-ThreadStudiorepoExtractDebugger_Support_PackagesSTMicroelectronicsST-LINK_Debugger1.6.0toolsbinSTM32_Programmer_CLI.exe -c port=SWD --extload D:Giteesdk-bsp-stm32h750-realthread-artpiprojectsart_pi_blink_ledboardstldrART-Pi_W25Q64.stldr mode=NORMAL -d "D:Giteesdk-bsp-stm32h750-realthread-artpiprojectsart_pi_blink_ledDebugrtthread.elf" -hardRst -s ------------------------------------------------------------------- STM32CubeProgrammer v2.7.0-RC1 ------------------------------------------------------------------- Warning: The external loader file does not exist: mode=normal ST-LINK SN : 0669FF393732484257242656 ST-LINK FW : V2J35M26 Board : -- Voltage : 3.29V SWD freq : 4000 KHz Connect mode: Normal Reset mode : Software reset Device ID : 0x450 Revision ID : Rev V Device name : STM32H7xx Flash size : 128 KBytes Device type : MCU Device CPU : Cortex-M7 Memory Programming ... Opening and parsing file: rtthread.elf File : rtthread.elf Size : 260704 Bytes Address : 0x90000000 Erasing memory corresponding to segment 0: Erasing external memory sectors [0 63] Download in Progress: Progress: 100% File download complete time elapsed during download operation: 00:00:07.748 Error: Unable to reset MCU! RUNNING Program ... Address: : 0x8000000 Application is running Start operation achieved successfully 在debug configration中将reset mode由默认的“hardware reset”改为“system reset” 执行完毕, 耗时:7952ms. 下载失败的信息 开始下载程序:2022-03-29 00:47:09 D:RT-ThreadStudio>cd /dD:RT-ThreadStudiorepoExtractDebugger_Support_PackagesSTMicroelectronicsST-LINK_Debugger1.6.0toolsbin D:RT-ThreadStudiorepoExtractDebugger_Support_PackagesSTMicroelectronicsST-LINK_Debugger1.6.0toolsbin>D:RT-ThreadStudiorepoExtractDebugger_Support_PackagesSTMicroelectronicsST-LINK_Debugger1.6.0toolsbinSTM32_Programmer_CLI.exe -c port=SWD mode=NORMAL -d "D:Giteesdk-bsp-stm32h750-realthread-artpiprojectsart_pi_net_playerDebugrtthread.elf" -hardRst -s ------------------------------------------------------------------- STM32CubeProgrammer v2.7.0-RC1 ------------------------------------------------------------------- ST-LINK SN : 0669FF393732484257242656 ST-LINK FW : V2J35M26 Board : -- Voltage : 3.29V SWD freq : 4000 KHz Connect mode: Normal Reset mode : Software reset Device ID : 0x450 Revision ID : Rev V Device name : STM32H7xx Flash size : 128 KBytes Device type : MCU Device CPU : Cortex-M7 Memory Programming ... Opening and parsing file: rtthread.elf File : rtthread.elf Size : 1983684 Bytes Address : 0x90000000 Erasing memory corresponding to segment 0: Download in Progress: Error: failed to download Segment[0] Error: failed to download the File Error: Unable to reset MCU! RUNNING Program ... Address: : 0x8000000 Application is running Start operation achieved successfully 在debug configration中将reset mode由默认的“hardware reset”改为“system reset” 执行完毕, 耗时:495ms. 问题分析 怀疑是下载算法引起的,查看工程的下载配置
正常工程的下载配置:sdk-bsp-stm32h750-realthread-artpiprojectsart_pi_blink_led
无法下载的工程配置:sdk-bsp-stm32h750-realthread-artpiprojectsart_pi_net_player
已经确定是没有【外部Flash烧写算法】引起的
解决方法手动配置上烧写算法
配置完,可以正常的下载了 小问题:这个路径,与正常工程的路径,不太一样,后面研究如何配置和这个路径 正常的路径 ${workspace_loc:/${ProjName}/board/stldr/ART-Pi_W25Q64.stldr} 手动配置的路径 D:/Gitee/sdk-bsp-stm32h750-realthread-artpi/debug/stldr/ART-Pi_W25Q64.stldr 手动配置的,是个绝对地址 小结
原作者:张世争
|