What that other device is would be up to you/your application.Ĭode: typedef struct Obviously replace printf() with the actual data extraction and programming functions. Of course if you don't have enough memory available to hold an entire binary image+header in addition to the installed software-whether in some sort of on-chip/soldered-on storage or a removable memory card or USB drive-then you'll need to drip-feed the binary to the bootloader from some other device.
#PROJECT M BOOT.ELF HOW TO OPEN UPDATE#
There are even tools to script the parsing of source files, so you can do things like extract version information or other metadata from the application files and put that into the update package for easy automated deployment. Easy enough to create a script to build all of that into an update package. You'll want to provide at least a length for it and maybe some other metadata so it's probably a good idea to define some sort of header the bootloader can inspect, and a checksum or cryptographic signature would be a really good idea. You can certainly use objcopy to create a binary of the application and hand that off to a bootloader for installation. The program will never have discontinuous text or data sections, and AFAIK data always follows text. I am trying to work out how to generate a single binary block. IOW, same as what you would need to generate for a boot loader which just takes a binary block and programs the CPU FLASH with it. So the stuff loaded into the CPU must be just the binary block comprising of the sections 'text' and 'data'. Also, AIUI, for single stepping, you need to have a symbol table "somewhere" and it can't be in the CPU FLASH because a 1MB binary could be several MB with symbols. So whatever is managing this process must be generating multiple binary blocks and programming these individually. But there must be a way to specify gaps otherwise if you generated some text for bottom 100k and then top 40k, you would end up with a 1MB binary block, mostly empty. It must be just programming the stuff straight in, 0x08000000 onwards. Does the IDE just feed a binary block to the debugger, to program the FLASH with? The debugger has very little storage it in. Let's say you are programming a 32F4 within Cube IDE, using STLINK V2/V3. For example arm-none-eabi-objcopy can generate the binary. Quote from: peter-h on July 29, 2021, 08:46:00 pm There is a lot of stuff online for ELF to BIN etc.
There is a lot of stuff online for ELF to BIN etc.