This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Position Indepedent Startup Function

Hi

I want to create a position independent application in Keil for an EFM32 device (Cortex-M3). The application should be loaded by a bootloader. I use the ROPI option when compiling the C-code and the bootloader takes care of updating the interrupt vectors.

The problem I have is that the startup code (__main) still seems to use fixed addressing. Is there a way to make __main position independent or is there another startup function I can use?

Best regards
Filip

Parents
  • Aren't all the vectors pointing to absolute/fixed addresses? So no relative/address-independence there.

    Put the address of main() or __main() or whatever in you vector table, and jump to that, if you're got that issue solved.

Reply
  • Aren't all the vectors pointing to absolute/fixed addresses? So no relative/address-independence there.

    Put the address of main() or __main() or whatever in you vector table, and jump to that, if you're got that issue solved.

Children