Menu

#72 Unable to use the __attribute__ and 'at' directives

Version 1.x
closed
None
2
2014-10-12
2014-09-15
No

plugin version: 1
eclipse: Kepler 20140224-0627
java: 1.6.0_54
OS: OSX 10.9.4
toolchain: 1.10.2.201407190854

I am trying to force a variable to be at a fixed RAM location on a Cortex M3 (in this case, a Silcon Labs EFM32LG330F256).

In my code I have declared my variable as:
uint32_t fingerprint __attribute__((at(0x20008c48)));

but the compiler gives:

../include/fingerprint.h:22:1: warning: 'at' attribute directive ignored [-Wattributes]
uint32_t fingerprint __attribute__((at(0x20008c48)));
^

Discussion

  • Liviu Ionescu (ilg)

    did you check the GCC manual if the at() attribute is supported by your compiler version?

     
  • Douglas Pearless

    Wow that was a fast response.
    You are correct, I realised that I have posted the question to your plugin development and not the toolchain one per se, I will ask them instead.
    :-)
    Cheers
    Douglas

     
  • Liviu Ionescu (ilg)

    I will ask them instead.

    it might be faster to read the manual...

     
  • Liviu Ionescu (ilg)

    two comments:

    • on my Mac, the official install folder for GCC, contains all PDF docs (/usr/local/gcc-arm-none-eabi-4_8-2013q4/share/doc/gcc-arm-none-eabi/pdf), no need to chase them online

    • as for the fixed address, I don't know why you need it, sounds like a bad idea anyway, but if you insist, what about defining a pointer to it and initialising the pointer with the desired address?

     
  • Liviu Ionescu (ilg)

    • status: open --> closed
     
Auth0 Logo