cancel
Showing results for 
Search instead for 
Did you mean: 

CubeProgrammer Verification failed

BBlad.1
Associate II

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!

1 ACCEPTED SOLUTION

Accepted Solutions

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

View solution in original post

3 REPLIES 3
Uwe Bonnes
Principal III

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.

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

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