[Tinyos-help] NetProg will only boot to Golden Image

Thomas J Stevens tjstevens at raytheon.com
Wed Sep 28 19:39:14 PDT 2005

Dear All,

In tinyos-1.x/tos/lib/Deluge/NetProgM.nc the guts of
NetProg.programImgAndReboot(imgnum_t newImgNum) there are the following
      args.imageAddr = call Storage.imgNum2Addr(newImgNum);
      args.gestureCount = 0xff;
      args.noReprogram = FALSE;
      call IFlash.write((uint8_t*)TOSBOOT_ARGS_ADDR, &args, sizeof(args));

What is the effect of setting  args.gestureCount to 0xff?


In tinyos-1.x/tos/lib/Deluge/DelugeStorageM.nc:

  command uint32_t DelugeStorage.imgNum2Addr(imgnum_t imgNum) {
    if (imgNum == DELUGE_GOLDEN_IMAGE_NUM)
    return call


return call StorageRemap.physicalAddr[DELUGE_IMAGES[imgNum].imageNum](0);


return call
StorageRemap.physicalAddr[DELUGE_IMAGES[imgNum].imageNum](ingNum); ?

I do not completely understand this line and the problem I have is the
following get called successfully but always reboots to the Golden Image:

  command result_t StdControl.start() {

if (TOS_LOCAL_ADDRESS < 200) {
       call NetProg.programImgAndReboot(2);
    } else {
       call NetProg.programImgAndReboot(3);
    call Leds.redToggle();

    return SUCCESS;

I have reset Deluge to recognize 5 images with #define DELUGE_NUM_IMAGES 5
in tinyos-1.x/tos/lib/Deluge/Deluge.h and am at a as to why my call to
NetProg.programImgAndReboot(#) ALWAYS reboots to the golden image
regardless of the value for #.

Any assistance is much appreciated.

Best Regards,
Thom Stevens

Sr. Systems Engineer
Advanced Programs
Raytheon Missiles

520.545.9608 (desk)
520.545.9678 (facs)
520.906.9706 (mobile)
5209069706 at mmode.com [non-proprietary email ONLY]
There are 10 kinds of people in this world: Those who understand binary,
and those who don't.

More information about the Tinyos-help mailing list