[BUG] STM32CubeProgrammer "Error: Download verification failed" only for some specific file size.
- February 16, 2020
- 3 replies
- 2719 views
Tools used:
STM32CubeProgrammer 2.3.0.
STM32CubeIDE 1.2.1 for code generation
(gnu-arm-embedded.7-2018-q2-update.win32_1.0.0.201904081647)
I generate some simple STM32CubeIDE C project with default settings.
Build completes, but debugging throws an error during the program+verification phase with "Error: Data mismatch found at address 0x08003001 (byte = 0x18 instead of 0x00)".
Log file attached.
Same when running STM32CubeProgrammer stand-alone.
The two screen shots show the difference between .elf and flash mem at 0x08003000:


The device was completely erased beforehand.
A generated .bin file also shows 00 00 00 00 00 00 00 00 at offset 0x3000.
When I add some dummy code, the file size increases and verification passes and debugging runs without errors as expected.
