STM32CubeProgrammer failed to download .hex after update to new version
Hello,
i use STM32CubeProgrammer for flashing devices with .hex files, but after the update from version v2.11.0 to latest v2.15.0 the downloading doesn't work (it also doesn't work with 2.14.0). The .bin download works fine in both versions.
The MCU that I use is STM32G483.
The message from log is:
12:02:17:022 : erasing sector 0027 @: 0x0800d800 done
12:02:17:022 : sending a page erase request @: 0x0800e000
12:02:17:039 : erasing sector 0028 @: 0x0800e000 done
12:02:17:039 : erase: 0675ms
12:02:17:039 : Erasing Segment <1> Address <0x0801DFE0> Size <2>Bytes
12:02:17:039 : Erasing memory corresponding to segment 1:
12:02:17:039 : Error: Sector size: 0x00000002 Bytes is out of range
12:02:17:070 : Error: failed to erase memory
The problem is with two last bytes in the hex file (these bytes store the firmware version). If they are at the end of the memory (and a different flash sector than previous bytes) the downloading fails in new version of Programmer.
If the bytes are immediately after flash region (and in the same flash sector) it works in new version of Programmer.
My question is if this is a problem with new version of CubeProgrammer or if there is mistake in my code and old CubeProgrammer ignore it.
There is also my memory definition from linker script for .hex that doesn't work with new programmer:
MEMORY
{
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K
FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 128K - 8K - 16
VERSION (r) : ORIGIN = 0x0801dfe0, LENGTH = 16 /* Reserved section for firmware version */
ROM (rwx) : ORIGIN = 0x0801e000, LENGTH = 8K /* Reserved for eeprom emulation */
}
Thanks
