Hi All.
A bit of history first.
We wish to integrate OTA in our board.
After plugging-in some logical pieces, I have figured that we will need the following architecture ::
ROM-Bootloader (constant) LOADS ===> Custom-Flash-Bootloader CALLS ===> The "main" function of Application-Binary1 or Application-Binary2
Obviously, Custom-Flash-Bootloader and Application-Binary will be flashed by us.
Also, the logic to determine which Application-Binary to call will be present in the Custom-Flash-Bootloader.
Now, obviously we will have different linker files while building the binaries for the custom-bootloader and application-binary.
In each of the linker files, the starting-flash-address will be different for the text-segment.
My question is, do the data (SRAM) segments also need to differ?
I might point out, that from the custom-bootloader, we call the "main" of application-binary by calling the code in the following-manner ::
void (*funcptr)( void ); // Set up function pointer to application // unsigned long funcptrAddress = *((unsigned long *)<starting-address-of-app-binary>); funcptrAddress--; funcptr = (void (*)())funcptrAddress; funcptr();
Will be grateful for pointers.
Thanks and Regards,
Ajay