AnsweredAssumed Answered

Deciphering LCF and storing CONSTs in flash

Question asked by FridgeFreezer on Apr 26, 2010
Latest reply on Apr 27, 2010 by FridgeFreezer

I've been trying to read up about linker command files but there seems to be a lot of stuff out there that contradicts itself or confuses things somewhat by wanting to do more complex things. The targeting manual is less than crystal clear on the subject.

 

Basically I'm looking to store a load of initialised variables, which are constants (an array of strings for example) in flash rather than RAM. I don't need to store them in a specific place, as long as I can reference the array and use the data, eg reference the structure:

messages.[language].[message_hello_world] returns the const string "Hello world"

 

This post seems to suggest that you need to declare a CONST area of flash to make it work, other posts suggest that if you declare something CONST then the compiler will just handle it.

https://community.freescale.com/message/54826#54826

 

Can anyone tell me in simple terms if I can do as some posts seem to suggest and just declare a variable CONST and the compiler will handle it?

 

(Edited to add: This is in CW7.2 for ColdFire MCF52259)

Outcomes