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

Place static variable in RAM?

Hi All

If I declare a variable (or a data struct) static, the data is placed in the IRAM.
I guess the static data is moved to the IRAM before the "main" in called and probally also before the SDRAM is up running.

But is it possible to locate any static declared data to RAM instead of IRAM?

Thomas

Parents
  • I have my doubts, not aboot locating the variable, but the initialization thereof.

    I is my impression that initialization of variables take place before the external memories are enabled.

    If I'm right, then, of course you can, yourself, initialize the external memories after enableing them.

    Erik

    PS just a footnote: if there are a lot of variables to go in external RAM, I would locate them in a sparate module and use "options for file" to avoid a bunch of __attribute__((section(". .....

Reply
  • I have my doubts, not aboot locating the variable, but the initialization thereof.

    I is my impression that initialization of variables take place before the external memories are enabled.

    If I'm right, then, of course you can, yourself, initialize the external memories after enableing them.

    Erik

    PS just a footnote: if there are a lot of variables to go in external RAM, I would locate them in a sparate module and use "options for file" to avoid a bunch of __attribute__((section(". .....

Children
No data