Hey, those are hard to track down sometimes.  Try changing the configuration
name "MyAPP" to "MyApp".  The point is, it needs to coincide with that in
the module name and in the makefiles and so on.  I'd like to say this is
generally a configuration/module/makefile project naming issue.

-Brandon

On Tue, Apr 29, 2008 at 12:42 AM, Dhivya G <[EMAIL PROTECTED]> wrote:

> Hi,
>     I am using MTS400 sensor board,MIB520 programming board and Micaz
> mote. I am trying to get light sensor data from MTS400 sensor board. My code
> is as follows:
>
> #include "appFeatures.h"
> includes sensorboardApp;
> configuration MyAPP{
> }
> implementation {
> components Main,MyAppM,GenericComm as Comm,TimerC,LedsC,TaosPhoto;
> Main.StdControl->MyAppM.StdControl;
> Main.StdControl->TimerC.StdControl;
> Main.StdControl->Comm.Control;
> MyAppM.SendMsg->Comm.SendMsg[AM_XSXMSG];
> MyAppM.Timer->TimerC.Timer[unique("Timer")];
> MyAppM.Leds->LedsC.Leds;
> MyAppM.TaosControl->TaosPhoto.SplitControl;
> MyAppM.TaosCh0->TaosPhoto.ADC[0];
> MyAppM.TaosCh1->TaosPhoto.ADC[1];
> }
>
> #include "appFeatures.h"
>
> module MyAppM {
> provides {
> interface StdControl;
> }
> uses {
> interface SendMsg;
> interface Timer;
> interface Leds;
> interface SplitControl as TaosControl;
> interface ADC as TaosCh0;
>         interface ADC as TaosCh1;
>     }
> }
> implementation {
>     TOS_Msg msg_buffer;
>     bool Sending_packet=FALSE;
>     XDataMsg *pack;
>     command result_t StdControl.init() {
>         call Leds.init();
>         call TaosControl.init();
>         atomic {
>             pack=(XDataMsg *)&(msg_buffer.data);
>             pack->xSensorHeader.board_id=SENSOR_BOARD_ID;
>             pack->xSensorHeader.packet_id=2;
>             pack->xSensorHeader.node_id=TOS_LOCAL_ADDRESS;
>         }
>         return SUCCESS;
>     }
>     command result_t StdControl.start() {
>         call Timer.start(TIMER_REPEAT,1000);
>         return SUCCESS;
>     }
>     command result_t StdControl.stop(){
>         call Timer.stop();
>         return SUCCESS;
>     }
>     event result_t Timer.fired(){
>         call Leds.redToggle();
>         call TaosControl.start();
>         return SUCCESS;
>     }
>     void task SendData(){
>         if(Sending_packet) return;
>         atomic Sending_packet=TRUE;
>         if(call
> SendMsg.send(TOS_UART_ADDR,sizeof(XDataMsg),&msg_buffer)!=SUCCESS)
>             Sending_packet=FALSE;
>         return;
>     }
>     async event result_t TaosCh1.dataReady(uint16_t data){
>         pack->xData.data1.taoch1=data;
>         call TaosControl.stop();
>         post SendData();
>         call Leds.yellowToggle();
>         return SUCCESS;
>     }
>     async event result_t TaosCh0.dataReady(uint16_t data){
>         pack->xData.data1.taoch0=data;
>         atomic pack->xData.data1.vref = 417;
>         return call TaosCh1.getData();
>     }
>
>     event result_t TaosControl.startDone(){
>         return call TaosCh0.getData();
>     }
>     event result_t TaosControl.initDone(){
>         return SUCCESS;
>     }
>     event result_t TaosControl.stopDone(){
>         return SUCCESS;
>     }
>     event result_t SendMsg.sendDone(TOS_MsgPtr msg, result_t success){
>         call Leds.greenToggle();
>         atomic Sending_packet=FALSE;
>         return SUCCESS;
>     }
> }
>   While compiling the above code I am getting the following error:
> assertion "0" failed: file "nesc-semantics.c", line 145
> make: *** [exe0] Error 1
>
> Can u please help me to solve this error. I dont knw where I have gone
> wrong.
>
>
> --
> Regards,
> G.Dhivya
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to