cancel
Showing results for 
Search instead for 
Did you mean: 

Linker doesn't put code in external (memory mapped) QSPI Flash

ESani.1
Associate II

I have an STM32F469NI-DISCO (AU1) board, and I need to put a big array (representing a GIF) in the external flash. I created a code attribute at first, and stored this array under the attribute in the external flash, but it won't work: the linker makes the new memory location appear in the compilation summary in the STM32Cube IDE project.

So I tried with the linker generated from another project that was using TouchGFX, and I put my array in the external flash, but again, nothing.

Attached the project file. The array is called "animatedLogo", and is located in the zlogo1.c file. I also redeclared all the macros used in TouchGFX (although I am not using touchGFX here).

I am also aware that the memory configuration in the Init() is not complete, but here the issue is a the compile time. But one step at a time...

1 ACCEPTED SOLUTION

Accepted Solutions
InsignificantBit
ST Employee

This is not a problem with the linker, it is working exactly as you intend. Your problem is that it is not getting loaded into the QSPI flash. To do this, you need an external loader.

In Memory Details tab in Build Analyzer in STM32CubeIDE, you can see that a 16 byte section has been placed in the output executable at the correct address of 0x90000000. You can also verify that correct data is placed in that section by opening the output .elf executable in STM32CubeProgrammer and examining its contents at the address 0x90000000.

View solution in original post

2 REPLIES 2
InsignificantBit
ST Employee

This is not a problem with the linker, it is working exactly as you intend. Your problem is that it is not getting loaded into the QSPI flash. To do this, you need an external loader.

In Memory Details tab in Build Analyzer in STM32CubeIDE, you can see that a 16 byte section has been placed in the output executable at the correct address of 0x90000000. You can also verify that correct data is placed in that section by opening the output .elf executable in STM32CubeProgrammer and examining its contents at the address 0x90000000.

ESani.1
Associate II

Hi, I re-edit the entire answer. You are right. I do see the 16B. I'll couple of check more before marking it as solved.