Skip to main content
Mayank1
Associate II
January 21, 2021
Solved

Error pops up while programming external flash using STMCubeProgrammer

  • January 21, 2021
  • 1 reply
  • 2203 views

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.

This topic has been closed for replies.
Best answer by Tesla DeLorean

Address needs to be 0x90000000 not 0x9000000

9 with 7 zeros

1 reply

Tesla DeLorean
Guru
January 21, 2021

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 VenmoUp vote any posts that you find helpful, it shows what's working..
Mayank1
Mayank1Author
Associate II
January 22, 2021

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.

Tesla DeLorean
Tesla DeLoreanBest answer
Guru
January 22, 2021

Address needs to be 0x90000000 not 0x9000000

9 with 7 zeros

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