It is currently Thu Jun 20, 2013 4:59 am
       


All times are UTC + 1 hour




Post new topic Reply to topic  [ 40 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
 Post subject: Re: Asuro Programme flashen
PostPosted: Sun Feb 05, 2012 10:47 pm 
Offline
VIP - AREXX STAFF
User avatar

Joined: Thu Jun 23, 2005 10:52 am
Posts: 694
Location: Zwolle
Hallo,

>c:/winavr-20100110/lib/gcc/../../avr/include/avr/signal.h:36:2: warning: #warning "This header file is obsolete. Use <avr/interrupt.h>."

http://home.kpn.nl/h.van.winkoop/Asuro/ ... PagFrm.htm

test.c:4: error: expected ';' before 'while'

not
Init()
but
Init();


Gruss

Henk
;-)


Top
 Profile E-mail  
 
 Post subject: Re: Asuro Programme flashen
PostPosted: Mon Feb 06, 2012 2:53 pm 
Offline
arexx.com user

Joined: Sun Mar 06, 2011 9:39 am
Posts: 48
Ich habe jetzt dieses include Signal entfernt ... Jetzt sint da 5 neue Fehler :(

test.c:1:10: error: #include expects "FILENAME" or <FILENAME>
-------- begin --------
avr-gcc --version
avr-gcc (WinAVR 20100110) 4.3.3
Copyright (C) 2008 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.

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: error: #include expects "FILENAME" or <FILENAME>
test.c: In function 'main':
test.c:3: warning: implicit declaration of function 'Init'
test.c:5: warning: implicit declaration of function 'PollSwitch'
test.c:5: warning: implicit declaration of function 'StatusLED'
test.c:5: error: 'RED' 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: 'GREEN' undeclared (first use in this function)


Top
 Profile E-mail  
 
 Post subject: Re: Asuro Programme flashen
PostPosted: Mon Feb 06, 2012 3:19 pm 
Offline
Administrator
User avatar

Joined: Fri Mar 25, 2005 6:19 pm
Posts: 1385
Location: NRW
#include “asuro.h”

Das hatte ich noch vergessen zu schreiben das ist noch ein Grund warum man sowas nicht blind aus PDFs kopieren sollte ;)

Die Anführungszeichen sind nicht die richtigen Anführungszeichen.

" " - richtig
“ ” - falsch

MfG,
SlyD


Top
 Profile E-mail  
 
 Post subject: Re: Asuro Programme flashen
PostPosted: Mon Feb 06, 2012 3:32 pm 
Offline
arexx.com user

Joined: Sun Mar 06, 2011 9:39 am
Posts: 48
Ich hoffe, dass das nur Zufall ist, das immer wenn ihr mit Tipps gebt, mehr Fehler kommen ...
Naja ist kein neuer Fehler, aber der mit dem Filename hat sich nochmal wiederholt ...


Top
 Profile E-mail  
 
 Post subject: Re: Asuro Programme flashen
PostPosted: Mon Feb 06, 2012 3:47 pm 
Offline
arexx.com user

Joined: Sun Mar 06, 2011 9:39 am
Posts: 48
Code:
#include "asuro.h"
int main(void) {
Init();
while (1) {
if (PollSwitch()>0) {StatusLED (RED);}
else {StatusLED (GREEN);}
}
}


Hier nochmal der Code ^^


Top
 Profile E-mail  
 
 Post subject: Re: Asuro Programme flashen
PostPosted: Mon Feb 06, 2012 3:56 pm 
Offline
Administrator
User avatar

Joined: Fri Mar 25, 2005 6:19 pm
Posts: 1385
Location: NRW
Das liegt ganz einfach daran das man viele kleinigkeiten beachten muss - und jede Kleinigkeit die man falsch machen könnte hier vorrausschauend aufzuzählen ist nicht möglich.

--> Du musst Dich auch schon selbst einlesen und detaillierter damit auseinandersetzen, das kann Dir niemand abnehmen.

Abgesehen von der unübersichtlichen Formatierung (ganz wichtig für den Anfang sonst steigst Du da sehr schnell gar nicht mehr durch!) schaut der Code eigentlich OK aus.
Welche Meldung kommt genau (es ist fast nie exakt der gleiche Fehler).

So sollte es aussehen - dann ist auch klar welche Klammer wozu gehört:

Code:
#include "asuro.h"

int main(void)
{
   Init();

   while(1)
   {
      if (PollSwitch() > 0)
      {
         StatusLED(RED);
      }
      else
      {
         StatusLED(GREEN);
      }
   }
   return 0;
}



Hast Du in der asuro.h eventuell zuviel weggelöscht?

MfG,
SlyD


Top
 Profile E-mail  
 
 Post subject: Re: Asuro Programme flashen
PostPosted: Mon Feb 06, 2012 3:59 pm 
Offline
arexx.com user

Joined: Sun Mar 06, 2011 9:39 am
Posts: 48
Das mit der Formatierung :Ja sorry :D Also ich wollte eben nur ganz schnell wissen ob das geht ! Das Programm is ja noch ziemlich leicht ...
Ich programmiere übrigens so auch Windows Programme in c# :D
Aber naja ... Nun zum Thema :
Ich weiß nicht woran das liegt ! Hier nochmal den ganzen Fehlerconsolen-Text :

Code:
> "C:\Users\*Beeeeep*\Desktop\ASURO_src\FirstTry\Test-all.bat"

C:\Users\*Beeeeep*\Desktop\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: error: #include expects "FILENAME" or <FILENAME>
-------- begin --------
avr-gcc --version
avr-gcc (WinAVR 20100110) 4.3.3
Copyright (C) 2008 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.

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: error: #include expects "FILENAME" or <FILENAME>
test.c: In function 'main':
test.c:3: warning: implicit declaration of function 'Init'
test.c:5: warning: implicit declaration of function 'PollSwitch'
test.c:5: warning: implicit declaration of function 'StatusLED'
test.c:5: error: 'RED' 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: 'GREEN' undeclared (first use in this function)
make: *** [test.o] Error 1

> Process Exit Code: 2
> Time Taken: 00:01


Top
 Profile E-mail  
 
 Post subject: Re: Asuro Programme flashen
PostPosted: Mon Feb 06, 2012 4:11 pm 
Offline
Administrator
User avatar

Joined: Fri Mar 25, 2005 6:19 pm
Posts: 1385
Location: NRW
Tja also hier gehts problemlos.


Hast Du exakt den Code den ich da gepostet habe kopiert?
Liegen die asuro.h und .c im selben Verzeichnis?

Leg mal ne neue leere test.c Datei an und kopier dann den Code aus dem Forum - evtl. ist da irgendwo Sonderzeichen Müll drin gewesen da Du den Kram ja aus dem PDF kopiert hattest.


EDIT:
C:\Users\*Beeeeep*

auch ETWAS ungünstige Wahl des Benutzernamens... Sonderzeichen in Pfadnamen sorgen oft für viele graue Haare also sollte man das besser lassen und sich auf a..Z 0..9 beschränken.


Top
 Profile E-mail  
 
 Post subject: Re: Asuro Programme flashen
PostPosted: Mon Feb 06, 2012 4:16 pm 
Offline
arexx.com user

Joined: Sun Mar 06, 2011 9:39 am
Posts: 48
Oke oke ....
Also ich ahe jetzt aus frust den ganzen ASURO_src Ordner gelöscht und neu von der CD geholt, dann die test.c geöffnet und das zeug einfach reinkopiert ...
Nun auf make und alles funktioniert ... komisch ...
Aber jetzt ist das Problem :
Wenn ich das Programm erfolgreich raufgeflsaht ahbe, heißt das flash tool, zeigt mir an, dass alles erfolgreich drauf ist, und dann den ASURO starte passiert das :
Erst leuchtet das Lämpchen gelb und die beiden HinterLED's rot. Dann gehen die hinteren lämpchen aus, und das haupt-LED geht rot. Dann passiert nichts egal ob ich so ein Taster vorne drücke oder einfach garnichts mache ...


Top
 Profile E-mail  
 
 Post subject: Re: Asuro Programme flashen
PostPosted: Mon Feb 06, 2012 4:32 pm 
Offline
Administrator
User avatar

Joined: Fri Mar 25, 2005 6:19 pm
Posts: 1385
Location: NRW
Mach mal >10 oder >30 statt > 0 ... und teste dann nochmal (verschiedene Buttons).

Kann ja sein das der ADC nicht immer exakt 0 liefert.

Den Selbsttest hast Du schon nach Anleitung laufen lassen?


Top
 Profile E-mail  
 
 Post subject: Re: Asuro Programme flashen
PostPosted: Mon Feb 06, 2012 5:01 pm 
Offline
arexx.com user

Joined: Sun Mar 06, 2011 9:39 am
Posts: 48
Juhu Danke ! Es geht ! Wie cool ! Ich lieeeeebe mein Asuro ! :)))) das ist ja coooool ! Jaaaaa ! Huhu !!!!
Danke an alle :D


Top
 Profile E-mail  
 
 Post subject: Re: Asuro Programme flashen
PostPosted: Mon Feb 06, 2012 5:08 pm 
Offline
arexx.com user

Joined: Sun Mar 06, 2011 9:39 am
Posts: 48
Hmm das ist komisch ..
Code:
#include "asuro.h"

int main(void)
{
   Init();

   while(1)
   {
      if (PollSwitch() > 30)
      {
         StatusLED(YELLOW);
      }
      else
      {
         StatusLED(RED);
      }
   }
   return 0;
}


Ich habe jetzt mehrmals viele verschiedene Farben eingegeben, aber das Ergebnis war immer gleich :
Taster nicht gedrückt : Grün
Taster gedrückt: Rot

Egal welche Farben ich da eingebe ! Auch wenn cih die tausch oder sonstwas eingebe ...
Woran liegt das ?


Top
 Profile E-mail  
 
 Post subject: Re: Asuro Programme flashen
PostPosted: Mon Feb 06, 2012 6:51 pm 
Offline
arexx.com user

Joined: Sun Mar 06, 2011 9:39 am
Posts: 48
Nochwas komisches : ich habe mir aus der Anleitung einfach mal den Code für eine Linienverfolgung geholt, und auf Asuro raufgemacht...
Wenn ich ihn jetzt starte, macht er nichts ... Das LED leuchtet Grün... Und wenn cih einen der äußeren Taster drücke, leuchtet das LED orange...


Top
 Profile E-mail  
 
 Post subject: Re: Asuro Programme flashen
PostPosted: Mon Feb 06, 2012 7:48 pm 
Offline
VIP - AREXX STAFF
User avatar

Joined: Thu Jun 23, 2005 10:52 am
Posts: 694
Location: Zwolle
Vielleicht ist die Status Led falsch herum montiert?...

Henk


Top
 Profile E-mail  
 
 Post subject: Re: Asuro Programme flashen
PostPosted: Mon Feb 06, 2012 7:49 pm 
Offline
arexx.com user

Joined: Sun Mar 06, 2011 9:39 am
Posts: 48
Ich denke nicht ... ANderes macht er eigentlich richtig...


Top
 Profile E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 40 posts ]  Go to page Previous  1, 2, 3  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group