[Tinyos-2-commits] CVS: tinyos-2.x/tos/lib/tosboot Makefile, 1.1, 1.2 TOSBootM.nc, 1.3, 1.4

Janos Sallai sallai at users.sourceforge.net
Thu Jan 24 13:02:07 PST 2008


Update of /cvsroot/tinyos/tinyos-2.x/tos/lib/tosboot
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv25368

Modified Files:
	Makefile TOSBootM.nc 
Log Message:
tosboot support for the iris mote


Index: Makefile
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/tosboot/Makefile,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Makefile	11 Jul 2007 00:42:56 -0000	1.1
--- Makefile	24 Jan 2008 21:02:05 -0000	1.2
***************
*** 4,8 ****
  #
  #
! # "Copyright (c) 2000-2005 The Regents of the University  of California.  
  # All rights reserved.
  #
--- 4,8 ----
  #
  #
! # "Copyright (c) 2000-2005 The Regents of the University  of California.
  # All rights reserved.
  #
***************
*** 11,20 ****
  # hereby granted, provided that the above copyright notice, the following
  # two paragraphs and the author appear in all copies of this software.
! # 
  # IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
  # DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
  # OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
  # CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
! # 
  # THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
  # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
--- 11,20 ----
  # hereby granted, provided that the above copyright notice, the following
  # two paragraphs and the author appear in all copies of this software.
! #
  # IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
  # DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
  # OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
  # CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
! #
  # THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
  # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
***************
*** 53,56 ****
--- 53,63 ----
  endif
  
+ ifeq ($(MAKECMDGOALS),iris)
+   CFLAGS += -DTOSBOOT_START=0x1f000 -DTOSBOOT_END=0x20000
+   CFLAGS += -Wl,--section-start=.text=0x1f000
+   CFLAGS += -Iiris -Iat45db -Iavr -Imicaz -Ilib
+   CFLAGS += -I../net/Deluge
+ endif
+ 
  # ifeq ($(MAKECMDGOALS),telosa)
  #   CFLAGS += -DTOSBOOT_START=0x1100 -DTOSBOOT_END=0x1a00

Index: TOSBootM.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/tosboot/TOSBootM.nc,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** TOSBootM.nc	14 Jan 2008 04:22:02 -0000	1.3
--- TOSBootM.nc	24 Jan 2008 21:02:05 -0000	1.4
***************
*** 1,4 ****
  /*
!  * "Copyright (c) 2000-2005 The Regents of the University  of California.  
   * All rights reserved.
   *
--- 1,4 ----
  /*
!  * "Copyright (c) 2000-2005 The Regents of the University  of California.
   * All rights reserved.
   *
***************
*** 7,16 ****
   * hereby granted, provided that the above copyright notice, the following
   * two paragraphs and the author appear in all copies of this software.
!  * 
   * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
   * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
   * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
   * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
!  * 
   * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
   * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
--- 7,16 ----
   * hereby granted, provided that the above copyright notice, the following
   * two paragraphs and the author appear in all copies of this software.
!  *
   * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
   * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
   * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
   * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
!  *
   * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
   * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
***************
*** 73,77 ****
      int8_t  i;
      for ( i = 3; i >= 0; i-- )
!       result |= ((in_flash_addr_t)call ExtFlash.readByte() & 0xff) << (i*8);    
      return result;
    }
--- 73,77 ----
      int8_t  i;
      for ( i = 3; i >= 0; i-- )
!       result |= ((in_flash_addr_t)call ExtFlash.readByte() & 0xff) << (i*8);
      return result;
    }
***************
*** 92,96 ****
        crcTmp = crcByte(crcTmp, call ExtFlash.readByte());
      call ExtFlash.stopRead();
!     
      return crcTarget == crcTmp;
    }
--- 92,96 ----
        crcTmp = crcByte(crcTmp, call ExtFlash.readByte());
      call ExtFlash.stopRead();
! 
      return crcTarget == crcTmp;
    }
***************
*** 101,105 ****
      uint8_t  i;
  
!     if (!verifyBlock(startAddr + offsetof(DelugeIdent,crc), 
  		     startAddr, offsetof(DelugeIdent,crc)))
        return FALSE;
--- 101,105 ----
      uint8_t  i;
  
!     if (!verifyBlock(startAddr + offsetof(DelugeIdent,crc),
  		     startAddr, offsetof(DelugeIdent,crc)))
        return FALSE;
***************
*** 117,121 ****
  
      for ( i = 0; i < numPgs; i++ ) {
!       if (!verifyBlock(startAddr + i*sizeof(uint16_t), 
  		       startAddr + addr, DELUGE_BYTES_PER_PAGE)) {
  	if (i == 0)
--- 117,121 ----
  
      for ( i = 0; i < numPgs; i++ ) {
!       if (!verifyBlock(startAddr + i*sizeof(uint16_t),
  		       startAddr + addr, DELUGE_BYTES_PER_PAGE)) {
  	if (i == 0)
***************
*** 150,154 ****
  #if defined(PLATFORM_TELOSB)
      if (intAddr != TOSBOOT_END) {
! #elif defined(PLATFORM_MICAZ)
      if (intAddr != 0) {
  #else
--- 150,154 ----
  #if defined(PLATFORM_TELOSB)
      if (intAddr != TOSBOOT_END) {
! #elif defined(PLATFORM_MICAZ) || defined(PLATFORM_IRIS)
      if (intAddr != 0) {
  #else
***************
*** 158,166 ****
        return R_INVALID_IMAGE_ERROR;
      }
!     
      call ExtFlash.stopRead();
!     
      while ( secLength ) {
!       
        pageAddr = newPageAddr = intAddr / TOSBOOT_INT_PAGE_SIZE;
  
--- 158,166 ----
        return R_INVALID_IMAGE_ERROR;
      }
! 
      call ExtFlash.stopRead();
! 
      while ( secLength ) {
! 
        pageAddr = newPageAddr = intAddr / TOSBOOT_INT_PAGE_SIZE;
  
***************
*** 177,181 ****
  	buf[(uint16_t)intAddr % TOSBOOT_INT_PAGE_SIZE] = call ExtFlash.readByte();
  	intAddr++; curAddr++;
! 	
  	if ( --secLength == 0 ) {
  	  intAddr = extFlashReadAddr();
--- 177,181 ----
  	buf[(uint16_t)intAddr % TOSBOOT_INT_PAGE_SIZE] = call ExtFlash.readByte();
  	intAddr++; curAddr++;
! 
  	if ( --secLength == 0 ) {
  	  intAddr = extFlashReadAddr();
***************
*** 220,224 ****
        runApp();
      }
!     
      // get current value of counter
      call IntFlash.read((uint8_t*)TOSBOOT_ARGS_ADDR, &args, sizeof(args));
--- 220,224 ----
        runApp();
      }
! 
      // get current value of counter
      call IntFlash.read((uint8_t*)TOSBOOT_ARGS_ADDR, &args, sizeof(args));
***************
*** 256,260 ****
      args.noReprogram = TRUE;
      call IntFlash.write((uint8_t*)TOSBOOT_ARGS_ADDR, &args, sizeof(args));
!     
      runApp();
  
--- 256,260 ----
      args.noReprogram = TRUE;
      call IntFlash.write((uint8_t*)TOSBOOT_ARGS_ADDR, &args, sizeof(args));
! 
      runApp();
  



More information about the Tinyos-2-commits mailing list