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

allocate xdata in bank x (bank switching method)

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

Parents
  • 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.


    1. 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

Reply
  • 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.


    1. 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

Children
No data