2024-07-07 11:37 PM - last edited on 2024-07-09 10:40 AM by Tesla DeLorean
within the STM32 Cube IDE After creating a hex file, I noticed that some lines had less data than others due to linker separation. How can I use the STM32 Cube IDE to add dummy bytes to the memory?
Solved! Go to Solution.
2024-07-09 10:46 AM
Or have a more sophisticated .HEX parser.
Or post-process .HEX into a more uniform/linear format suitable for the parser and the FLASH line-widths. The data from the linker can have voids, be non-linear (jump around), be sparse, etc and still be technically correct/valid.
Perhaps settings with OBJCOPY or SRECORDS to achieve formatting and padding desired.
But yes, having a binary or otherwise packaged firmware is recommended, allowing for CRC, SHA256, ECSDA signing/authentication. Perhaps compression and/or encryption to complicated reverse-engineering or attack.
2024-07-10 01:59 AM
There is no way that a file is changed by a tool! As I said before, you need to check which section ends at 0x800017C and use ALIGN to make sure it fits there!
2024-07-16 11:44 PM
Yes, it worked. Thank you.
The dummy bytes are replaced with 0xFF when >FLASH = 0xFF and with 0xFF when = 0xFF.