Forum: Mikrocontroller und Digitale Elektronik WinARM + Ethernut + AT91SAM7x256 Problem


von Lucien (Gast)


Lesenswert?

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

von holger (Gast)


Lesenswert?

>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

von Lucien (Gast)


Lesenswert?

Danke schön,

es funktioniert anscheinend nur wenn at91sam7x256.h als erstes 
includiert wird. Es wird auf jeden Fall fehlerfrei kompiliert...

Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.