On 4/8/07, Knut Ient <[EMAIL PROTECTED]> wrote:
Dear all,

I have tried to use MIG tool to generate a C file but I always got compile
error messages

You must use -o <somefile>.h when using the C tool. The C tool generates
      both <somefile>.h and <somefile>.c

I have searched around for some examples but there exist only examples for
Java and Python. Does anybody know to use MIG to generate a C file???

There is an example in tinyos-2.x/support/sdk/c/Makefile.am:
serialpacket.c serialpacket.h: $(SERIAL_H)
       mig -o serialpacket.h -c-prefix=spacket c $(SERIAL_H) serial_packet


in my Makefile, I do (in /apps/tests/TestSerial)

#####################
COMPONENT=TestSerialAppC
BUILD_EXTRA_DEPS+=TestSerialMsg.o

TestSerialMsg.c:
  mig c -target=$(PLATFORM) $(CFLAGS) -c-prefix=TestSerialMsg -o
TestSerial.h $@

Try moving the -o option to the beginning? Offhand, I would expect it
to work at the end, but maybe it doesn't.

David Gay
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to