how to set fixed address for variables/functions  at compiling stage in ADS?

Note: This was originally posted on 18th September 2009 at http://forums.arm.com

in ads 1.2, I set fixed address for a variable like this:

int    file_len  __attribute__((_at_(0x16000))) = 0;  

but compile error, how can i do?

thank you very much!
Parents
  • Note: This was originally posted on 18th September 2009 at http://forums.arm.com

    You can use this but you have to set the initial value manually...

    #define file_len   (*(int *)(0x00016000))


    -----ohh,thanks.
    But in my program, I need "file_len" located at 0x00016000 and occupy 4bytes memory,
    how can I do?

    best regards,
Reply
  • Note: This was originally posted on 18th September 2009 at http://forums.arm.com

    You can use this but you have to set the initial value manually...

    #define file_len   (*(int *)(0x00016000))


    -----ohh,thanks.
    But in my program, I need "file_len" located at 0x00016000 and occupy 4bytes memory,
    how can I do?

    best regards,
Children
No data
More questions in this forum