Locating varibles in flash. MC9RS08KA2

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Locating varibles in flash. MC9RS08KA2

462 Views
josep
Contributor I

hi all,

 

I´m using  MC9RS08KA2 with codewarrior  6.3. The RAM memory in MC9RS08KA2 is only 64 bytes so i need to store some only read varibles in the flash memory. how can i program it?

 

 

I have read some messages in the forum but they didn´t help  me.

 

Some body can help me?

 

Thank you very much.

Labels (1)
0 Kudos
1 Reply

162 Views
CrasyCat
Specialist III

Hello

 

To get read only variables allocated in Flash , just define them as constants with the const keyword.

 

Example

 

const int myTab[4] = {0x123, 0x4567, 0x6789, 0x89AB};

 

CrasyCat

0 Kudos