Hi, there are basically two ways to call a .c function from nesC. The first one, quick and dirty, is to write an header file and include the .c, no edits to Makefile required. See as an example $TOSROOT/tos/lib/net/dip/Dip.h . I do not endorse this technique.
The more proper one, is to write an header file for the functions exported by your .c file and add to your Makefile: PFLAGS+=path/to/source.c See as an example how blip uses functions defined in table.c. Reference files: $TOSROOT/tos/lib/net/blip/table.c $TOSROOT/tos/lib/net/blip/table.h $TOSROOT/support/make/blip.extra Regards. > Hi guys, > > I'm new to the tinyOs word so I write here in search of help.. > > I read all the previous post on the use of function C in nesc app. I have > however some difficult to compile... (probabily because of my inexperience > in the edit of makefile). So I want to ask if there is someone who have a > example of a little app with the call to c funtion and post it (especially > the make file modified). I searched everywhere but I didn't find any. > > Thanks for the help > > Luca -- Giuseppe Cardone, Ph.D. Student DEIS-LIA - Università degli Studi di Bologna E-mail: [email protected] Web: http://lia.deis.unibo.it/Staff/GiuseppeCardone/ _______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
