• AVR Freaks

Hot!Position variables at specific location with XC8 Compiler v2.31

Author
Derwys
New Member
  • Total Posts : 8
  • Reward points : 0
  • Joined: 2020/10/06 07:57:53
  • Location: Caracas
  • Status: offline
2020/11/26 13:01:22 (permalink)
0

Position variables at specific location with XC8 Compiler v2.31

Hello,
 
I’m using the code int Table[20] @ 0x400; to allocate an array at memory location 0x400 and compiler XC8 Ver 2.31 return an error “expected  ‘;’ after top level declarator”
 
Do you know what it means, or what’s wrong?


Thanks...
#1

4 Replies Related Threads

    dan1138
    Super Member
    • Total Posts : 4157
    • Reward points : 0
    • Joined: 2007/02/21 23:04:16
    • Location: 0
    • Status: offline
    Re: Position variables at specific location with XC8 Compiler v2.31 2020/11/26 13:31:38 (permalink)
    +2 (2)
    derwys
    I’m using the code int Table[20] @ 0x400; to allocate an array at memory location 0x400 and compiler XC8 Ver 2.31 return an error “expected  ‘;’ after top level declarator”
     
    Do you know what it means, or what’s wrong?



    The at ('@') symbol is no longer valid syntax with the XC8 v2.31 compiler.
     
    I would suggest you read the XC8 User's Guide.
     
    For most installation the PDF can be found here:
     
    <YourPathMyVary>/xc8/v2.31/docs/MPLAB_XC8_C_Compiler_User_Guide_for_PIC.pdf
    #2
    BroadwellConsultingInc
    Super Member
    • Total Posts : 97
    • Reward points : 0
    • Joined: 2020/06/09 06:07:55
    • Location: 0
    • Status: offline
    Re: Position variables at specific location with XC8 Compiler v2.31 2020/11/26 16:00:40 (permalink)
    0
    Also, once you start using the proper qualifiers, make sure you set the compiler Address Qualifiers option to "Request" or "Require".  The default is "Ignore", which will make the compiler cheerfully and without warning ignore your attempts to locate your variables.  Thanks for Ric for pointing this out to me on a prior thread.
    #3
    ric
    Super Member
    • Total Posts : 29435
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: Position variables at specific location with XC8 Compiler v2.31 2020/11/26 16:05:05 (permalink)

    I also post at: PicForum
    Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
    NEW USERS: Posting images, links and code - workaround for restrictions.
    To get a useful answer, always state which PIC you are using!
    #4
    Derwys
    New Member
    • Total Posts : 8
    • Reward points : 0
    • Joined: 2020/10/06 07:57:53
    • Location: Caracas
    • Status: offline
    Re: Position variables at specific location with XC8 Compiler v2.31 2020/11/26 22:13:24 (permalink)
    +3 (3)
    Thanks you all for your comments, I read user‘s guide and information  in your links and I could solve the issue.
     
    I replaced @ 0x400 by __at(0x400) in code line and it work perfect.
    #5
    Jump to:
    © 2021 APG vNext Commercial Version 4.5