How do I execute a function from RAM on a Cortex-M3 (STM32)?

前端 未结 4 1302
半阙折子戏
半阙折子戏 2021-01-02 17:32

I\'m trying to execute a function from RAM on a Cortex-M3 processor (STM32). The function erases the and rewrites the internal flash, so i definitely needs to be in RAM but

4条回答
  •  感动是毒
    2021-01-02 17:46

    With the IAR compiler (I know your question is about Keil but I don't have it to play with) you can mark either the whole project or an individual file to be "position independent". From using this in the past with other processors it means you can move it "anywhere" and it will still work ok

提交回复
热议问题