Announcement

Collapse
No announcement yet.

Storing C global constants in flash

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Storing C global constants in flash

    I've been working with SNAPbuild and C Language support and a question about Flash (ROM) memory. Is there a way to force a constant variable to be stored in Flash? Right now I have a lookup table that needlessly appears to be taking up RAM memory.

    From IAR:
    538 bytes of CODE memory (+ 7 bytes shared)
    512 bytes of DATA memory
    Since I have a 512 byte table in that file, its being stored in DATA memory which I assume is RAM.

  • #2
    Found it. Answer was the adding the __flash keyword.

    Comment

    Working...
    X