Forum : 8051
Original Post
Post Information | Post |
---|---|
August 8, 2007 - 8:47pm
|
hello, I am getting an Error C165 when I try to declare any variable as absolutely allocated. I would like to locate the following array at the end of ROM in a SiLabs C8051F320 uC. at 0x3DFA unsigned char SW_Ver_ROM[] = Thanks for your help. |
Hi Greg, please try this :
You don't speficy the memory space where to place your variable. If your memory model is small or tiny, (small is by default), then the default memory space for variables is DATA. And 0x3DFA is an out-of-bounds address for the DATA space... It could work with XDATA or CODE, and in your case, it seems you want to place it in code. So just specify it !
regards
Lionel
Try:
unsigned char code at 0x3DFA etc.
Better still, locate your array at 0x3DF9, because otherwise the last byte will be written in the location of the Flash Lock Byte. You don't want to do that :-)
Rob.
[edit]tags![/edit]
Thanks for the help, it worked just as it should.
Greg