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.
I am just getting started in coding the cypress FX2 in C. I was trying a very simple, port toggle example code. But I get the following error "FX2REGS.H(38): error C129: missing ';' before 'GPIF_WAVE_DATA'"
I haven't changed the FX2REGS.H, its as is from the INC folder. I searched for the error, keil online database says, it might be due to a missing ";" in the previous line. Here's the part of the code that's causing the error (line 8 here).
#ifdef ALLOCATE_EXTERN #define EXTERN #define _AT_ _at_ #else #define EXTERN extern #define _AT_ ;/ ## / #endif EXTERN xdata volatile BYTE GPIF_WAVE_DATA _AT_ 0xE400; EXTERN xdata volatile BYTE RES_WAVEDATA_END _AT_ 0xE480;
I have no idea. I am just getting started in C. You need to read a bit more before you start banging the keys. There are many good books about C, my favorite is Kochan: programming in ANSI C
If, as you say, you are just getting started in C, get your feet wet writing code for the PC and then, when you have the basics down pat, have a go at the micros
Erik
Let me rephrase: I am getting started in embedded C. I am in no way an expert on C. But I have coded in C on PC, not Microcontrollers. All my uC was in assembly.