|
allocate xdata in bank x (bank switching method)Next Thread | Thread List | Previous Thread Start a Thread | Settings | Details | Message |
|---|
Read-Only Author newbie to c Posted 29-Oct-2002 07:58 Toolset C51 |  allocate xdata in bank x (bank switching method) newbie to c 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
| | Read-Only Author Jon Ward Posted 29-Oct-2002 10:36 Toolset C51 |  RE: allocate xdata in bank x (bank switching method) Jon Ward 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.
- Create some kind of data banking yourself. Of course you will have to manage it, too.
- Use the latest tools (C51 V7) which support xdata banking.
Jon | |
Next Thread | Thread List | Previous Thread Start a Thread | Settings |
|