Hi I used to use Code vision for programing AVR micro controllers and I'm familiar with flash variables in that. All I needed to do was to declare an unsigned char variable and add a flash prefix before it. like: flash unsigned char i[]={10,20,30,40}; so the four numbers above saved in flash memory of my AVR chip. I tried to use flash prefix in keil too but it seems that flash is not a reserved word in this compiler. I need to store large amount of data in flash memory of my AT91sam7X256 chip. because I need to store a Bitmap picture and then read it and draw it on LCD whenever program starts. Can I use const reserved word for it? if not so which command will solve my problem? Thanks for your attention. Ario
I find it really hard to get answers like this from Keil's ARM documentation.
:-(
I'm not sure if it's the documentation itself, or just the search facility that is rubbish.
Anyhow, you could try making it const, then check in the Map file to see if it has actually been placed into the appropriate place...
Yes, the const modifier will normally place the variable in flash memory. That's assuming static storage duration for the variable (naturally) and more-or-less standard linker settings. It is possible to instruct the linker to place const variables in RAM, but that is rather unusual.
Thank you All guys. That helps me a lot. I will check map file, And I will check that default linker setting is to place constants in flash memory. So I think it's SOLVED.