2021-08-09 10:35 PM
I am trying to develop a boot-loader for STM32H7xx micro-controller. For that i need a hex file of my program, i am using STM32CUBEIDE for that but the problem is that my generated hex file length is not same some line is short but i need fixed length hex file for my boot-loader.
How can i create fixed length hex file using stm32cubeide .
2021-08-10 06:17 AM
You can use command line options to achieve this.
In case the link breaks in the future, something like:
arm-none-eabi-objcopy --verbose -S -O binary --gap-fill 0xFF --pad-to 0x08020000 "project.elf" "project.bin"
2021-08-10 06:46 AM
Perhaps code the loader more robustly, or pre-process the .HEX on the PC side to get it into a normalized/simplified form your loader can digest. Or package it as a binary, with size and signing data to validate its integrity.