Rom variables

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Rom variables

1,006件の閲覧回数
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.
ラベル(1)
0 件の賞賛
1 返信

357件の閲覧回数
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 件の賞賛