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.
hi, is it possible to define a global (extern) structure in xdata memory i.e. bank 4 only ? i want to use the whole xdata ram (except common area) for this struct. i don't want to define a local struct in a function which is placed in bank 4. environment: C51 v5.50, bl51 v3.70e
The code banking support that is provided in C51 V5 performs CODE banking--not XDATA banking. So, the answer to your question is, no, since code and xdata are separate memory areas on the 8051. If your struct is really a constant structure, then you can locate it in CODE space and put it in code bank 4 easily enough. If your structure must be in RAM and if you require more than 64K of XDATA then you have several options.