I'm using the uvision and I want to define a variable at a specific address.
I figured out that it should work like
int main(void) { int var __attribute__((__at(0x40001000))) = 20; }
but I always get the error message "expected an attribute name".
www.keil.com/.../armccref_ch04s05s02.htm
best regards Alan Scott
I'm not sure what you mean. I include absacc.h which which consists of the #define __at(addr) definition (if __at is not already defined).
Maybe you could show me a small example (how __at will work in uvision).
Hello Alan Scott,
You can not use __at with a variable which is located on the stack. Use it with a global variable.
int var __at(0x40001000) = 20; int main(void) { // ... }
Best Regards, Martin Guenther
thanks for your answer. Now the short example works.