I have made a custom external flash loader(.stldr) file for my STM32 based board and this file works great with ST Link Utility(Read, Write and Erase) are work fine and i can Program the board correctly. But when i try to use the created .stldr file by STM32CubeIDE the erasing process well done but when the downloading process gets start then "failed to download Segment[0]" error pups up.
Could any one help me with the problem?
STMicroelectronics ST-LINK GDB server. Version 6.0.0
Copyright (c) 2021, STMicroelectronics. All rights reserved.
Starting server with the following options:
Persistent Mode : Disabled
Logging Level : 1
Listen Port Number : 61234
Status Refresh Delay : 15s
Verbose Mode : Disabled
SWD Debug : Enabled
InitWhile : Enabled
Waiting for debugger connection...
Debugger connected
Waiting for debugger connection...
Debugger connected
Waiting for debugger connection...
-------------------------------------------------------------------
STM32CubeProgrammer v2.9.0-RC01
-------------------------------------------------------------------
ST-LINK SN : 48FF6D068366565223471581
ST-LINK FW : V2J39S7
Board : --
Voltage : 3.24V
SWD freq : 4000 KHz
Connect mode: Under Reset
Reset mode : Hardware reset
Device ID : 0x450
Revision ID : Rev V
Device name : STM32H7xx
Flash size : 2 MBytes
Device type : MCU
Device CPU : Cortex-M7
BL Version : 0x90
Memory Programming ...
Opening and parsing file: ST-LINK_GDB_server_a23188.srec
File : ST-LINK_GDB_server_a23188.srec
Size : 389352 Bytes
Address : 0x08000000
Erasing memory corresponding to segment 0:
Erasing internal memory sector 0
Erasing memory corresponding to segment 1:
Erasing external memory sectors [0 3]
Download in Progress:
Error: failed to download Segment[0]
Error: failed to download the File
Shutting down...
Exit.
MCU = STM32H743iit6
QSPI Flash = W25Q256
The Problem was for the version of STM32CubeIDE 1.8
I downgraded to the STM32CubeIDE1.7 and the problem is solved.
Edited: I found the problem. According to these pictures(First for STM32CubeIDE 1.8 and Second for STM32CubeIDE 1.7)
Solution2:
Alternative to downgrading stm32CubeIDE from 1.8 to 1.7 version, you can only copy and replace the below directory contents of the STM32CubeIDE 1.7:
C:\ST\STM32CubeIDE_1.7.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.win32_2.0.0.202105311346\tools\bin
to the directory :
C:\ST\STM32CubeIDE_1.8.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.win32_2.0.100.202110141430\tools\bin
of the STM32CubeIDE 1.8 and every things will work well.