May 2018
Intermediate to advanced
324 pages
8h 45m
English
Since the two executables will be built in separate .elf files, there are mechanisms to join the content of the two partitions together into a single image, to upload to the target or to use in the emulator. The bootloader partition can be filled with zeros upto its size by using the --pad-to option of objcopy when converting from the .elf executable to the binary image. Wearing the flash can be reduced by using the value 0xFF to fill the padding area, which can be obtained by passing the option --gap-fill=0xFF. The resultant bootloader.bin will be exactly 4096 bytes, so that application image can be concatenated at the end of it. The steps to compose an image containing the two partitions are the following:
$ arm-none-eabi-objcopy ...Read now
Unlock full access