For a bootloader (PIC32) i do need only a certain memory area from a binary file (application for a bootloader, config and bootloader are located elsewhere, no hex possible). If i call the xc32-objcpy
on a hex or elf file it will create a 44MB binary of the whole address space.
What i need is only a certain memory area (kesg0_program_mem) where the application is located. Of course i could create the 44MB binary and then cutout a certain address range, but is there no option to directly output the area of interest? The program mempory is stricly defined:
kseg0_program_mem (rx) : ORIGIN = 0x9FC01000, LENGTH = 0xFF00-0x1000
I tried getting only the sections from the Linker file but that is tedious even with wildcards (see below, incomplete).
-I ihex -O binary -j .text -j .data -j .rodata -j .reset -j .bev_excpt -j simple_tlb_refil -j .cache_err_excpt -j app_excpt -j .vectors Test.X.production.hex Test.X.production.bin
I am open to any but it would be helpful if it can be done by the command line