cancel
Showing results for 
Search instead for 
Did you mean: 

Error pops up while programming external flash using STMCubeProgrammer

Mayank1
Associate II

Hi All, I am working on TouchGFX using STMCubeIDE( STM32G474 Eval-Board). There is a need to implement external flash driver for the project. I am using QSPI for implementing the flash driver. In linker file I have memory definitions as below :

/* Memories definition */

MEMORY

{

 RAM  (xrw)  : ORIGIN = 0x20000000,  LENGTH = 128K

 FLASH  (rx)  : ORIGIN = 0x8000000,  LENGTH = 512K

 QSPI_FLASH (r)  : ORIGIN = 0x9000000,  LENGTH = 16M

}

/* Sections */

.ARM.attributes 0 : { *(.ARM.attributes) }

ExtFlashSection :

{

*(ExtFlashSection ExtFlashSection.*)

*(.gnu.linkonce.r.*)

    . = ALIGN(0x4);

} >QSPI_FLASH

Now, While programming the external flash using STMCube Programmer, its not able to program it. The STMCubeIDE generates .elf file which I trying to program and CubeProgrammer fails to program for QSPI_FLASH region. Error Image below :-0693W000007CAO0QAO.pngPlease check if anybody can help.

Thanks in advance.

1 ACCEPTED SOLUTION

Accepted Solutions

Address needs to be 0x90000000 not 0x9000000

9 with 7 zeros

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

View solution in original post

4 REPLIES 4

You need to select the External Loader designed for your board. Click the {EL} button on the lower left of the pane, use the filter/search option to reduce the noise, type in "G4", and check your board's loader

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Hey Tesla DeLorean,

Thanks for your reply. But I selected external loader for STM32G474 -E to program. I kept that loader in STM32CubeProgrammer\bin\ExternalLoader to show up in the CubeProgrammer. Then selected it, and that chose my binary to program. Basically it divides the memory area in two regions, one for the controller memory and other ext-flash memory. Its failing while programming the ext-flash memory.

Address needs to be 0x90000000 not 0x9000000

9 with 7 zeros

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Hey Tesla,

It solved my issue. Thanks for the quick responses. :smiling_face_with_smiling_eyes: