Hi,
in S08,I can use @ to define address of variable.But in kinetis,it doesn't work.
so how to define address of variable in rom?
Solved! Go to Solution.
Hi Monica,
I have resolve my question through Defining Variables at Absolute Addresses with gcc | MCU on Eclipse
I don't know if you want to allocate a specific address for the variable, or simply put it anywhere inside the ROM area. If your case is the latest, you may simply delcare the variable as CONST (use "const" keyword before declaring variable type). Usually, variables that cannot be changed are placed inside FLASH area. I think it is worth a try.
Hello Wang,
did that help on clearing out your doubts?
Please keep us posted :smileywink:
Best,
Monica.
Hi Monica,
I have resolve my question through Defining Variables at Absolute Addresses with gcc | MCU on Eclipse
Thanks for sharing, Wang!
Monica.
Hello,
this should give you an idea if you are using GNU (which I assume?):
Defining Variables at Absolute Addresses with gcc | MCU on Eclipse