[Tinyos-2-commits] i am getting error while compiling following
program
moorthyd at ee.iitb.ac.in
moorthyd at ee.iitb.ac.in
Mon May 14 04:35:04 PDT 2007
configuration PeriodicReaderAppC {
}
implementation
{
components PeriodicReaderC,LedsC,VoltageC,new TimerMilliC() as
TimerMilliC;
//MainC,
//PeriodicReaderC -> MainC.Boot;
//PeriodicReaderC.Boot -> MainC;
PeriodicReaderC.Timer -> TimerMilliC.Timer;
PeriodicReaderC.Read -> VoltageC.Read;
PeriodicReaderC.Leds -> LedsC.Leds;
}
#include "Timer.h"
module PeriodicReaderC{
provides interface StdControl;
uses {
interface Timer<TMilli> ;
interface Read<uint16_t> ;
//interface Boot;
interface Leds;
}
}
implementation
{
uint16_t lastVal =0;
#define SAMPLING_FREQUENCY 1024
command error_t StdControl.start(){
call Timer.startPeriodic(SAMPLING_FREQUENCY);
return SUCCESS;
}
command error_t StdControl.stop(){
call Timer.stop();
return SUCCESS;
}
event void Timer.fired(){
call Read.read();
call Leds.led1On();
}
event void Read.readDone(error_t err,uint16_t val) {
if (err==SUCCESS){
lastVal=val;
call Leds.led2On();
}
}
}
---------------------------------------
my error
---------------------------------------
Administrator at spannlab /cygdrive/c/cygwin/opt/tinyos-2.x/apps/PeriodicReader
$ make micaz
mkdir -p build/micaz
compiling PeriodicReaderC to a micaz binary
ncc -o build/micaz/main.exe -Os -finline-limit=100000 -Wall -Wshadow
-Wnesc-all -target=micaz -fnesc-cfile=build/micaz/app.c -board=micasb
-fnes
c-dump=wiring -fnesc-dump='interfaces(!abstract())'
-fnesc-dump='referenced(interfacedefs, components)'
-fnesc-dumpfile=build/micaz/wiring-check.
xml PeriodicReaderC.nc -lm
/usr/lib/gcc/avr/3.4.3/../../../../avr/lib/avr5/crtm128.o(.init9+0x0): In
function `__bad_interrupt':
../../../crt1/gcrt1.S:104: undefined reference to `main'
make: *** [exe0] Error 1
More information about the Tinyos-2-commits
mailing list