Petter Gustad

gcc, linker script, elf, static data and FLASH

Discussion created by Petter Gustad on Mar 30, 2007
Latest reply on Apr 2, 2007 by Petter Gustad
How can I specify that static variables goes into the SRAM, but their init values goes into the FLASH so I can do a copy on boot?

If I specify that static data (.data section) should go in the FLASH it will be read-only. If I specify that the .data section should go in the SRAM I don't the init values (the latter is OK if you have something to load an ELF file into memory).