This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

structural data in CODE area cannot be accessed by a pointer

hi,

I have a structure and it is named OSD_STRUCTE.
I give init values for this struct and put those init values into code area to save XRAM space.


CODE OSD_STRUCT viewCtrl[] =
{
//StartROW StartCol, Flash, DH, DW, Box, Clut, FG, BG,
5, 8, 0, 1, 0, 0 , 3, 0, 1 ,
5, 8, 0, 1, 0, 0 , 3, 0, 1 ,
5, 8, 0, 1, 0, 0 , 3, 0, 1 ,
};


In my program, i use the following function to access those data.
BOOL ShowProgram(OSD_STRUCT *pCtrlInfo);

However, i found that pCtrlInfo data is not correct.
e.g. pCtrlInfo->StartRow is not 5.
Pls suggest me where should I check? Thanks a lot.

1. both defintions and function invoke are in the same bank.
2. I also define ?CO? segment correctly

0