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

How to load and execute from RAM in arm Keil

Hi

I'm working with the TLE9879 evalkit and ARM Keil uVision5. I'm trying to load and run my entire application from RAM, but I'm unsure about the setup process.

Could anyone share some guidance or steps on how to configure ARM Keil uVision5 for loading and executing applications in RAM on the TLE9879 evalkit? Any insights or examples would be a big help.

Mario

Parents
  • This is possible, but I think it only makes sense in very rare cases. Could you please explain?

    Please remember, that this device has only 5 kB RAM and 128 kB Flash. An application usually needs a stack, has global variables, and has executable code. I doubt that you want to squeeze all this into 5K?

    Sometimes it is necessary to execute code from RAM for example for in-system Flash programming. In this case, you would relocate only dedicated functions into RAM. There are devices on the market that have a big (on- or off-chip) RAM, but a slow external (maybe SPI) Flash connected. In this case, it can make sense to copy the complete application into RAM to execute it from there with max. speed. In this case, the application would always execute from RAM, even when you are not debugging.

    What is your motivation to do this? Executing the code from Flash will probably be faster than from RAM, so what would be the benefit?

Reply
  • This is possible, but I think it only makes sense in very rare cases. Could you please explain?

    Please remember, that this device has only 5 kB RAM and 128 kB Flash. An application usually needs a stack, has global variables, and has executable code. I doubt that you want to squeeze all this into 5K?

    Sometimes it is necessary to execute code from RAM for example for in-system Flash programming. In this case, you would relocate only dedicated functions into RAM. There are devices on the market that have a big (on- or off-chip) RAM, but a slow external (maybe SPI) Flash connected. In this case, it can make sense to copy the complete application into RAM to execute it from there with max. speed. In this case, the application would always execute from RAM, even when you are not debugging.

    What is your motivation to do this? Executing the code from Flash will probably be faster than from RAM, so what would be the benefit?

Children