Hi Razvan,

I examined the  files under tos/lib/tosboot, especially;
    tos/lib/tosboot/TOSBootM.nc
    tos/lib/tosboot/stm25p/ExtFlashC.nc
    tos/lib/tosboot/stm25p/ExtFlashM.nc
    the files under  tos/lib/tosboot/telosb.

I made the following observations:
------------------------------------------------------

*1-) *In TOSBootM.nc  there is the following line:
209  void startupSequence() {
.
.
253    // give user some time and count down LEDs
254   startupLeds();
.
.
}
The startupSequence() function is called in the main function. So, Leds
should unconditionally have been glowing due to startupLeds() function but
it does not.!

When i ping the 'Sensenode' it seems that Blink application is loaded into
its flash. But during the following command;

        5-) reprogram 'Sensenode' with the following command:
           tos-deluge /dev/ttyUSB0 telosb -r 1

none of the leds glow, flash or set! Reboot command does not make the code
in  TOSBootM.nc to work.

*2-) *If i did the reverse, that is, programming telosb over-the-air by
installing Blink (/opt/tinyos-2.1.0/apps/tests/deluge/Blink) image into
'Sensenode's flash, disseminate & reboot Telosb form that image, then TelosB
blinks. So, the reverse operation works.

*3-) *As a reminder, if i program 'Sensenode' with Blink application  (build
for TelosB) under "opt/tinyos-2.1.0/apps/tests/deluge/Blink", it runs on
'Sensenode 'as it runs on TelosB. Also, both motes use the same flash chip
ST M25P80.

*4-)* i copied the hardware.h file of Sensenode under
"/opt/tinyos-2.1.0/tos/platforms/sensenode/" in the following. It seems to
be the same with that of TelosB.

#ifndef _H_hardware_h
#define _H_hardware_h

#include "msp430hardware.h"
//#include "MSP430ADC12.h"
//#include "CC2420Const.h"
//#include "AM.h"

 // LEDs


 TOSH_ASSIGN_PIN(RED_LED, 5, 5);
 TOSH_ASSIGN_PIN(GREEN_LED, 5, 4);
 TOSH_ASSIGN_PIN(YELLOW_LED, 5, 6);

 // CC2420 RADIO #defines
 TOSH_ASSIGN_PIN(RADIO_CSN, 4, 2);
 TOSH_ASSIGN_PIN(RADIO_VREF, 4, 5);
 TOSH_ASSIGN_PIN(RADIO_RESET, 4, 6);
 TOSH_ASSIGN_PIN(RADIO_FIFOP, 1, 0);
 TOSH_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OSH_ASSIGN_PIN(PROG_RX, 1, 1);
 TOSH_ASSIGN_PIN(PROG_TX, 2, 2);

 // need to undef atomic inside header files or nesC ignores the directive
 #undef atomic

 #endif // _H_hardware_h

As a result, after writing into 'Sensenode's flash, somehow it can't  reboot
it  with program image although pinging shows that  the program image was
loaded.

Which component calls TOSBootM.nc? I don't know the mechanism that how
bootloader works.

I run the command "make telosb docs" for GoldenImage component and i didn't
see any component using TOSBootM.nc.

Can there be a problem with the enums in  TOSBoot_platform.h under
"/opt/tinyos-2.1.0/tos/lib/tosboot/telosb" file?

What do you think about that? Where do i make mistake?

Thanks in advance,

Mehmet Akif Antepli
Graduate Student
Dept. of Electrical-Electronics Eng.
METU

On Sat, Feb 14, 2009 at 12:00 AM, Mehmet Akif Antepli <[email protected]
> wrote:

> Hi Razvan,
>
> First of all, thanks for your reply and suggestion.
>
> On Fri, Feb 13, 2009 at 10:40 PM, Razvan Musaloiu-E. 
> <[email protected]>wrote:
>
>> Quick question: for Sensenode do you upload the image doing 'make telosb
>> install'?
>
>
> Actually, the command;
> "make telosb install"
> does not work. Thus, I used the following command to load GoldenImage into
> 'Sensenode':
>
> " /usr/local/msp430/bin/msp430-bsl -r -e -I --invert-reset --invert-test -c
> /dev/ttyUSB0 -p
> /opt/tinyos-2.1.0/apps/tests/deluge/GoldenImage/build/telosb/main.ihex"
>
> Note: if you run the latest CVS (highly recommended :D) you should use the
>> apps/tests/deluge/Basestation.
>
>
> I work with XubunTOS-2.1.0 and i want to use tinyos-tools in XubunTOS-2.1.0
> in order to  not to make things  complicated.  Otherwise, after installing
> XubunTOS-2.1.0, i should download tinyos-2.x from CVS, then configure the
> system... What i want is to establish development environment in one step
> (maybe two :-)). But it seems that even XubunTOS-2.1.0 lacks the whole
> capability. If it doesn't work with tinyos-tools in  XubunTOS-2.1.0, i
> promise i will try the latest CVS :-)
>
> I think the problem might be in the tosboot (tos/lib/tosboot). There there
>> is some code that is responsible with reading stuff the external flash and
>> write it on the internal one. The code responsible with this is in
>> tos/lib/tosboot/stm25p for telos. The main component for tosboot is
>> TOSBootM.nc. I usually debug it using the leds.
>
>
> I will look the files you mentioned above, it seems to be a good hint.
>
> Thanks for your help,
>
> All the best!
>
>
>
> Mehmet Akif Antepli
> Graduate Student
> Dept. of Electrical-Electronics Eng.
> METU
>
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to