Rom variables

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

Rom variables

992 Views
Caius
Contributor I
Hi,
 
I'm wondering if it is possible te create a global rom array initialized with 0xff instead of 0x00 so I don't have to erase a page in code before programming it.
 
Currently I've created a section in rom and can program variables if I init the memory with 0xFF. Since I use array, structs etc. I don't want to type =0xff every time.
 
I'm using codewarrior.
 
 
Thanks in advance.
Labels (1)
0 Kudos
1 Reply

343 Views
mjbcswitzerland
Specialist V
Hi

I expect that you can configure a section to be initialized with 0xff in the linker script (but don't know teh syntax for it).

However, if you don't create a section but instead simply don't define the area at all for use it will not be programmed and so starts with all contents as 0xff. Your code can then access it with a fixed pointer to the area you reserved.

Regards

Mark

www.uTasker.com

0 Kudos