cancel
Showing results for 
Search instead for 
Did you mean: 

U575ZI-Q dev board + RVA35HI display touchgfx error: failed to flash memory

CharanVis
Associate II

I've been trying to get the TouchGFX Project work for the above configuration. I have followed the following steps:

1) Choose the demo project for the setup mentioned
2) Generate code
3) Open the project in STM32CubeIDE
4) Build Project
5) Add the generated external loader under the ExternalLoader folder for the STM32CubeProgrammer.
6) Restart the application and "Program and Run Target"

After step 6, I get the following error

Program and Run Target
    Generate
        Done
    Generate Assets
        make -f simulator/gcc/Makefile assets -j8
        Reading ./application.config
        Reading ./target.config
        Done
    Post Generate
        touchgfx update_project --project-file=simulator/msvs/Application.vcxproj
        Done
    Post Generate Target
        touchgfx update_project
        .cproject file: ../STM32CubeIDE/.cproject
        Writing STM32CubeIDE project file: ../STM32CubeIDE/.project
        Writing STM32CubeIDE project file: ../STM32CubeIDE/.cproject
        Done
    Compile
        make -f ../gcc/Makefile -j8
        Reading TouchGFX/application.config
        Reading TouchGFX/target.config
        Linking TouchGFX/build/bin/target.elf
        Producing additional output formats...
          target.hex   - Combined internal+external hex
          intflash.elf - Internal flash, elf debug
          intflash.hex - Internal flash, hex
        Done
    Flash
        make -f ../gcc/Makefile flash
        Reading TouchGFX/application.config
        Reading TouchGFX/target.config
        Linking TouchGFX/build/bin/target.elf
        Producing additional output formats...
          target.hex   - Combined internal+external hex
          intflash.elf - Internal flash, elf debug
          intflash.hex - Internal flash, hex
              -------------------------------------------------------------------
                               STM32CubeProgrammer v2.18.0                  
              -------------------------------------------------------------------
        
        ST-LINK SN  : 002E002E3133510F35333335
        ST-LINK FW  : V3J15M7
        Board       : NUCLEO-U575ZI-Q
        Voltage     : 3.28V
        SWD freq    : 8000 KHz
        Connect mode: Normal
        Reset mode  : Software reset
        Device ID   : 0x482
        Revision ID : Rev X
        Device name : STM32U575/STM32U585
        Flash size  : 2 MBytes
        Device type : MCU
        Device CPU  : Cortex-M33
        BL Version  : 0x92
        Debug in Low Power mode enabled
        
              -------------------------------------------------------------------
                Choose flashing speed for Cortex M33 series.(default speed=Reliable)                  
              -------------------------------------------------------------------
        
        Opening and parsing file: target.hex
        
        
        Memory Programming ...
          File          : target.hex
          Size          : 4.90 MB 
          Address       : 0x08000000 
        
        
        Erasing memory corresponding to segment 0:
        Erasing internal memory sectors [0 35]
        Erasing memory corresponding to segment 1:
        Erasing external memory sectors [0 1185]
        Error: failed to erase memory
        
        
        Error: failed to erase memory
        c:/TouchGFXProjects/Demo_Example_U575/gcc/include/flash_sections_int_ext.mk:5: recipe for target '_extflash_' failed
        make[1]: *** [_extflash_] Error 1
        make: *** [flash] Error 2
        ../gcc/Makefile:52: recipe for target 'flash' failed
        Failed
    Failed

 
I have also tried to run the project via STM32CubeIDE

Here are my run configurations for the same:

CharanVis_0-1733113108182.png

 

CharanVis_2-1733113193811.png


This is the error I am getting for STM32CubeIDE:

CharanVis_3-1733113237507.png

STMicroelectronics ST-LINK GDB server. Version 7.9.0
Copyright (c) 2024, STMicroelectronics. All rights reserved.

Starting server with the following options:
        Persistent Mode            : Disabled
        Logging Level              : 1
        Listen Port Number         : 61234
        Status Refresh Delay       : 15s
        Verbose Mode               : Disabled
        SWD Debug                  : Enabled
        InitWhile                  : Enabled

Waiting for debugger connection...
Debugger connected
Waiting for debugger connection...
Debugger connected
Waiting for debugger connection...
      -------------------------------------------------------------------
                       STM32CubeProgrammer v2.18.0                  
      -------------------------------------------------------------------



Log output file:   C:\Users\CVISWA~1\AppData\Local\Temp\STM32CubeProgrammer_a11664.log
ST-LINK SN  : 002E002E3133510F35333335
ST-LINK FW  : V3J15M7
Board       : NUCLEO-U575ZI-Q
Voltage     : 3.28V
SWD freq    : 8000 KHz
Connect mode: Under Reset
Reset mode  : Hardware reset
Device ID   : 0x482
Revision ID : Rev X
Device name : STM32U575/STM32U585
Flash size  : 2 MBytes
Device type : MCU
Device CPU  : Cortex-M33
BL Version  : 0x92
Debug in Low Power mode enabled

      -------------------------------------------------------------------
        Choose flashing speed for Cortex M33 series.(default speed=Reliable)                  
      -------------------------------------------------------------------

Opening and parsing file: ST-LINK_GDB_server_a11664.srec


Memory Programming ...
  File          : ST-LINK_GDB_server_a11664.srec
  Size          : 4.90 MB 
  Address       : 0x08000000 


Erasing memory corresponding to segment 0:
Erasing internal memory sectors [0 34]
Erasing memory corresponding to segment 1:
Erasing external memory sectors [0 1185]
Error: failed to erase memory


Error: failed to erase memory
Encountered Error when opening C:\ST\STM32CubeIDE_1.17.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.win32_2.2.0.202409170845\tools\bin\STM32_Programmer_CLI.exe
Error in STM32CubeProgrammer
Shutting down...
Exit.


I have also tried directly programming using STM32CubeProgrammer (made sure to select the same loader as before), however I get the same error as before which is:

  17:23:05 : Opening and parsing file: STM32U575ZI_NUCLEO_RVA35HI.elf
  17:23:05 : Memory Programming ...
  17:23:05 :   File          : STM32U575ZI_NUCLEO_RVA35HI.elf
  17:23:05 :   Size          : 4.90 MB 
  17:23:05 :   Address       : 0x08000000 
  17:23:05 : Erasing memory corresponding to segment 0:
  17:23:05 : Erasing internal memory sectors [0 34]
  17:23:05 : Erasing memory corresponding to segment 1:
  17:23:06 : Erasing external memory sectors [0 1185]
  17:23:11 : Error: failed to erase memory
  17:23:11 : Error: failed to erase memory


Could I get some guidance regarding this? I will also attach the ZIP file for the project

 

 




0 REPLIES 0