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)));
^
did you check the GCC manual if the at() attribute is supported by your compiler version?
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
it might be faster to read the manual...
True, I tried to find that at the site https://launchpad.net/gcc-arm-embedded but it is not easy to navigate! I ended up at https://gcc.gnu.org/onlinedocs/gcc-4.8.3/gcc.pdf and you pointer appears to be correct, the 'at' attribute may not be supported.
Sigh.
I will have to try
http://mcuoneclipse.com/2012/11/01/defining-variables-at-absolute-addresses-with-gcc/
instead
Thanks for your pointers, they are appreciated.
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?