We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
How to define the following constant to an absolute address at 0x1000?
unsigned char code index[] = { 0x3, 0x5, 0x6 } ; //a constant mem in a file
Create a separate source file for your array, for example "myarray.c". Under the "LX51 Locate" tab in the target options dialog put "?CO?MYARRAY(C:0x1234)" in the "User segments" box. Substitute your desired address where I put "0x1234". It's a real pity one can't just use the _at_ keyword with initialisers, isn't it? Stefan
Thanks, Stefan, it is working!