Building position independent binary

Hi,

I've created a custom firmware update process on a TI TM4c1294NCPDT (Arm Cortex-m4f) and have divided the flash into 2 partitions. I'd like to be able to build one image that will work in either of the partitions but so far haven't figured out how to do this. I tried the -fPIC compiler flag but that didn't work. So far I have to create 2 separate images, 1 for each partition. For each of the 2 images I have to specify the location in memory in the linker script. Any suggestions on how it's possible to build a position independent image?

Thanks,
Doug Burrell

Parents Reply Children