2021-11-14 12:04 AM
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!
Solved! Go to Solution.
2021-11-14 04:04 AM
Command line would need to be expanded to list the External Loader for the QSPI memory device being used in the build.
2021-11-14 02:59 AM
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.
2021-11-14 04:04 AM
Command line would need to be expanded to list the External Loader for the QSPI memory device being used in the build.
2021-11-14 09:56 AM
Thank you, that's what I was missing. It works now