Hallo
Ich habe auch mal wieder den Asuro rausgekramt und habe mal versucht ein programm zu schreiben und zwar dieses hier:
Code:
#include "asuro.h"
int main(void)
{
unsigned char Speed;
unsigned int i;
Init();
StatusLED (GREEN);
MotorDir(FWD,FWD);
MotorSpeed(255,255);
while (PollSwitch()==0) {
StatusLED (GREEN);
}
MotorSpeed(0,0);
for (i=0; i<200; i++) {
Sleep(255);}
MotorDir(RWD,RWD);
MotorSpeed(150,150);
for (i=0; i<200; i++) {
Sleep(255);}
MotorDir(RWD,FWD);
MotorSpeed(150,150);
for (i=0; i<200; i++);{
Sleep(255); }
while(1);
return 0;
}
Aber irgendwie zeigt er die fehlermeldung an
Code:
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
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.
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:5: warning: unused variable `Speed'
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
C:\Users\FELIXK~1\AppData\Local\Temp\make27964.sh: /c/WinAVR/bin/avr-objcopy: Invalid argument
make: [test.eep] Error 126 (ignored)
avr-objdump -h -S test.elf > test.lss
C:\Users\FELIXK~1\AppData\Local\Temp\make27965.sh: /c/WinAVR/bin/avr-objdump: Invalid argument
make: *** [test.lss] Error 126
> Process Exit Code: 2
Vielleicht kan mir jemand weiterhelfen! Es muss ja irgendwas mit dem unsigned char Speed zu tun haben.
Wäre nett wenn mit jemand helfen könnte.
Vielen Dank im Vorraus
Felix
Lesezeichen