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

memory class definitions.

Hi
i'm having a program for ST10 which has lots of variables defined. It works fine when I run it using MOnitor program i.e. through an external RAM. But when i change the settings to run it from flash, it is giving a warning after linking as follows:
"L5: section located outside class area."
I have changed my memory model to the largest option available, but stil the same problem.
Pls help
Regards
Sonali

Parents
  • If you are restricted to internal RAM (8KB for ST10F168, 12KB for ST10F269), you may easily run out of RAM. Check the linker listing file to see how much RAM each module consumes. There are ways to improve efficiency of use of RAM. Use as many const variables (especially arrays) as possible, reduce stack size (both system and user stack). Choosing larger memory model than you need will cause the compiler to generate less efficient code. Small memory model is fine for many applications and it is very efficient.
    Regards,
    Mike

Reply
  • If you are restricted to internal RAM (8KB for ST10F168, 12KB for ST10F269), you may easily run out of RAM. Check the linker listing file to see how much RAM each module consumes. There are ways to improve efficiency of use of RAM. Use as many const variables (especially arrays) as possible, reduce stack size (both system and user stack). Choosing larger memory model than you need will cause the compiler to generate less efficient code. Small memory model is fine for many applications and it is very efficient.
    Regards,
    Mike

Children