Skip to main content
Associate II
May 3, 2025
Solved

External Memory Error when flashing Nucleo-575ZI-Q + GFX02Z1 via TouchGFX or CubeIDE

  • May 3, 2025
  • 6 replies
  • 1535 views

Hello,

this error really drives me crazy. When trying to flash the programm from the ToughGFX App or CubeIDE the external Memory can't be erased. I use the recommended CubeMXVersion of 6.14 and have the latest CubeProgrammer and CubeIDE with STM32Cube FW_U5 V1.7.0. The whole ToughGFX log is attached. Thanks in advance!

These are the following errors that are occurring:

TouchGFX:

Erasing memory corresponding to sector 0:
Erasing external memory sector 0
Error: failed to erase memory

gcc/include/flash_sections_int_ext.mk:5: recipe for target '_extflash_' failed
make[1]: *** [_extflash_] Error 1
../gcc/Makefile:52: recipe for target 'flash' failed
make: *** [flash] Error 2
Failed
Failed

 

CubeIDE:

Error message from debugger back end:

Error finishing flash operation

Failed to execute MI command:

\STM32CubeIDE\\Debug\\STM32U575ZI-NUCLEO-AZ2.elf

Error message from debugger back end:

Error finishing flash operation

Error finishing flash operation

 

Best answer by LouisB

I dont see what it can be, but If you were never able in the past to flash the external memory, I suspect that you have a faulty board. If you have a other board available you can try to be sure.

 

BR,

6 replies

ST Employee
May 5, 2025

Hello @Neyus ,

Were you able to flash before ? If yes have you tried to manually erase memory with STM32CubeProgrammer ?

 

BR,
Louis B.

NeyusAuthor
Associate II
May 5, 2025

Hello @LouisB 

I tried erasing the external memory with the CubeProgrammer without success. Flashing the internal Flash works, but it fails every time I try to flash the external one. Could the Display Board be Faulty? I also tried downgrading the IDE and Programmer but nothing works. 

 

BR,

Neyus

 

ST Employee
May 7, 2025

Hello @Neyus ,

What's the message you get when you can erase / flash in cube programmer ?

BR,

NeyusAuthor
Associate II
May 7, 2025

Hello @LouisB ,

I have now imported the .stdl file that TouchGFX has provided for the exact board + external screen combination. When trying to do a mass erase, this error occours:

Neyus_0-1746619167666.png

There is no write protection enabled for the adress of the flash chip in CubeProgrammer

Neyus_1-1746619273367.pngNeyus_2-1746619297846.png

I am also not able to connect the board to ST-Link Utility and updated the board with CubeIDE to the newest ST-Link Firmwareversion

 

 

BR

ST Employee
May 9, 2025

Hello @Neyus,

Did you try to disable read protection option byte ? 

LouisB_0-1746780520743.png

BR,

NeyusAuthor
Associate II
May 9, 2025

Hello @LouisB,

yes, the read's out protection option was set to AA. The error still persists. 

BR

ST Employee
May 13, 2025

Hello @Neyus ,

 

In cube programmer did you select the right external loader ? If not the one from your board is not bundle with Cube MX, but is available in your TGFX project.

1. Search for a .stldr file in your TGFX project ( go in the gcc folder) and copy it in C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin\ExternalLoader .


2. Restart your CubeMx software

3. Go in the external loader tab and search for u575 gfx and select the one you just added

 

4. Now you can try a full chip erase on the external memory

 

BR,

ST Employee
May 13, 2025

Is it possible that you send me your project ?

NeyusAuthor
Associate II
May 13, 2025

Do you mean the TouchGFX project? I’ve only tested the board combination using either a blank screen or a single button—just the "Board Selector" and "Blank" options. I haven’t done anything else beyond that.

LouisBBest answer
ST Employee
May 14, 2025

I dont see what it can be, but If you were never able in the past to flash the external memory, I suspect that you have a faulty board. If you have a other board available you can try to be sure.

 

BR,

ST Employee
May 14, 2025

@Neyus, is the screen connected when you try to erase memory ?

NeyusAuthor
Associate II
May 14, 2025

@LouisB yes the screen is in its dedicated socket on the nucleo STM Board when trying to erase the memory or flash it with TouchGFX. I do not have a second screen available to test if its a faulty board.