fl0rin
Newbie level 1
array fixed address
Hi everyone,
I am using Microchip PIC16F876 uC and the Hi-Tech PICC compiler in a project. I need a way to store an array in the code memory at an absolute address. Now I know this could be done using @ operator, but it seems it doesn't to work with arrays which are also initialized when declared. To be more specific:
// this is an initialized arrray stored in code memory
const unsigned char const array[5] = {0x00, 0x11, 0x22, 0x33, 0x44};
// here's what I need, but it's not supported
const unsigned char const array[5] @ 0x1E00 = {0x00, 0x11, 0x22, 0x33, 0x44};
Any suggestion will be appreciated. Thanks.
Hi everyone,
I am using Microchip PIC16F876 uC and the Hi-Tech PICC compiler in a project. I need a way to store an array in the code memory at an absolute address. Now I know this could be done using @ operator, but it seems it doesn't to work with arrays which are also initialized when declared. To be more specific:
// this is an initialized arrray stored in code memory
const unsigned char const array[5] = {0x00, 0x11, 0x22, 0x33, 0x44};
// here's what I need, but it's not supported
const unsigned char const array[5] @ 0x1E00 = {0x00, 0x11, 0x22, 0x33, 0x44};
Any suggestion will be appreciated. Thanks.