Please note: We are aware of an issue affecting replies on the Arm Community forums, which may not be loading as expected.

We apologize for any inconvenience and appreciate your patience while we investigate and work to resolve the issue.

Thank you for your understanding.


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

about absolute address variable using"_at_"

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?

Parents
  • "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 );
    

Reply
  • "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 );
    

Children
No data