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.
when I define a variable like next: uchar idata M_TVar _at_ 0x80; I got a warning: *** WARNING L4: DATA SPACE MEMORY OVERLAP FROM: 0000H TO: 0001H
the next is in .M51 file:
* * * * * * * D A T A M E M O R Y * * * * * * * IDATA 0000H 0001H ABSOLUTE * OVERLAP * IDATA 0000H 0001H ABSOLUTE * OVERLAP * REG 0000H 0008H ABSOLUTE "REG BANK 0" DATA 0008H 0040H UNIT ?DT?MAIN
how i fix it?
"but I don't know why"
The _at_ is only meaningful on a definition - not in a declaration
ie, _at_ doesn't make sense with extern!
You need something like
#ifdef DEFINE_GLOBAL // Make a definition #define EXT_ABS(name,loc) uchar idata name _at_ loc #else // Make an extern declaration #define EXT_ABS(name,loc) extern uchar idata name #else EXT_ABS( M_TVar, 0x80 );