Relative Content

Tag Archive for interruptcortex-mposition-independent-code

Position-Indipendent FW for Cortex M

Due to a teaching requirement, I need to write a FW that can be run in RAM at non-predetermined locations.
First of all I don’t know which gcc parameters are needed, although I think it’s either -fpic or -fPIC, then I have no idea what other parameters might be needed.
The biggest problem lies in the interrupt vector. There are function pointers in it, but it is populated with absolute values, so nothing works for me.
What solution could I adopt?