2022-12-15 09:11 AM
This is for a STM32H70
When uploading from CubeMx IDE or STM32CubeProgrammer I get these errors:
STM32CubeProgrammer:
Warning: File corrupted, Two or more segments defines the same memory area.
17:11:15 : Number of segments: 6
17:11:15 : segment[0]: address= 0x20000000, size= 0x0
17:11:15 : segment[1]: address= 0x20010000, size= 0x0
17:11:15 : segment[2]: address= 0x24080000, size= 0x0
17:11:15 : segment[3]: address= 0x30000000, size= 0x0
17:11:15 : segment[4]: address= 0x38000000, size= 0x0
17:11:15 : segment[5]: address= 0x90000000, size= 0x1143A8
17:11:16 : Warning: File corrupted. Two or more segments defines the same memory zone
CubeMx IDE:
"
Error in final launch sequence:
Failed to execute MI command:
load ... .elf
Error message from debugger back end:
Error finishing flash operation
Failed to execute MI command:
load ... .elf
Error message from debugger back end:
Error finishing flash operation
Failed to execute MI command:
load ... .elf
Error message from debugger back end:
Error finishing flash operation
"
The project is using external QSPI for ROM and is defined in the ld file as:
MEMORY
{
ITCMRAM (xrw) : ORIGIN = 0x00000000, LENGTH = 64K
QSPI (rx) : ORIGIN = 0x90000000, LENGTH = 8M
DTCMRAM1 (xrw) : ORIGIN = 0x20000000, LENGTH = 64K
DTCMRAM2 (xrw) : ORIGIN = 0x20010000, LENGTH = 64K
RAM (xrw) : ORIGIN = 0x24000000, LENGTH = 512K
RAM_NOCACHE (xrw) : ORIGIN = 0x24080000, LENGTH = 1024K - 512K
RAM_CD (xrw) : ORIGIN = 0x30000000, LENGTH = 128K
RAM_SRD (xrw) : ORIGIN = 0x38000000, LENGTH = 32K
}
The project compiles fine and the Build analyser reports all memory populated as expected
but when QSPI exceeds around 1MB I cannot upload to the device due to aforementioned.
.
I am also using a self penned "stldr" file for the w95q64 chip. It all works as expected (programs run without issue) until this memory limit is exceeded. I don't know where to correct the problem + any help wis much appreciated.
2022-12-15 10:56 AM
Yeah, not sure here. They use a lot of libraries to support .ELF files and who knows how well tested and integrated this is.
If those other regions are unused, perhaps comment out some of the MEMORY sections, and bisect the issue until you can see the pairing that actually conflict.
The latest version of STM32 Cube Programmer?
Does the stand-alone do this? GUI and or CLI variants?
@Sara BEN HADJ YAHYA can you please investigate the logic behind "Warning: File corrupted. Two or more segments defines the same memory zone", perhaps have it output specifically what regions/sections it deem to be clashing. Thanks -Clive
2022-12-15 04:03 PM
I wrote the loading algorithm myself and had to port from qspi to octospi HAL commands for the SMT32H7B0 (from 32H743) I think the problem is in the algorithm itself:
Error: Data mismatch found at address 0x90100000 (byte = 0x00 instead of 0xC7)
Error: Download verification failed
2022-12-15 06:43 PM
I've sorted it out. Sorry I was wasting your time. I had used the wrong address of FLASH in my loader for the DFU Bootloader FLASH (rx) : ORIGIN = 0x08010000, LENGTH = 64K instead of FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 64K
Problem still persists