Variables declared in a code(static or global) are copied to the On-Chip Flash(ROM) first along with the entire application code. Then they are inturn copied to the SRAM. Static and Global variables are assigned an address in SRAM(not Stack) whereas local variables in a function are assigned on to the stack(part of SRAM). My doubt: By declaring a variable as "const" type, does it place the variable in On-Chip Flash(ROM), so that i can save SRAM or are const data also copied to the SRAM though their value doesnt change? (LPC17xx Memory Architecture,Keil IDE to code)?
Update: const in ROM- In this link,the answer given by Mike Kleshov confirms that const data is placed in the Onchip Flash(using Keil compiler).