Bei make all Problem mit Msleep
Hallo,
ich habe ein Problem bei make all:
Wenn ich Msleep () benutze zeigt Programmers Notepad 2 mir folgende Meldung an:
> "make.exe" 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
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 (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
In file included from asuro.h:34,
from test.c:1:
d:/asuro/programme/lib/gcc/../../avr/include/avr/signal.h:36:2: warning: #warning "This header file is obsolete. Use <avr/interrupt.h>."
test.c: In function 'main':
test.c:12: warning: implicit declaration of function 'Msleep'
test.c:15: warning: control reaches end of non-void function
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
In file included from asuro.h:34,
from asuro.c:29:
d:/asuro/programme/lib/gcc/../../avr/include/avr/signal.h:36:2: warning: #warning "This header file is obsolete. Use <avr/interrupt.h>."
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
test.o: In function `main':
D:\ASURO\Aufgaben\1m/test.c:12: undefined reference to `Msleep'
make.exe: *** [test.elf] Error 1
> Process Exit Code: 2
> Time Taken: 00:02
Dann habe ich mir eine neue asuro.h und asuro.c gedownloadet und dann kommt das:
> "make.exe" 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
asuro.c:68:21: error: myasuro.h: No such file or directory
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
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
asuro.c:68:21: error: myasuro.h: No such file or directory
-------- 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: In function 'main':
test.c:15: warning: control reaches end of non-void function
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
asuro.c:68:21: error: myasuro.h: No such file or directory
asuro.c: In function 'IsrStandard':
asuro.c:173: error: 'MY_SWITCH_THRESHHOLD' undeclared (first use in this function)
asuro.c:173: error: (Each undeclared identifier is reported only once
asuro.c:173: error: for each function it appears in.)
asuro.c: In function 'Init':
asuro.c:260: error: 'F_CPU' undeclared (first use in this function)
make.exe: *** [asuro.o] Error 1
> Process Exit Code: 2
> Time Taken: 00:01
Mein Programm sieht so aus:
#include "asuro.h"
#define cm 75
int main (void)
{
Init();
MotorDir (FWD,FWD);
//Strecke 1m;
MotorSpeed (125,125);
Msleep ( 100 * cm );
MotorSpeed (0,0);
}
Wenn ich Msleep ( 100 * cm); entferne funktioniert es.
Vielen Dank im Voraus :MistPC](*,)
Liste der Anhänge anzeigen (Anzahl: 1)
Hallo,
ich hab mir die Dokumentation mal durchgelesen!
Für mich Anfänger ist das Chinesisch und Japanisch gemixt.
Das mit der Makefile hab ich noch hinbekommen, also den Libpath anzugeben
aber dann bei neue Projekte verstand ich nur noch Bahnhof.
Ich hab immer noch mein altes Programm namens werner.c:
#include "asuro.h"
#define cm 75
int main(void)
{
Init();
MotorDir (FWD,FWD);
//Strecke 1m;
MotorSpeed (125,125);
Msleep ( 100 * cm );
MotorSpeed (0,0);
}
So wie ich bei "Neue Projekte" gelesen hab soll ich nur die dateien benötigen die ich im anhang hab(ohne asuro.h), dann meckert er aber, dass er asuro.h nicht findet:
> "make.exe" all
set -e; avr-gcc -MM -mmcu=atmega8 -DF_CPU=8000000UL -I. -g -Os -I../../lib/inc -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -ffunction-sections -fdata-sections -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:9:19: error: asuro.h: No such file or directory
-------- 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.
make.exe: *** No rule to make target `test.hex', needed by `all'. Stop.
> Process Exit Code: 2
> Time Taken: 00:01
So wenn ich dann asuro.h im selben Verzeichnis habe (wie im Bild) meint er:
> "make.exe" all
set -e; avr-gcc -MM -mmcu=atmega8 -DF_CPU=8000000UL -I. -g -Os -I../../lib/inc -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -ffunction-sections -fdata-sections -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 (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.
make.exe: *** No rule to make target `test.hex', needed by `all'. Stop.
> Process Exit Code: 2
> Time Taken: 00:01
Im Voraus vielen Dank
Anhang 29675
Liste der Anhänge anzeigen (Anzahl: 3)
Hallo,
vielen Dank für die Antwort!
So also ich hab asoro.h gelöscht!
Es funktioniert leider immer noch nicht:MistPC](*,) :(
Vielen Dank im Voraus
Anhang 29677Anhang 29678Anhang 29679
Liste der Anhänge anzeigen (Anzahl: 9)
ok danke
es funktioniert immer noch nicht richtig :(
vielen dank für die mühe!!!
Anhang 29685Anhang 29686Anhang 29687
- - - Aktualisiert - - -
hallo
ok danke
ich hab werner.c in test.c umbenannt.
den zweiten libpath gelöscht
und es funktioniert immer noch net
Anhang 29688Anhang 29689Anhang 29690
- - - Aktualisiert - - -
hallo
ok danke
ich hab werner.c in test.c umbenannt.
den zweiten libpath gelöscht
und es funktioniert immer noch net.:(:MistPC:Haue
vielen dank für die mühen
Anhang 29691Anhang 29692Anhang 29693
- - - Aktualisiert - - -
oops hab eben erst bemerkt, dass es zwei seiten gibt