c't

c't-Projekte - Mailinglisten


[Voriger (Datum)] [Nächster (Datum)] [Voriger (Thread)] [Nächster (Thread)]
[Nach Datum][Nach Thread]

Re: [ct-bot] FIFO kompiliert nicht??

Absender: Fred Ammann
Datum: Di, 07.04.2009 22:01:39
In-reply-to: <043D25C7-21DA-48C2-B3E8-32A313BD2BA4@xxxxxxxxxxxxxxx>
References: <000a01c9b6c7$669d9400$0200a8c0@mexpnew> <459164.3696.qm@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <043D25C7-21DA-48C2-B3E8-32A313BD2BA4@xxxxxxxxxxxxxxx>


Entschuldigung - mein erstes Mail heute war etwas schnell getippt. Ich verwende Eclipse 3.2.2 auf WinXP. Es gibt den Fehler bei der C/C++ Build Einstellung "Debug-MCU-W32" und "Debug-W32".

Hier die Fehlermeldung für Debug-W32:
----------------------------------------------------
In file included from E:/ctbot/workspace/ct-Bot/include/map.h:31,
from ../bot-logic/behaviour_drive_area.c:36:
E:/ctbot/workspace/ct-Bot/include/fifo.h:43: error: syntax error before "signal"
E:/ctbot/workspace/ct-Bot/include/fifo.h:43: warning: no semicolon at end of struct or union
E:/ctbot/workspace/ct-Bot/include/fifo.h:44: warning: type defaults to `int' in declaration of `fifo_t'
E:/ctbot/workspace/ct-Bot/include/fifo.h:44: warning: data definition has no type or storage class
E:/ctbot/workspace/ct-Bot/include/fifo.h:52: error: syntax error before '*' token
E:/ctbot/workspace/ct-Bot/include/fifo.h:52: warning: function declaration isn't a prototype
E:/ctbot/workspace/ct-Bot/include/fifo.h:62: error: syntax error before '*' token
E:/ctbot/workspace/ct-Bot/include/fifo.h:62: warning: function declaration isn't a prototype
E:/ctbot/workspace/ct-Bot/include/fifo.h:71: error: syntax error before '*' token
E:/ctbot/workspace/ct-Bot/include/fifo.h:71: warning: function declaration isn't a prototype
E:/ctbot/workspace/ct-Bot/include/fifo.h:78: error: syntax error before '*' token
E:/ctbot/workspace/ct-Bot/include/fifo.h:78: warning: function declaration isn't a prototype
E:/ctbot/workspace/ct-Bot/include/fifo.h: In function `_inline_fifo_put':
E:/ctbot/workspace/ct-Bot/include/fifo.h:79: error: `f' undeclared (first use in this function)
E:/ctbot/workspace/ct-Bot/include/fifo.h:79: error: (Each undeclared identifier is reported only once
E:/ctbot/workspace/ct-Bot/include/fifo.h:79: error: for each function it appears in.)
E:/ctbot/workspace/ct-Bot/include/fifo.h:80: error: `data' undeclared (first use in this function)
E:/ctbot/workspace/ct-Bot/include/fifo.h: At top level:
E:/ctbot/workspace/ct-Bot/include/fifo.h:99: error: syntax error before '*' token
E:/ctbot/workspace/ct-Bot/include/fifo.h:99: warning: function declaration isn't a prototype
E:/ctbot/workspace/ct-Bot/include/fifo.h: In function `_inline_fifo_get':
E:/ctbot/workspace/ct-Bot/include/fifo.h:100: error: `f' undeclared (first use in this function)

Und hier für Debug-MCU-W32:
----------------------------------------
Building file: ../fifo.c
Invoking: GCC C Compiler
avr-gcc -DMCU -I"E:\ctbot\workspace\ct-Bot" -I"E:\ctbot\workspace\ct-Bot/include" -O0 -Os -g3 -Wall -c -fmessage-length=0 -mmcu=atmega32 -Wstrict-prototypes -MMD -MP -MF"fifo.d" -MT"fifo.d" -o"fifo.o" "../fifo.c"
In file included from E:\ctbot\workspace\ct-Bot/include/fifo.h:33,
from ../fifo.c:28:
E:\ctbot\workspace\ct-Bot/include/os_thread.h:107: warning: 'OS_task' attribute directive ignored
In file included from ../fifo.c:28:
E:\ctbot\workspace\ct-Bot/include/fifo.h:43: error: expected specifier-qualifier-list before 'signal'
../fifo.c: In function 'fifo_init':
../fifo.c:51: error: 'fifo_t' has no member named 'signal'
../fifo.c: In function 'fifo_put_data':
../fifo.c:135: error: 'fifo_t' has no member named 'signal'
../fifo.c: In function 'fifo_get_data':
../fifo.c:153: error: 'fifo_t' has no member named 'signal'
../fifo.c:154: error: 'fifo_t' has no member named 'signal'
../fifo.c:156: error: 'fifo_t' has no member named 'signal'
make: *** [fifo.o] Error 1

-------------------
Es scheint in meinem Setup ein Problem mit dem folgenden Datentype auf der letzten oder zweitletzten Zeile zu geben:
/*! FIFO-Datentyp */typedef
uint8_t struct{volatilecount; /*!< # Zeichen im Puffer */uint8_t size; /*!< Puffer-Grosse */uint8_t * pread; /*!< Lesezeiger */uint8_t * pwrite; /*!< Schreibzeiger */uint8_t read2end; /*!< # Zeichen bis zum Ueberlauf Lesezeiger */uint8_t write2end; /*!< # Zeichen bis zum Ueberlauf Schreibzeiger */signal os_signal_t; /*!< Signal das den Fifo-Status meldet */} fifo_t;
 
Muss ich den Type "signal" vorher noch deklarieren?
 
Vielen Dank
 
Fredi Ammann




________________________________
From: Timo Sandmann <mail@xxxxxxxxxxxxxxx>
To: Entwicklung rund um den c't-bot <ct-bot-entwickler@xxxxxxxxxxxxxxxxx>
Sent: Tuesday, April 7, 2009 3:05:00 PM
Subject: Re: [ct-bot] FIFO kompiliert nicht??

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hallo,

Am 07.04.2009 um 14:26 schrieb Fred Ammann:
> sorry - denke es ist ein kleine Problem aber bei kompiliert fifo.h nicht mehr? Der Type signal scheint nicht unterstützt oder definiert zu sein. Muss auf einen neuen Release der SW-Umgebeung wechseln?

danke für den Hinweis, ein paar weitere Infos wären aber gut, um das Problem besser eingrenzen zu können:
Welches Betriebssystem benutzt du denn und tritt das Problem beim Übersetzen für MCU oder für PC auf?
Könntest du bitte außerdem die Fehlermeldung aus der Build-Konsole mit angeben (am besten von Anfang an).

Grüße,
Timo

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Darwin)

iEYEARECAAYFAknbT3wACgkQDH/BX4067fK99wCeJYeVqg5/VY2wQvjonREGm+Uo
qWEAoOZ2V2E9sRR327C8CwbeBLBmyHzJ
=9BgA
-----END PGP SIGNATURE-----

_______________________________________________
ct-bot-entwickler Mailingliste
ct-bot-entwickler@xxxxxxxxxxxxxxxxx
http://www.heise.de/bin/newsletter/listinfo/ct-bot-entwickler