Datum: 07.05.2008 18:42
Hallo,
ich habe folgendes Problem mit der AT91SAM7x256.h Headerdatei:
Ich kompiliere die um die Headerdatei erweitertete Beispieldatei
simple.c durch Eingabe von make:
#include <compiler.h>
#include "at91sam7x256.h"
/*!
* \brief Main application routine.
*
*/
int main(void)
{
for (;;);
}
Und bekomme dann folgende Fehlermeldung:
C:\ethernut-4.4.1\nutapp\simple>make
arm-elf-gcc -c -mcpu=arm7tdmi -Os -mthumb-interwork -fomit-frame-pointer
-Wall -
Wstrict-prototypes -fverbose-asm -Wa,-ahlms=simple.lst -DAT91SAM7X_EK
-I../../nu
tbld/include -I../../nut/include simple.c -o simple.o
In file included from simple.c:64:
at91sam7x256.h:57: error: expected identifier or '(' before numeric
constant
at91sam7x256.h:58: error: expected ';' before 'AT91_REG'
at91sam7x256.h:220: error: expected identifier or '(' before numeric
constant
at91sam7x256.h:221: error: expected ';' before 'AT91_REG'
at91sam7x256.h:285: error: expected identifier or '(' before numeric
constant
at91sam7x256.h:286: error: expected ';' before 'AT91_REG'
at91sam7x256.h:397: error: expected identifier or '(' before numeric
constant
at91sam7x256.h:398: error: expected ';' before 'AT91_REG'
at91sam7x256.h:430: error: expected identifier or '(' before numeric
constant
at91sam7x256.h:431: error: expected ';' before 'AT91_REG'
at91sam7x256.h:605: error: expected identifier or '(' before numeric
constant
at91sam7x256.h:606: error: expected ';' before 'AT91_REG'
at91sam7x256.h:862: error: expected identifier or '(' before numeric
constant
at91sam7x256.h:863: error: expected ';' before 'AT91_REG'
at91sam7x256.h:966: error: expected identifier or '(' before numeric
constant
at91sam7x256.h:967: error: expected ';' before 'AT91_REG'
at91sam7x256.h:1079: error: expected identifier or '(' before numeric
constant
at91sam7x256.h:1080: error: expected ';' before 'AT91_REG'
at91sam7x256.h:1468: error: expected identifier or '(' before numeric
constant
at91sam7x256.h:1469: error: expected ';' before 'AT91_REG'
make: *** [simple.o] Error 1
C:\ethernut-4.4.1\nutapp\simple>
Hatte jemand zufällig schon mal diesen Fehler und kann mir sagen wie der
einfach zu beheben ist?
Beste Grüße,
Lucien
Datum: 07.05.2008 18:47
>Und bekomme dann folgende Fehlermeldung: >tbld/include -I../../nut/include simple.c -o simple.o >In file included from simple.c:64: >at91sam7x256.h:57: error: expected identifier or '(' before numeric >constant Solche Fehlermeldungen bekommt man wenn eine Include Datei vorher Fehler enthalten sind. Also schau mal in compiler.h
Datum: 07.05.2008 18:54
Danke schön, es funktioniert anscheinend nur wenn at91sam7x256.h als erstes includiert wird. Es wird auf jeden Fall fehlerfrei kompiliert...
Antwort schreiben
Die Angabe einer Email-Adresse ist freiwillig. Wenn Sie automatisch per Email über Antworten auf Ihren Beitrag informiert werden möchten, melden Sie sich bitte an.
Wichtige Regeln - erst lesen, dann posten!
- Suchfunktion und Betreffsuche benutzen - vielleicht gibt es schon einen ähnlichen Beitrag
- Aussagekräftigen Betreff wählen
- Im Betreff angeben um welchen Controllertyp es geht (AVR, PIC, ...)
- Groß- und Kleinschreibung verwenden
- Längeren Sourcecode nicht im Text einfügen, sondern als Dateianhang
- JPEG-Dateien (.jpg) nur für Fotos und Scans verwenden
- Schaltpläne, Screenshots usw. als PNG oder GIF anhängen
Formatierung (mehr Informationen...)
- [c]C-Code[/c]
- [avrasm]AVR-Assembler-Code[/avrasm]
- [pre]vorformatierter Text (z.B. Code in anderen Sprachen)[/pre]
- [math]Formel in LaTeX-Syntax[/math]
- [[Titel]] - Link zu Artikel