Skip to main content
BBlad.1
Associate II
November 14, 2021
Solved

CubeProgrammer Verification failed

  • November 14, 2021
  • 2 replies
  • 1438 views

Hi,

I'm trying to upload my code to a STM32L496G-DISCO board using the stm32CubeProgrammer command line interfac, using the following python script:

 os.chdir(CUBE_PROGRAMMER_CLI_PATH)
 os.system(f"STM32_Programmer_CLI.exe -c port=swd -w {PATH_TO_ELF_FILE} -v")

Unfortunately, I keep getting "Error: Data mismatch found at address 0x90000000 (byte = 0x00 instead of 0x68)"

the PATH_TO_ELF_FILE is the path to the elf file generated by the STM32CubeIDE. I've tried both the one in the DEBUG folder and the one in the Release folder.

I'll note that when I use the one in the Release folder my project's images don't load and something is clearly wrong, while when using the one in the Debug folder everything seems fine, except for the error.

I'll also note that the same thing happens when I try to use the .hex file.

This happens when using the graphical interface as well, though not when using the 'run' in the stm32cubeide, so i'm not sure what's the difference.

Thank you!

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

Command line would need to be expanded to list the External Loader for the QSPI memory device being used in the build.​

2 replies

Uwe Bonnes
Chief
November 14, 2021

There is no internal flash at 0x90000000 where your elf file has data. Writing to internal flash should happen at 0x08000000 . So revisit your linker script. If writing at 0x90000000 is intenden, you need a flash loader for external flash.

Tesla DeLorean
Tesla DeLoreanBest answer
Guru
November 14, 2021

Command line would need to be expanded to list the External Loader for the QSPI memory device being used in the build.​

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
BBlad.1
BBlad.1Author
Associate II
November 14, 2021

Thank you, that's what I was missing. It works now