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

Handling DPP register for variables in different classes

Hi All,

I would like to know, How to handle DPP register for variables in different segments.

For Example

Assume that, I have defined class section as

NCODE(0xC00000 - 0xC0FFFF),
NCONST(0xC0000 - 0xC007FF),
NDATA(0xCOOO - 0xFDFF),
IDATA(0XE00000 - 0xE007FF),
SDATA(0XE00000 - 0xE007FF)
Memory model used is Small

char idata a;
char b;

Variable a is placed in IDATA segment and Variable b is Placed in NDATA segment.

when i try to use both variable are using
(For example b = a;) the same DPP register
is used for assing both variables.
some data from segment NDATA and copy it into variable 'b'.

How can i configure the DPP register for NDATA and IDATA.

Thanks in Advance

With Regards
Ashok kumar p

  • I don't think that you can place IDATA and SDATA to 0xE00000. 0xE00000 - 0xE007FF is occupied by the PSRAM. This memory (Program / Data SRAM) must clearly be distinguished from the internal RAM - access to it is also slightly slower than to the internal RAM. You could define

    NCODE(0xC00000 - 0xC0FFFF),
    NCONST(0xC0000 - 0xC007FF),
    NDATA(0xCOOO - 0xFDFF),
    IDATA(0xCOOO - 0xFDFF),
    SDATA(0xCOOO - 0xFDFF),
    FDATA(0XE00000 - 0xE007FF),
    HDATA(0XE00000 - 0xE007FF)
    
    and thus
    char idata a;
    char b;
    char huge c;
    
    a = b; // should now work
    b = c; // should also work