How do I compile and execute relocatable code on an ARM Cortex M0 chip using Keil? Which are the places that I change the address? Please point me towards more information. The normal code I have runs well without making it relacatable. So far I've made the following changes: In "Options for Target": 1)In the "Target" tab, modified the IROM1 starting address from 0 to 0x8000. 2)In the "C/C++" tab, checked the "Read-only Position Independent" box. 3)In the "Linker" tab, checked the Make RW Sections Position Independent" box. The "R/O Base" is set at 0x00000000 by default and not able to modify it. The code builds well but the code does not execute.
My Final Objective is as follows: The code reads a file (bin or hex) in the external flash and writes it into the on-chip flash. The on-chip flash should always have 2 codes on it but only the latest will be run. This will allow me to check if the code was written correctly on the on-chip flash. If not then I can revert to the earlier code. Thanks