We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hello, I have this code
#include <LPC214x.h> #include "ARM_Eprom.h" #include "ARM_IAP.h" #define IAP_LOCATION 0x7ffffff1
const unsigned char eeprom[EE_SIZE] __at EE_ADDR_L;
when i compile this, I have an error Src\ARM_Eprom.c(22): error: #65: expected a ";"
where goes this ";" ? if this is the problem..
Not enough information in your post. Are you using CARM or RealView? Click on the error message to see where the error was created. I suspect it is in one of your include files. Some of the older include files have code that is not compatible with RealView but will compile with CARM. Show the code line indicated by the error message.
http://www.keil.com/forum/docs/thread8677.asp
"where goes this ';' ? if this is the problem.."
Very often, it is not the actual problem.
Very often, the real problem is a typo or some undefined macro somewhere earlier - this causes the compiler to get confused, and the only way it can see to make sense of it is to assume that a semicolon has been missed somewhere...
Do you have any other errors or warning before this one? If you do, fix them first.
Otherwise, look carefully at the preceding lines - is everything correctly spelled? is the syntax correct? are all names (especially #defined ones) properly defined?
Check out You need Andy's Handy Hint for Debugging Preprocessor Problems:
www.8052.com/.../read.phtml
"Not enough information in your post."
True.
"Are you using CARM or RealView?"
Presumably not CARM, as the given message doesn't match the description in the CARM manual: http://www.keil.com/support/man/docs/ca/ca_c65.htm
...Not enough information in your post. Are you using CARM or RealView? ...
I'm using RealView,
"....Do you have any other errors or warning before this one? If you do, fix them first?"
No i not ave any error and my line of code are seguent:
#include <LPC214x.h> #include "ARM_Eprom.h" #include "ARM_IAP.h"
#define IAP_LOCATION 0x7ffffff1
const unsigned char eeprom[EE_SIZE] __at EE_ADDR_L ;
... function declaration...
and the error is segnalated at line const unsigned char eeprom[EE_SIZE].....
And you have verified the values of the constants EE_SIZE and EE_ADDR_L, so that they have meaningful values for use in an at declaration?
Yes,
I have tried with... const unsigned char eeprom[0x1000] __at 0x0001f000;
but i have the same error
Did you read the link posted by Patrick Noonan on 17-May-2007 at 17:49:
particularly the last two posts?
If you are using RV, it's is necessary to:
1) include absacc.h 2) put the address into parenthesis
Something like:
#include <absacc.h>
const char MyText[] __at (0x1F00) = "TEXT AT ADDRESS 0x1F00"; int x __at (0x40003000);
should work (I did it). You have this example in RV Compiler Introduction->Locate Variables to Specific Addresses.
Best regards.
wowwwwww now all work...
Thanks
So the solution was in http://www.keil.com/forum/docs/thread8677.asp all along, then?!
idioms.thefreedictionary.com/You can lead a horse to water