-
[Quote = " Martinius11 "] ABER beim Selbsttest Hat Sich NOCH Die Farbe geändert ? [/ Quote]
[I] Ja! ABER ALS ich der Programm geflasht Habe, ER Nicht Leuchtet rot ? [/ I]
[Code] # include " asuro.h "
int main ( void)
{
Init () ;
StatusLED (RED)
while (1) ;
return 0;
}
[/ Code]
[I] DABEI Erscheint folgende Meldung : [/ i]
[I] > "C: \ FirstTry \ Test - all.bat "
C: \ FirstTry > make all
set- e; avr- gcc -MM- mmcu = atmega8 -I. -G- Os - funsigned -char- funsigned - Bitfelder - fpack - struct - fshort - Enumerationen -Wall- Wstrict - Prototypen - Wa, - = ahlms asuro.lst asuro.c \
| sed ' s, \ (.* \) \. o [ : ] * \ 1.o \ 1.d : , g '> asuro.d ; \
[ S - asuro.d ] | | rm- f asuro.d
set- e; avr- gcc -MM- mmcu = atmega8 -I. -G- Os - funsigned -char- funsigned - Bitfelder - fpack - struct - fshort - Enumerationen -Wall- Wstrict - Prototypen - Wa, - = ahlms TEST.LST test.c \
| sed ' s, \ (.* \) \. o [ : ] * \ 1.o \ 1.d : , g '> test.d ; \
[ S - test.d ] | | rm- f test.d
-------- -------- Beginnen
avr- gcc - version
avr- gcc ( WinAVR 20100110 ) 4.3.3
Copyright ( C) 2008 Free Software Foundation , Inc.
Dies ist freie Software, siehe sterben Quelle für Das KOPIEREN von Bedingungen . Es GIBT KEINE
Garantie, für Nicht Einmal MARKTREIFE Oder der eignung FÜR EINEN BESTIMMTEN zweck .
avr- gcc -c- mmcu = atmega8 -I. -G- Os - funsigned -char- funsigned - Bitfelder - fpack - struct - fshort - Enumerationen -Wall- Wstrict - Prototypen - Wa, - = ahlms TEST.LST test.c -o test.o
In der mitgelieferten Datei asuro.h : 34,
von test.c : 1:
c: / winavr-20100110/lib/gcc/../../avr/include/avr/signal.h : 36:2 : Warnung : # warning " This Header -Datei ist veraltet . Verwenden < avr / interrupt.h > . "
avr- gcc -c- mmcu = atmega8 -I. -G- Os - funsigned -char- funsigned - Bitfelder - fpack - struct - fshort - Enumerationen -Wall- Wstrict - Prototypen - Wa, - = ahlms asuro.lst asuro.c -o asuro.o
In der mitgelieferten Datei asuro.h : 34,
von asuro.c : 29:
c: / winavr-20100110/lib/gcc/../../avr/include/avr/signal.h : 36:2 : Warnung : # warning " This Header -Datei ist veraltet . Verwenden < avr / interrupt.h > . "
avr- gcc- mmcu = atmega8 -I. -G- Os - funsigned -char- funsigned - Bitfelder - fpack - struct - fshort - Enumerationen -Wall- Wstrict - Prototypen - Wa, - = ahlms test.o test.o asuro.o - output test.elf -Wl , - Karte = test.map , - cref -lm
AVR- objcopy -O ihex -R. eeprom test.elf test.hex
AVR- objcopy -j . EEPROM - set- ABSCHNITT - flags = =. eeprom " Alloc , load " \
- Change -section- LMA . eeprom = 0 -O ihex test.elf TEST.EEP
c: \ WinAVR - 20100110 \ bin \ avr- objcopy.exe : - change- section- LMA . eeprom = 0x00000000 nie benutzt
AVR -objdump- h -S test.elf > test.lss
Größe nach:
test.elf :
ABSCHNITT Größe addr
. Text 1692 0
. bss 1 8388704
. debug_aranges 64 0
. debug_pubnames 263 0
. debug_info 1060 0
. debug_abbrev 401 0
. debug_line 1120 0
. debug_frame 288 0
. debug_str 350 0
. debug_loc 388 0
Total 5627
Fehler: none
-------- -------- Ende
> Process Exit Code: 0
> Time Taken : 00:04
[ / i]
-
du hst das ; bei StatusLED vergessen
-
es wundert mich das der Compiler keinen Fehler ausspuckt :-/
dein code:
Code:
int main ( void)
{
Init () ;
StatusLED (RED)
while (1) ;
return 0;
}
so würde ichs schreiben:
Code:
int main ( void)
{
Init () ;
StatusLED (RED);
while (1) ;
return 0;
}
klein aber fein der Fehler ^^ fehlt ein ; aber das der compiler net meckert versteh ich net :-/
-
danke für sterbe Schnelle antwort !
ICH HABE ES geändert und geflasht,
ABER Es leuchtet Immer Noch Nicht rot
-
Hab dein Problem jetzt glaube gefunden, hast du "# include " asuro.h " oder "#include "asuro.h" in dem Quellcode stehen? Wenn ersteres, versuch bitte mit weniger Leerzeichen zu arbeiten... Aber dann versteh ich wieder nicht warum dein Compiler da keinen Fehler bringt...
-
kann mir jemand erklären wie diese HTMl funktioniert?
ich schreibe etwas und er zeigt was ganz anderes
(wie z.B oben)
-
HTMI?
Du klickst z.B. auf Code, dann schreibst du eben den Quellcode, bei dem Button "Code" ist jetzt ein * dahinter. Wenn du den kompletten Quellcode geschrieben hast, klickst du auf "Code*". Dann müsste es gehen.
oder versuchs mal mit kleinschreiben statts groß wie z.B. bei [Code]
-
danke
ich habe nochmal ohne Leerzeichen versucht
trotzdem funktioniert es nicht
-
kopier dir das mal:
Code:
#include "asuro.h"
int main(void){
Init();
StatusLED(RED);
while(1);
return 0;
}
-
Ich habe der programm geändert:
Code:
#include"asuro.h"
int main(void)
{
Init();
StatusLED(RED);
while(1);
return 0;
}
dabei erscheint folgende Fehlermeldung:
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=asuro.lst asuro.c \
| sed 's,\(.*\)\.o[ :]*,\1.o \1.d : ,g' > asuro.d; \
[ -s asuro.d ] || rm -f asuro.d
C:\Users\AnhDung\AppData\Local\Temp\make564602.sh: /c/WinAVR/bin/avr-gcc: Invalid argument
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
C:\Users\AnhDung\AppData\Local\Temp\make564603.sh: /c/WinAVR/bin/avr-gcc: Invalid argument
-------- 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.
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
avr-gcc -c -mmcu=atmega8 -I. -g -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-ahlms=asuro.lst asuro.c -o asuro.o
avr-gcc -mmcu=atmega8 -I. -g -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-ahlms=test.o test.o asuro.o --output test.elf -Wl,-Map=test.map,--cref -lm
avr-objcopy -O ihex -R .eeprom test.elf test.hex
avr-objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load" \
--change-section-lma .eeprom=0 -O ihex test.elf test.eep
avr-objdump -h -S test.elf > test.lss
Size after:
C:\Users\AnhDung\AppData\Local\Temp\make564608.sh: /c/WinAVR/bin/avr-size: Invalid argument
make: *** [sizeafter] Error 126
> Process Exit Code: 2