Skip to main content
BBlad.1
Associate II
Nov 14, 2021 8:04 AM UTC
Solved

CubeProgrammer Verification failed

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.
Tesla DeLorean
Tesla DeLoreanBest answer
Guru
Nov 14, 2021 12:04 PM UTC

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 Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..

3 replies

Uwe Bonnes
Chief
Nov 14, 2021 10:59 AM UTC

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
Nov 14, 2021 12:04 PM UTC

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 Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
BBlad.1
BBlad.1Author
Associate II
Nov 14, 2021 5:56 PM UTC

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