programming a cortex-m0+ (STM32L073RB) device with a hex-file that uses not the whole memory or has leaks leads to wrong initial byte in flash memory of device
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-04-28 1:44 AM
Hi everybody,
I use the STM32CubeProgrammer version 2.3.0
Following issue occurs during programming of a hex-file:
1.) do a mass-erase or a clear of all sectors of the device
2.) read out some bytes (for example the first sector)
3.) the device-memory tab shows "00" for every byte (and the whole flash)
4.) load a hex-file which has wholes or gaps in the addresses
For example like this:
:020000040800F2
:10000000005000208909000819050008190500089A
:180028000000000019050008000000000000000019050008190500084E
5.) The new hex-file tab shows that the gap from address 0x0800 0010 till 0x0800 0028 will be filled with 0xFF and not with the processor specific "unused/unprogrammed byte" which has to be 0x00.
6.) programming the device and read out the first 40 bytes leads to this screen
The gaps from the hex-file are actually filled with 0xFF which is wrong from my point of view.
The old STVP don't fill the address gaps with the wrong initial byte. It fills the gaps with the correct device depending initial flash byte value.
You can see this by loading for example an STM32L0-device, where the initial state of all flash bytes should be 00 or by loading a STM32F0-device, where all bytes have to be 0xFF in the initial state.
STM32L0-device empty
STM32L0-device with loaded hex-snippet
STM32F0-device empty
STM32F0-device with loaded hex-snippet
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-05-02 3:18 PM
Hi @BNest.1​ ,
Issue is reproduced at my end .
Thanks for rising this issue it will be fixed in next CubeProgrammer release.
regards,
Houda
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-04-28 1:50 AM
Probably the St programmer uses 0xff as default and does not notice that some devices use 0 as default.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-04-28 1:53 AM
Yes thats the case! Currently I use te ST Link V3 and use the CLI of STM32CubeProgrammer to programm my devices. But with that issue I cannot use it anymore.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-04-28 12:45 PM
Fill the gaps, then, explicitly (e.g. using srecord), as a post-compilation step, before moving to the programming.
JW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-05-02 3:18 PM
Hi @BNest.1​ ,
Issue is reproduced at my end .
Thanks for rising this issue it will be fixed in next CubeProgrammer release.
regards,
Houda
