I am completing my first AVR GCC project; a small circuit to communicate with the COMM port of my Casio calculator :lol:
Anyway, my C code compiles fine in Dev-C++ (XP), and in plain gcc (Linux). However, AVR Studio gives the following error:
avr-gcc.exe -mmcu=atmega16 -Wall -gdwarf-2 -O0 -MD -MP -MT test.o -MF dep/test.o.d -c ../test.c ../test.c: In function 'main': ../test.c:222: error: expected declaration or statement at end of input make: *** [test.o] Error 1 Build failed with 1 errors and 0 warnings...
What does that mean; there seems to me to be nothing wicked going on in line 222, the end of the code...? Here's a snip from the attached source file:
...snip... checksum = 0x3A - checksum; //checksum = 0xFF ^ checksum; //checksum += 0x01; /* printf("\nNegated checksum is %x (%x)\n", checksum, den[len-1]); if (checksum == den[len-1]) printf("\033[32mEqual!"); else printf("\033[31mNot equal..."); printf("\033[0m\n\n"); */ }
Perhaps someone would try compiling it on their PC? I have attached the file (test.c) to this post, perhaps someone can spot a syntax error?