Poste doch bitte mal eine Programm.
hey Leute,
ich habe mir jetzt auch einen asuro gekauft,
und zusammengelötet.
Den selbsttest hat er mit bravour bestanden, also es funktioniert alles einwandfrei!
Wenn ich jetzt ein neues programm flashe, und nach dem flashen, aus und wieder einschalte, bootet er (back led´s glimmen und status led ist orange)
und danach wird die status led grün, danch passiert nichts mehr!!!
Das passiert bei jedem programm!!!!!!!
Was kann ich tun??????
Poste doch bitte mal eine Programm.
z.b.
#include “asuro.h”
int main(void) {
Init();
StatusLED(RED);
while(1);
return 0;
}
zusätzlich kommt bei obigem programm jetzt noch folgender fehler wenn ich den compiler starte:
C:\ASURO_src\FirstTry>make all
set -e; avr-gcc -MM -mmcu=atmega8 -I. -g -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-ahlms=test.lst test.c \
| sed 's,\(.*\)\.o[ :]*,\1.o \1.d : ,g' > test.d; \
[ -s test.d ] || rm -f test.d
test.c:1:10: #include expects "FILENAME" or <FILENAME>
-------- begin --------
avr-gcc --version
avr-gcc (GCC) 3.3.1
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Size before:
test.elf :
section size addr
.text 1512 0
.data 0 8388704
.bss 1 8388704
.noinit 0 8388705
.eeprom 0 8454144
.stab 3120 0
.stabstr 1698 0
Total 6331
avr-gcc -c -mmcu=atmega8 -I. -g -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-ahlms=test.lst test.c -o test.o
test.c:1:10: #include expects "FILENAME" or <FILENAME>
test.c: In function `main':
test.c:3: warning: implicit declaration of function `Init'
test.c:4: warning: implicit declaration of function `StatusLED'
test.c:4: error: `RED' undeclared (first use in this function)
test.c:4: error: (Each undeclared identifier is reported only once
test.c:4: error: for each function it appears in.)
make: *** [test.o] Error 1
> Process Exit Code: 2
Hm... dafür hab ich leider keine Lösung. Bin noch nicht solange dabei, musst du wohl leider (wie ich in meinem Thread :-D) warten
was mir aufgefallen ist: das rätselprogramm von stochri, funzt bei mir einwand frei!!
schade das ich den c code davon nicht habe, sonst könnt ich es ja mal vergleichen!
Fehler gefunden mach die " mal mit "Umschalt + 2"
ich dussel wie dumm man sein kann
aber danke für die schnelle hilfe
und wo ist hier der fehler???
#include "asuro.h"
int main(void) {
Init ()
int zaehler; // Variable für’s Zählen deklarieren
for (zaehler=0; zaehler<10; zaehler++) { // zehnmal wiederholen:
SerWrite(“Los geht’s!\n”,12); // “Los geht’s” schicken
}
MotorDir(FWD,FWD); // Beide Motoren auf vorwärts
MotorSpeed(120,120); // Beide Motoren etwa halbe Kraft voraus
while (1) { // Danach nichts mehr machen!
} }
beim compilieren kommt folgendes:
C:\ASURO_src\FirstTry>make all
set -e; avr-gcc -MM -mmcu=atmega8 -I. -g -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-ahlms=test.lst test.c \
| sed 's,\(.*\)\.o[ :]*,\1.o \1.d : ,g' > test.d; \
[ -s test.d ] || rm -f test.d
-------- begin --------
avr-gcc --version
avr-gcc (GCC) 3.3.1
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Size before:
test.elf :
section size addr
.text 1516 0
.data 0 8388704
.bss 1 8388704
.noinit 0 8388705
.eeprom 0 8454144
.stab 3132 0
.stabstr 1698 0
Total 6347
avr-gcc -c -mmcu=atmega8 -I. -g -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-ahlms=test.lst test.c -o test.o
test.c: In function `main':
test.c:4: error: parse error before "int"
test.c:5: error: `zaehler' undeclared (first use in this function)
test.c:5: error: (Each undeclared identifier is reported only once
test.c:5: error: for each function it appears in.)
test.c:6: error: stray '\223' in program
test.c:6: error: `Los' undeclared (first use in this function)
test.c:6: error: parse error before "geht"
test.c:6: error: stray '\222' in program
test.c:6: error: stray '\' in program
test.c:6: error: stray '\224' in program
test.c:11:4: warning: no newline at end of file
make: *** [test.o] Error 1
> Process Exit Code: 2
und das return(0);Code:#include "asuro.h" int main(void) { Init (); int zaehler; // Variable für’s Zählen deklarieren for (zaehler=0; zaehler<10; zaehler++) { // zehnmal wiederholen: SerWrite("Los geht’s!\n",12); // “Los geht’s” schicken } MotorDir(FWD,FWD); // Beide Motoren auf vorwärts MotorSpeed(120,120); // Beide Motoren etwa halbe Kraft voraus while (1) { // Danach nichts mehr machen! } return(0); }
Inti();
und wieder " mit Umschalt + 2...
Lesezeichen