2020-11-16 06:20 AM
Hello, I am building both bootloader and application firmware. Post generating .elf and hex file, I am generating .bin file for both and combining them to make single flashable .bin file with padding and all with help of command for .bin file geneation.
arm-none-eabi-objcopy "${BuildArtifactFileBaseName}.elf" App.bin -O binary
Everything works fine till I use external flash for application. When I did same work for application with external flash, I m getting below error.
arm-none-eabi-objcopy:App.bin[ExtFlashSection]: No space left on device
When I removed .bin file generation code, Everything worked fine.
I am not sure about issue. Please suggest.
Thanks
2020-11-16 06:39 AM
Suggests the memory regions used are far apart, and the resulting .BIN consequently will be very large trying to span the difference in the address space.
2020-11-16 07:05 AM
@Community member Ok , How should I solve it?
2020-11-16 07:07 AM
Basically I need one flashable file which has both bootloader and application code.
2020-11-16 07:17 AM
Well how's that going to work? Doesn't a .HEX or .ELF meet that threshold? How about a .DFU file?
You'd need a tool like FROMELF which can output two binary files, one for each section of memory involved, and not all the space in-between.
2020-11-16 07:24 AM
Suppose bootloader area is between 0x0000 to 0x4000 and Application from 0x4000 to 0xFFFF. Suppose bootloader hex is till 0x2000,So I pad from 0x2000 to 0x4000 and thn combine with application.
How should we do same with .HEX ? I have not used that way before.
2020-11-16 09:23 AM
I'm guessing that's not how this specific system is configured, show the .LD linker script, and provide details of the specific STM32 involved.
In more usual implementations the loader and application are separate/distinct. The developer would create some custom file format to encapsulate one or both of the images, as needed, and typically provide a way to secure or validate them. Perhaps look at the .DFU format, or object file formats more generally.
2020-11-16 08:51 PM