- LiFePO4 Speicher Test         
Ergebnis 1 bis 10 von 16

Thema: Bei make all Problem mit Msleep

Hybrid-Darstellung

Vorheriger Beitrag Vorheriger Beitrag   Nächster Beitrag Nächster Beitrag
  1. #1
    Neuer Benutzer Öfters hier
    Registriert seit
    25.01.2015
    Beiträge
    9

    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

  2. #2
    Erfahrener Benutzer Roboter Genie
    Registriert seit
    20.08.2008
    Ort
    Karlsruhe
    Alter
    36
    Beiträge
    1.225
    Zitat Zitat von Leiwig Beitrag anzeigen
    Dann habe ich mir eine neue asuro.h und asuro.c gedownloadet
    Das alleine reicht nicht, du brauchst auch alles andere was dazu gehört, unter anderem das entsprechende Makefile. Näheres dazu verrät dir die Dokumentation der Bibliothek die du herunter geladen hast. Ich gehe davon aus, dass das die Roboternetz-Bibliothek ist.

    mfG
    Markus
    Tiny ASURO Library: Thread und sf.net Seite

  3. #3
    Neuer Benutzer Öfters hier
    Registriert seit
    25.01.2015
    Beiträge
    9
    Hallo,
    vielen Dank für den Hinweis!
    Welche Dateien brauche ich denn jetzt in dem Verzeichnis zum Compilieren?
    Wo ist die Dokumentation zu finden?
    Ja, ich verwende die Roboternetz Bibliothek.


    Im Voraus vielen Dank für weitere Antworten!

  4. #4
    Erfahrener Benutzer Roboter Genie
    Registriert seit
    20.08.2008
    Ort
    Karlsruhe
    Alter
    36
    Beiträge
    1.225
    Zitat Zitat von Leiwig Beitrag anzeigen
    Wo ist die Dokumentation zu finden?
    Kennst du das AsuroWiki? Dort ist auch die Dokumentation zur RN-Bibliothek untergebracht. Dort wird auch erklärt, wie du die Bibliothek verwenden kannst.

    mfG
    Markus
    Tiny ASURO Library: Thread und sf.net Seite

  5. #5
    Neuer Benutzer Öfters hier
    Registriert seit
    25.01.2015
    Beiträge
    9
    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

    Klicke auf die Grafik für eine größere Ansicht

Name:	problem.PNG
Hits:	3
Größe:	17,3 KB
ID:	29675

  6. #6
    Erfahrener Benutzer Roboter Genie
    Registriert seit
    20.08.2008
    Ort
    Karlsruhe
    Alter
    36
    Beiträge
    1.225
    asuro.h zu kopieren ist falsch. Wie in der Dokumentation steht, musst du im Makefile konfigurieren, wo die ASURO-Bibliothek zu finden ist. Der vorgegebene Pfad funktioniert nur wenn dein Projekt in einem eigenen Ordner unterhalb von "examples" liegt.
    Der zweite Fehler betrifft die Konfiguration der Quelltext-Dateien im Makefile. Dort ist ziemlich sicher noch test.c hinterlegt, dort müsste aber werner.c stehen.

    mfG
    Markus
    Tiny ASURO Library: Thread und sf.net Seite

Ähnliche Themen

  1. MSleep bei richtungswechsel?
    Von Fabulous84 im Forum Asuro
    Antworten: 9
    Letzter Beitrag: 21.04.2011, 16:33
  2. Problem mit Msleep
    Von Mk1.12.91 im Forum Asuro
    Antworten: 6
    Letzter Beitrag: 01.02.2010, 15:07
  3. Msleep Problem
    Von blackyy im Forum Asuro
    Antworten: 7
    Letzter Beitrag: 06.02.2009, 16:05
  4. Problem bei ausführen von "make"
    Von sexymenffm im Forum Asuro
    Antworten: 9
    Letzter Beitrag: 18.06.2008, 10:38
  5. Antworten: 4
    Letzter Beitrag: 20.11.2007, 22:04

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •  

12V Akku bauen