[Tinyos-help] Include C file in nesC code
AIGroup
gruppodinfo at gmail.com
Wed Jan 30 06:23:41 PST 2008
Hi all.
I would like to include some routines in my nesC code as follows
(considering the BlinkApp for example):
/* nesC code*/
implementation
{
#include "c_code.h"
event void Boot.booted()
{
call Timer0.startPeriodic( 250 );
}
event void Timer0.fired()
{
Hello(); //Hello() is a function which is inside my C code
}
}
-------------------------
/*C code*/
/*c_code.h*/
#ifndef C_CODE
#define C_CODE
void Hello();
#endif
---------------
/* c_code.c */
#include "c_code.h"
void Hello()
{
printf("HELLO!\n")
}
---------------
Compilation terminate with success, but if i try to execute a simulation,
this following error occurs:
undefined symbol: BlinkC$Hello
How can I solve this problem?
Thank you very much for your help!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20080130/7557bf1f/attachment.html
More information about the Tinyos-help
mailing list