cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeProgrammer fails to program an STM32H7B3I-DK

CTapp.1
Senior

I have a Touch-GFX project that I can program into an STM32H7B3I-DK from within the STM32CubeIDE.

However, trying to program the same board with the project's .elf file from STM32CubeProgrammer fails with:

16:20:21 : Memory Programming ...
  16:20:21 :   File          : STM32H7B3I-DK.elf
  16:20:21 :   Size          : 1.36 MB 
  16:20:21 :   Address       : 0x08000000 
  16:20:21 : Erasing memory corresponding to segment 0:
  16:20:21 : Erasing internal memory sectors [0 51]
  16:20:21 : Erasing memory corresponding to segment 2:
  16:20:21 : Download in Progress:
  16:20:22 : Error: failed to download Segment[2]
  16:20:22 : Error: failed to download the File

Running at Verbosity Level 3 doesn't add much:

16:21:10:229 : Segment[0] downloaded successfully
  16:21:10:229 :   Size          : 1013268 Bytes
  16:21:10:229 :   Address       : 0x90000000 
  16:21:10:229 : Buffer program...
  16:21:10:230 : w ap 0 @0x90000000 : 0x000F7614 bytes, Data 0xE708F0F8...
  16:21:10:230 : Error: failed to download Segment[2]
  16:21:10:230 : Error: failed to download the File
  16:21:10:254 : r ap 0 @0x1FF13FFE 0x00000001 bytes Data 0xFFFFFF92 <-- this line repeats forever

I am using V2.18.0 of the programmer.

Any idea what's causing this?

I need to get the programmer working as people who only need to update the firmware will be using it, and they don't want to have to learn how to use the full IDE.

1 ACCEPTED SOLUTION

Accepted Solutions
CTapp.1
Senior

The MX25LM51245G_STM32H7B3I-DISCO External Loader is needed to program the system.

It was appearing to work as the erase did not erase the external NOR FLASH, so only the MCU needed to be programmed to get it running (though probably not if the code had changed).

 

View solution in original post

2 REPLIES 2
CTapp.1
Senior

Strangely, it appears as if the programming may actually have worked, even though it is reported as having failed!

The application appears to work correctly if I disconnect the programmer or set it to "Run after programming". I have verified it is programming something by executing a full erase before trying to program to make sure the system would be erased if the programming failed.

CTapp.1
Senior

The MX25LM51245G_STM32H7B3I-DISCO External Loader is needed to program the system.

It was appearing to work as the erase did not erase the external NOR FLASH, so only the MCU needed to be programmed to get it running (though probably not if the code had changed).