I am building a firmware updater for an STM32 MCU. I have so far programmed bootloader software on the device, separate from the main application in FLASH.
What I need to do is generate a binary file which will be the replacement code for the main application in FLASH. This means I can transfer the file over UART and overwrite the main application. How do I go about producing such a file?
The code was programmed using the stm32CubeIDE which generates an .elf file after building. I will add a header to this binary code before transmitting over UART.
Thank you very much in advance for your help,
Harry