currently i am working on a self-update feature for an embedded bootloader on an ARM M4F.
What i have done:
I have a wrapper function executed from flash, which does some preperation and then calls the function which executes the self update - this is executed from RAM. At the end of the self-update i do a reset, to not use any "old code".
All working nice and fine.
What the problem is:
I would like to use functions from other .c/.h files within the function stored RAM. Now, these are stored in FLASH - so can not be used during the self-update.
I have full controll over these functions (Can change signature and implementation, but would like not to)
My Question is:
Is there an arm-gcc attribute/way to inform the compiler, that all calls within the RAM-Function have (How to check in an automated way if they are inlined at compile time?) to be inlined?
The functions called should be executed from flash when used somewhere else. So inline only in this single case.
Thank you!