[Tinyos-beta-commits] CVS: tinyos-1.x/beta/Deluge/Deluge/TOSBoot/build/telosb app.c, 1.8, 1.9 ident_flags.txt, 1.8, 1.9 main.exe, 1.8, 1.9 main.ihex, 1.8, 1.9

Jonathan Hui jwhui at users.sourceforge.net
Thu Jun 9 12:29:03 PDT 2005


Update of /cvsroot/tinyos/tinyos-1.x/beta/Deluge/Deluge/TOSBoot/build/telosb
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29678/build/telosb

Modified Files:
	app.c ident_flags.txt main.exe main.ihex 
Log Message:
- Check voltage before writing to the flash. If the voltage is below
the specified operating voltage, TOSBoot will execute the currently
programmed TinyOS application. No golden gesture is allowed since the
golden image can't be programmed and detecting the gesture requires
writing to the internal flash anyways. On the msp430 platform, the
minimum voltage is 2.7V.



Index: app.c
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/Deluge/Deluge/TOSBoot/build/telosb/app.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** app.c	18 May 2005 02:55:23 -0000	1.8
--- app.c	9 Jun 2005 19:29:00 -0000	1.9
***************
*** 593,597 ****
  
  volatile unsigned char BCSCTL1 __asm ("0x0057");
! # 30 "/opt/msp430/msp430/include/msp430/adc12.h"
  typedef struct __nesc_unnamed4255 {
    volatile unsigned 
--- 593,609 ----
  
  volatile unsigned char BCSCTL1 __asm ("0x0057");
! # 18 "/opt/msp430/msp430/include/msp430/adc12.h"
! volatile unsigned int ADC12CTL0 __asm ("0x01A0");
! 
! volatile unsigned int ADC12CTL1 __asm ("0x01A2");
! 
! volatile unsigned int ADC12IFG __asm ("0x01A4");
! 
! 
! 
! 
! 
! 
! 
  typedef struct __nesc_unnamed4255 {
    volatile unsigned 
***************
*** 653,656 ****
--- 665,672 ----
  
  struct adc12_t;
+ #line 100
+ volatile unsigned int ADC12MEM0 __asm ("0x0140");
+ #line 139
+ volatile unsigned char ADC12MCTL0 __asm ("0x0080");
  # 71 "/opt/msp430/msp430/include/msp430/common.h" 3
  volatile unsigned int WDTCTL __asm ("0x0120");
***************
*** 987,997 ****
    USART_I2C = 5
  } msp430_usartmode_t;
! static  result_t InternalFlashC$InternalFlash$read(void *arg_0xa55a6d8, void *arg_0xa55a830, uint16_t arg_0xa55a980);
! static  result_t InternalFlashC$InternalFlash$write(void *arg_0xa55a010, void *arg_0xa55a168, uint16_t arg_0xa55a2b8);
! static  void LedsC$Leds$set(uint8_t arg_0xa55b9f0);
  static  result_t PowerOffM$StdControl$init(void);
  static  result_t PowerOffM$StdControl$start(void);
  static  result_t PowerOffM$StdControl$stop(void);
! static  void STM25PM$TOSBootExtFlash$startRead(uint32_t arg_0xa53ea28);
  static  void STM25PM$TOSBootExtFlash$stopRead(void);
  static  uint8_t STM25PM$TOSBootExtFlash$readByte(void);
--- 1003,1013 ----
    USART_I2C = 5
  } msp430_usartmode_t;
! static  result_t InternalFlashC$InternalFlash$read(void *arg_0xa55a8b8, void *arg_0xa55aa10, uint16_t arg_0xa55ab60);
! static  result_t InternalFlashC$InternalFlash$write(void *arg_0xa55a1f0, void *arg_0xa55a348, uint16_t arg_0xa55a498);
! static  void LedsC$Leds$set(uint8_t arg_0xa55bc00);
  static  result_t PowerOffM$StdControl$init(void);
  static  result_t PowerOffM$StdControl$start(void);
  static  result_t PowerOffM$StdControl$stop(void);
! static  void STM25PM$TOSBootExtFlash$startRead(uint32_t arg_0xa540c58);
  static  void STM25PM$TOSBootExtFlash$stopRead(void);
  static  uint8_t STM25PM$TOSBootExtFlash$readByte(void);
***************
*** 1002,1015 ****
  static  void HPLUSART0M$HPLUSARTControl$setModeSPI(void);
  static  result_t HPLUSART0M$HPLUSARTControl$isTxIntrPending(void);
! static  void HPLUSART0M$HPLUSARTControl$tx(uint8_t arg_0xa597ed0);
  static  uint8_t HPLUSART0M$HPLUSARTControl$rx(void);
  static  result_t HPLUSART0M$HPLUSARTControl$isRxIntrPending(void);
! static  result_t ProgFlashM$ProgFlash$write(uint32_t arg_0xa556160, uint8_t *arg_0xa5562c0, uint16_t arg_0xa556410);
  static  
  # 32 "TOSBootProgFlash.nc"
! result_t TOSBootM$ProgFlash$write(uint32_t arg_0xa556160, uint8_t *arg_0xa5562c0, uint16_t arg_0xa556410);
  static  
  # 32 "TOSBootExtFlash.nc"
! void TOSBootM$ExtFlash$startRead(uint32_t arg_0xa53ea28);
  static  
  void TOSBootM$ExtFlash$stopRead(void);
--- 1018,1032 ----
  static  void HPLUSART0M$HPLUSARTControl$setModeSPI(void);
  static  result_t HPLUSART0M$HPLUSARTControl$isTxIntrPending(void);
! static  void HPLUSART0M$HPLUSARTControl$tx(uint8_t arg_0xa5b34e8);
  static  uint8_t HPLUSART0M$HPLUSARTControl$rx(void);
  static  result_t HPLUSART0M$HPLUSARTControl$isRxIntrPending(void);
! static  result_t ProgFlashM$ProgFlash$write(uint32_t arg_0xa556390, uint8_t *arg_0xa5564f0, uint16_t arg_0xa556640);
! static  bool VoltageC$Voltage$okToProgram(void);
  static  
  # 32 "TOSBootProgFlash.nc"
! result_t TOSBootM$ProgFlash$write(uint32_t arg_0xa556390, uint8_t *arg_0xa5564f0, uint16_t arg_0xa556640);
  static  
  # 32 "TOSBootExtFlash.nc"
! void TOSBootM$ExtFlash$startRead(uint32_t arg_0xa540c58);
  static  
  void TOSBootM$ExtFlash$stopRead(void);
***************
*** 1036,1048 ****
  result_t TOSBootM$SubControl$stop(void);
  static  
! # 3 "Leds.nc"
! void TOSBootM$Leds$set(uint8_t arg_0xa55b9f0);
  static  
  # 36 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/interfaces/InternalFlash.nc"
! result_t TOSBootM$IntFlash$read(void *arg_0xa55a6d8, void *arg_0xa55a830, uint16_t arg_0xa55a980);
  static  
  #line 35
! result_t TOSBootM$IntFlash$write(void *arg_0xa55a010, void *arg_0xa55a168, uint16_t arg_0xa55a2b8);
! # 42 "TOSBootM.nc"
  enum TOSBootM$__nesc_unnamed4278 {
    TOSBootM$R_SUCCESS, 
--- 1053,1068 ----
  result_t TOSBootM$SubControl$stop(void);
  static  
! # 32 "Voltage.nc"
! bool TOSBootM$Voltage$okToProgram(void);
! static  
! # 32 "Leds.nc"
! void TOSBootM$Leds$set(uint8_t arg_0xa55bc00);
  static  
  # 36 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/interfaces/InternalFlash.nc"
! result_t TOSBootM$IntFlash$read(void *arg_0xa55a8b8, void *arg_0xa55aa10, uint16_t arg_0xa55ab60);
  static  
  #line 35
! result_t TOSBootM$IntFlash$write(void *arg_0xa55a1f0, void *arg_0xa55a348, uint16_t arg_0xa55a498);
! # 43 "TOSBootM.nc"
  enum TOSBootM$__nesc_unnamed4278 {
    TOSBootM$R_SUCCESS, 
***************
*** 1050,1060 ****
    TOSBootM$R_PROGRAMMING_ERROR
  };
! static inline 
  void TOSBootM$startupLeds(void);
  static inline 
! #line 66
  void TOSBootM$gestureNotify(void);
  static 
! #line 79
  uint32_t TOSBootM$extFlashRead32(void);
  static inline 
--- 1070,1080 ----
    TOSBootM$R_PROGRAMMING_ERROR
  };
! static 
  void TOSBootM$startupLeds(void);
  static inline 
! #line 67
  void TOSBootM$gestureNotify(void);
  static 
! #line 80
  uint32_t TOSBootM$extFlashRead32(void);
  static inline 
***************
*** 1067,1074 ****
  bool TOSBootM$verifyImage(uint32_t startAddr);
  static 
! #line 134
  result_t TOSBootM$programImage(uint32_t startAddr);
  static inline 
! #line 188
  void TOSBootM$reboot(void);
  static inline 
--- 1087,1094 ----
  bool TOSBootM$verifyImage(uint32_t startAddr);
  static 
! #line 135
  result_t TOSBootM$programImage(uint32_t startAddr);
  static inline 
! #line 189
  void TOSBootM$reboot(void);
  static inline 
***************
*** 1082,1086 ****
  
  void TOSBootM$startupSequence(void);
! #line 252
  int   main(void);
  # 50 "msp430/InternalFlashC.nc"
--- 1102,1106 ----
  
  void TOSBootM$startupSequence(void);
! #line 262
  int   main(void);
  # 50 "msp430/InternalFlashC.nc"
***************
*** 1102,1106 ****
  #line 101
  result_t InternalFlashC$InternalFlash$read(void *addr, void *buf, uint16_t size);
! # 8 "LedsC.nc"
  enum LedsC$__nesc_unnamed4280 {
    LedsC$RED_BIT = 1, 
--- 1122,1126 ----
  #line 101
  result_t InternalFlashC$InternalFlash$read(void *addr, void *buf, uint16_t size);
! # 37 "LedsC.nc"
  enum LedsC$__nesc_unnamed4280 {
    LedsC$RED_BIT = 1, 
***************
*** 1114,1119 ****
  result_t PowerOffM$SubControl$stop(void);
  static  
! # 3 "Leds.nc"
! void PowerOffM$Leds$set(uint8_t arg_0xa55b9f0);
  static inline 
  # 43 "msp430/PowerOffM.nc"
--- 1134,1139 ----
  result_t PowerOffM$SubControl$stop(void);
  static  
! # 32 "Leds.nc"
! void PowerOffM$Leds$set(uint8_t arg_0xa55bc00);
  static inline 
  # 43 "msp430/PowerOffM.nc"
***************
*** 1127,1131 ****
  result_t PowerOffM$StdControl$start(void);
  static inline  
! #line 83
  result_t PowerOffM$StdControl$stop(void);
  static  
--- 1147,1151 ----
  result_t PowerOffM$StdControl$start(void);
  static inline  
! #line 86
  result_t PowerOffM$StdControl$stop(void);
  static  
***************
*** 1135,1139 ****
  static  result_t STM25PM$USARTControl$isTxIntrPending(void);
  static  
! void STM25PM$USARTControl$tx(uint8_t arg_0xa597ed0);
  static  uint8_t STM25PM$USARTControl$rx(void);
  static  
--- 1155,1159 ----
  static  result_t STM25PM$USARTControl$isTxIntrPending(void);
  static  
! void STM25PM$USARTControl$tx(uint8_t arg_0xa5b34e8);
  static  uint8_t STM25PM$USARTControl$rx(void);
  static  
***************
*** 1207,1210 ****
--- 1227,1236 ----
  # 39 "msp430/ProgFlashM.nc"
  result_t ProgFlashM$ProgFlash$write(uint32_t addr, uint8_t *buf, uint16_t len);
+ # 39 "msp430/VoltageC.nc"
+ enum VoltageC$__nesc_unnamed4281 {
+   VoltageC$VTHRESH = 0xE66
+ };
+ static inline  
+ bool VoltageC$Voltage$okToProgram(void);
  static inline 
  # 196 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/platform/msp430/msp430hardware.h"
***************
*** 1369,1379 ****
  }
  
! # 3 "Leds.nc"
! inline static  void PowerOffM$Leds$set(uint8_t arg_0xa55b9f0){
! #line 3
!   LedsC$Leds$set(arg_0xa55b9f0);
! #line 3
  }
! #line 3
  # 78 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/interfaces/StdControl.nc"
  inline static  result_t PowerOffM$SubControl$stop(void){
--- 1395,1405 ----
  }
  
! # 32 "Leds.nc"
! inline static  void PowerOffM$Leds$set(uint8_t arg_0xa55bc00){
! #line 32
!   LedsC$Leds$set(arg_0xa55bc00);
! #line 32
  }
! #line 32
  # 78 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/interfaces/StdControl.nc"
  inline static  result_t PowerOffM$SubControl$stop(void){
***************
*** 1449,1452 ****
--- 1475,1481 ----
  {
  
+ 
+   wait(0xffff);
+ 
    TOSH_MAKE_USERINT_INPUT();
  
***************
*** 1620,1626 ****
  
  static inline  
! # 83 "msp430/PowerOffM.nc"
  result_t PowerOffM$StdControl$stop(void)
! #line 83
  {
    return SUCCESS;
--- 1649,1655 ----
  
  static inline  
! # 86 "msp430/PowerOffM.nc"
  result_t PowerOffM$StdControl$stop(void)
! #line 86
  {
    return SUCCESS;
***************
*** 1645,1651 ****
  #line 78
  static inline 
! # 193 "TOSBootM.nc"
  void TOSBootM$runApp(void)
! #line 193
  {
    TOSBootM$SubControl$stop();
--- 1674,1680 ----
  #line 78
  static inline 
! # 194 "TOSBootM.nc"
  void TOSBootM$runApp(void)
! #line 194
  {
    TOSBootM$SubControl$stop();
***************
*** 1653,1657 ****
  
  # 35 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/interfaces/InternalFlash.nc"
! inline static  result_t TOSBootM$IntFlash$write(void *arg_0xa55a010, void *arg_0xa55a168, uint16_t arg_0xa55a2b8){
  #line 35
    unsigned char result;
--- 1682,1686 ----
  
  # 35 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/interfaces/InternalFlash.nc"
! inline static  result_t TOSBootM$IntFlash$write(void *arg_0xa55a1f0, void *arg_0xa55a348, uint16_t arg_0xa55a498){
  #line 35
    unsigned char result;
***************
*** 1659,1663 ****
  
  #line 35
!   result = InternalFlashC$InternalFlash$write(arg_0xa55a010, arg_0xa55a168, arg_0xa55a2b8);
  #line 35
  
--- 1688,1692 ----
  
  #line 35
!   result = InternalFlashC$InternalFlash$write(arg_0xa55a1f0, arg_0xa55a348, arg_0xa55a498);
  #line 35
  
***************
*** 1667,1702 ****
  }
  #line 35
- # 3 "Leds.nc"
- inline static  void TOSBootM$Leds$set(uint8_t arg_0xa55b9f0){
- #line 3
-   LedsC$Leds$set(arg_0xa55b9f0);
- #line 3
- }
- #line 3
  static inline 
! # 48 "TOSBootM.nc"
! void TOSBootM$startupLeds(void)
! #line 48
! {
! 
!   uint8_t output = 0x7;
!   uint8_t i;
!   uint16_t j;
! 
!   TOSBootM$Leds$set(0x7);
!   for (i = 0; i < 3; i++, output >>= 1) {
!       for (j = 1536; j > 0; j -= 4) {
!           TOSBootM$Leds$set(output);
!           wait(j);
!           TOSBootM$Leds$set(output >> 0x1);
!           wait(1536 - j);
!         }
!     }
! }
! 
! static inline 
! #line 188
  void TOSBootM$reboot(void)
! #line 188
  {
    WDTCTL = (((0x5A00 | 0x0008) | 0x0004) | 0x0002) | 0x0001;
--- 1696,1703 ----
  }
  #line 35
  static inline 
! # 189 "TOSBootM.nc"
  void TOSBootM$reboot(void)
! #line 189
  {
    WDTCTL = (((0x5A00 | 0x0008) | 0x0004) | 0x0002) | 0x0001;
***************
*** 1705,1709 ****
  
  # 36 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/interfaces/InternalFlash.nc"
! inline static  result_t TOSBootM$IntFlash$read(void *arg_0xa55a6d8, void *arg_0xa55a830, uint16_t arg_0xa55a980){
  #line 36
    unsigned char result;
--- 1706,1710 ----
  
  # 36 "C:/tinyos/cygwin/opt/tinyos-1.x/tos/interfaces/InternalFlash.nc"
! inline static  result_t TOSBootM$IntFlash$read(void *arg_0xa55a8b8, void *arg_0xa55aa10, uint16_t arg_0xa55ab60){
  #line 36
    unsigned char result;
***************
*** 1711,1715 ****
  
  #line 36
!   result = InternalFlashC$InternalFlash$read(arg_0xa55a6d8, arg_0xa55a830, arg_0xa55a980);
  #line 36
  
--- 1712,1716 ----
  
  #line 36
!   result = InternalFlashC$InternalFlash$read(arg_0xa55a8b8, arg_0xa55aa10, arg_0xa55ab60);
  #line 36
  
***************
*** 1719,1731 ****
  }
  #line 36
  static inline 
! # 66 "TOSBootM.nc"
  void TOSBootM$gestureNotify(void)
! #line 66
  {
  
    uint8_t output = 0x7;
    uint8_t i;
! #line 69
    uint8_t j;
  
--- 1720,1739 ----
  }
  #line 36
+ # 32 "Leds.nc"
+ inline static  void TOSBootM$Leds$set(uint8_t arg_0xa55bc00){
+ #line 32
+   LedsC$Leds$set(arg_0xa55bc00);
+ #line 32
+ }
+ #line 32
  static inline 
! # 67 "TOSBootM.nc"
  void TOSBootM$gestureNotify(void)
! #line 67
  {
  
    uint8_t output = 0x7;
    uint8_t i;
! #line 70
    uint8_t j;
  
***************
*** 1737,1744 ****
  }
  
  static inline 
! #line 198
  void TOSBootM$startupSequence(void)
! #line 198
  {
  
--- 1745,1795 ----
  }
  
+ static inline  
+ # 43 "msp430/VoltageC.nc"
+ bool VoltageC$Voltage$okToProgram(void)
+ #line 43
+ {
+ 
+   int i;
+ 
+ 
+   ADC12CTL0 = 0x0010 + (2 << 8) + 0x0020;
+ 
+   ADC12CTL1 = 0x0200;
+ 
+   ADC12MCTL0 = (1 << 4) + 11;
+ 
+   for (i = 0; i < 0x3600; i++) ;
+ 
+ 
+   ADC12CTL0 |= 0x0002;
+ 
+   ADC12CTL0 |= 0x0001;
+ 
+   while ((ADC12IFG & 0x0001) == 0) ;
+ 
+ 
+   return ADC12MEM0 > VoltageC$VTHRESH;
+ }
+ 
+ # 32 "Voltage.nc"
+ inline static  bool TOSBootM$Voltage$okToProgram(void){
+ #line 32
+   unsigned char result;
+ #line 32
+ 
+ #line 32
+   result = VoltageC$Voltage$okToProgram();
+ #line 32
+ 
+ #line 32
+   return result;
+ #line 32
+ }
+ #line 32
  static inline 
! # 199 "TOSBootM.nc"
  void TOSBootM$startupSequence(void)
! #line 199
  {
  
***************
*** 1747,1750 ****
--- 1798,1810 ----
  
  
+ 
+ 
+   if (!TOSBootM$Voltage$okToProgram()) {
+ 
+       TOSBootM$startupLeds();
+       TOSBootM$runApp();
+     }
+ 
+ 
    TOSBootM$IntFlash$read((uint8_t *)0x70, &gestureCount, sizeof gestureCount);
  
***************
*** 1885,1905 ****
  
  # 32 "TOSBootExtFlash.nc"
! inline static  void TOSBootM$ExtFlash$startRead(uint32_t arg_0xa53ea28){
  #line 32
!   STM25PM$TOSBootExtFlash$startRead(arg_0xa53ea28);
  #line 32
  }
  #line 32
  static inline 
! # 87 "TOSBootM.nc"
  bool TOSBootM$verifyImage(uint32_t startAddr)
! #line 87
  {
  
    uint16_t crcTarget = 0;
! #line 89
    uint16_t crcTmp = 0;
    uint16_t addr;
! #line 90
    uint16_t len;
    uint16_t j;
--- 1945,1965 ----
  
  # 32 "TOSBootExtFlash.nc"
! inline static  void TOSBootM$ExtFlash$startRead(uint32_t arg_0xa540c58){
  #line 32
!   STM25PM$TOSBootExtFlash$startRead(arg_0xa540c58);
  #line 32
  }
  #line 32
  static inline 
! # 88 "TOSBootM.nc"
  bool TOSBootM$verifyImage(uint32_t startAddr)
! #line 88
  {
  
    uint16_t crcTarget = 0;
! #line 90
    uint16_t crcTmp = 0;
    uint16_t addr;
! #line 91
    uint16_t len;
    uint16_t j;
***************
*** 1981,1987 ****
  
  # 10 "msp430/HPLUSARTControl.nc"
! inline static  void STM25PM$USARTControl$tx(uint8_t arg_0xa597ed0){
  #line 10
!   HPLUSART0M$HPLUSARTControl$tx(arg_0xa597ed0);
  #line 10
  }
--- 2041,2047 ----
  
  # 10 "msp430/HPLUSARTControl.nc"
! inline static  void STM25PM$USARTControl$tx(uint8_t arg_0xa5b34e8){
  #line 10
!   HPLUSART0M$HPLUSARTControl$tx(arg_0xa5b34e8);
  #line 10
  }
***************
*** 2118,2122 ****
  
  # 32 "TOSBootProgFlash.nc"
! inline static  result_t TOSBootM$ProgFlash$write(uint32_t arg_0xa556160, uint8_t *arg_0xa5562c0, uint16_t arg_0xa556410){
  #line 32
    unsigned char result;
--- 2178,2182 ----
  
  # 32 "TOSBootProgFlash.nc"
! inline static  result_t TOSBootM$ProgFlash$write(uint32_t arg_0xa556390, uint8_t *arg_0xa5564f0, uint16_t arg_0xa556640){
  #line 32
    unsigned char result;
***************
*** 2124,2128 ****
  
  #line 32
!   result = ProgFlashM$ProgFlash$write(arg_0xa556160, arg_0xa5562c0, arg_0xa556410);
  #line 32
  
--- 2184,2188 ----
  
  #line 32
!   result = ProgFlashM$ProgFlash$write(arg_0xa556390, arg_0xa5564f0, arg_0xa556640);
  #line 32
  
***************
*** 2132,2138 ****
  }
  #line 32
! # 252 "TOSBootM.nc"
  int   main(void)
! #line 252
  {
  
--- 2192,2198 ----
  }
  #line 32
! # 262 "TOSBootM.nc"
  int   main(void)
! #line 262
  {
  
***************
*** 2144,2149 ****
    DCOCTL = 0x20 + 0x40 + 0x80;
  
-   wait(0xffff);
- 
    TOSBootM$SubControl$init();
    TOSBootM$SubControl$start();
--- 2204,2207 ----
***************
*** 2208,2214 ****
  
  static  
! # 14 "LedsC.nc"
  void LedsC$Leds$set(uint8_t ledsOn)
! #line 14
  {
    if (ledsOn & LedsC$GREEN_BIT) {
--- 2266,2272 ----
  
  static  
! # 43 "LedsC.nc"
  void LedsC$Leds$set(uint8_t ledsOn)
! #line 43
  {
    if (ledsOn & LedsC$GREEN_BIT) {
***************
*** 2216,2240 ****
      }
    else {
! #line 18
      TOSH_SET_GREEN_LED_PIN();
      }
! #line 19
    if (ledsOn & LedsC$YELLOW_BIT) {
      TOSH_CLR_YELLOW_LED_PIN();
      }
    else {
! #line 22
      TOSH_SET_YELLOW_LED_PIN();
      }
! #line 23
    if (ledsOn & LedsC$RED_BIT) {
      TOSH_CLR_RED_LED_PIN();
      }
    else {
! #line 26
      TOSH_SET_RED_LED_PIN();
      }
  }
  
  static  
  # 101 "msp430/InternalFlashC.nc"
--- 2274,2319 ----
      }
    else {
! #line 47
      TOSH_SET_GREEN_LED_PIN();
      }
! #line 48
    if (ledsOn & LedsC$YELLOW_BIT) {
      TOSH_CLR_YELLOW_LED_PIN();
      }
    else {
! #line 51
      TOSH_SET_YELLOW_LED_PIN();
      }
! #line 52
    if (ledsOn & LedsC$RED_BIT) {
      TOSH_CLR_RED_LED_PIN();
      }
    else {
! #line 55
      TOSH_SET_RED_LED_PIN();
      }
  }
  
+ static 
+ # 49 "TOSBootM.nc"
+ void TOSBootM$startupLeds(void)
+ #line 49
+ {
+ 
+   uint8_t output = 0x7;
+   uint8_t i;
+   uint16_t j;
+ 
+   TOSBootM$Leds$set(0x7);
+   for (i = 0; i < 3; i++, output >>= 1) {
+       for (j = 1536; j > 0; j -= 4) {
+           TOSBootM$Leds$set(output);
+           wait(j);
+           TOSBootM$Leds$set(output >> 0x1);
+           wait(1536 - j);
+         }
+     }
+ }
+ 
  static  
  # 101 "msp430/InternalFlashC.nc"
***************
*** 2253,2264 ****
  
  static 
! # 134 "TOSBootM.nc"
  result_t TOSBootM$programImage(uint32_t startAddr)
! #line 134
  {
  
    uint8_t buf[(uint32_t )512];
    uint16_t pageAddr;
! #line 137
    uint16_t newPageAddr;
    uint32_t intAddr;
--- 2332,2343 ----
  
  static 
! # 135 "TOSBootM.nc"
  result_t TOSBootM$programImage(uint32_t startAddr)
! #line 135
  {
  
    uint8_t buf[(uint32_t )512];
    uint16_t pageAddr;
! #line 138
    uint16_t newPageAddr;
    uint32_t intAddr;
***************
*** 2302,2306 ****
  
        if (
! #line 176
        TOSBootM$ProgFlash$write(pageAddr * (uint32_t )512, buf, 
        (uint32_t )512) == FAIL) {
--- 2381,2385 ----
  
        if (
! #line 177
        TOSBootM$ProgFlash$write(pageAddr * (uint32_t )512, buf, 
        (uint32_t )512) == FAIL) {
***************
*** 2347,2358 ****
  
  static 
! # 79 "TOSBootM.nc"
  uint32_t TOSBootM$extFlashRead32(void)
! #line 79
  {
    uint32_t result = 0;
    uint8_t i;
  
! #line 82
    for (i = 0; i < 4; i++) 
      result |= ((uint32_t )TOSBootM$ExtFlash$readByte() & 0xff) << i * 8;
--- 2426,2437 ----
  
  static 
! # 80 "TOSBootM.nc"
  uint32_t TOSBootM$extFlashRead32(void)
! #line 80
  {
    uint32_t result = 0;
    uint8_t i;
  
! #line 83
    for (i = 0; i < 4; i++) 
      result |= ((uint32_t )TOSBootM$ExtFlash$readByte() & 0xff) << i * 8;

Index: ident_flags.txt
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/Deluge/Deluge/TOSBoot/build/telosb/ident_flags.txt,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** ident_flags.txt	18 May 2005 02:55:23 -0000	1.8
--- ident_flags.txt	9 Jun 2005 19:29:00 -0000	1.9
***************
*** 1 ****
! -DIDENT_PROGRAM_NAME="TOSBoot" -DIDENT_PROGRAM_NAME_BYTES="84,79,83,66,111,111,116,0" -DIDENT_USER_ID="jwhui" -DIDENT_USER_ID_BYTES="106,119,104,117,105,0" -DIDENT_HOSTNAME="fx08722" -DIDENT_HOSTNAME_BYTES="102,120,48,56,55,50,50,0" -DIDENT_USER_HASH=0x87916b92L -DIDENT_UNIX_TIME=0x428aa70bL
--- 1 ----
! -DIDENT_PROGRAM_NAME="TOSBoot" -DIDENT_PROGRAM_NAME_BYTES="84,79,83,66,111,111,116,0" -DIDENT_USER_ID="jwhui" -DIDENT_USER_ID_BYTES="106,119,104,117,105,0" -DIDENT_HOSTNAME="bock" -DIDENT_HOSTNAME_BYTES="98,111,99,107,0" -DIDENT_USER_HASH=0x6ebe86b4L -DIDENT_UNIX_TIME=0x42a89815L

Index: main.exe
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/Deluge/Deluge/TOSBoot/build/telosb/main.exe,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
Binary files /tmp/cvs0ztjIa and /tmp/cvs7V1NX6 differ

Index: main.ihex
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/Deluge/Deluge/TOSBoot/build/telosb/main.ihex,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** main.ihex	18 May 2005 02:55:23 -0000	1.8
--- main.ihex	9 Jun 2005 19:29:00 -0000	1.9
***************
*** 1,12 ****
! :10400000B240805A20013F4094473E4000113D405D
  :1040100000110D9E0524FE4F00001E530E9DFB2B2C
  :104020003F4000113D4000110D9F0524CF4300008B
  :104030001F530F9DFB2B3040404030403E4000134B
  :104040003140FE3832C20343B012FE40F240070056
! :104050005700F240E0FF56003F433F53FE23F2D0AB
! :1040600080FF1E00F2D010001E00E2D31B00E2D23F
! :104070001B00F2D21B00F24017007000F240A2FFBA
! :104080007100E2437400C2437500C2437300F24002
! :1040900040000400D2C37000F2F03F000200F2F0D2
  :1040A0007F002A00C29328002438B012FE40B012CC
  :1040B0005C414F43B012A2413B4000067F400700E5
--- 1,12 ----
! :10400000B240805A20013F40EC473E4000113D4005
  :1040100000110D9E0524FE4F00001E530E9DFB2B2C
  :104020003F4000113D4000110D9F0524CF4300008B
  :104030001F530F9DFB2B3040404030403E4000134B
  :104040003140FE3832C20343B012FE40F240070056
! :104050005700F240E0FF5600F2D080FF1E00F2D081
! :1040600010001E00E2D31B00E2D21B00F2D21B00A4
! :10407000F24017007000F240A2FF7100E2437400AA
! :10408000C2437500C2437300F24040000400D2C333
! :104090007000F2F03F0002003F433F53FE23F2F076
  :1040A0007F002A00C29328002438B012FE40B012CC
  :1040B0005C414F43B012A2413B4000067F400700E5
***************
*** 14,18 ****
  :1040D000B012A2413F4000060F8B02243F53FE2343
  :1040E0002B821B93EB37B140F0000000B1D20000EF
! :1040F00022D1B01246460F43215330406C47C24391
  :104100002600C2432E00C2431B00C2431F00C2430D
  :104110003300C2433700F240E0FF2200C2432100D7
--- 14,18 ----
  :1040D000B012A2413F4000060F8B02243F53FE2343
  :1040E0002B821B93EB37B140F0000000B1D20000EF
! :1040F00022D1B0129C460F4321533040C447C243E3
  :104100002600C2432E00C2431B00C2431F00C2430D
  :104110003300C2433700F240E0FF2200C2432100D7
***************
*** 29,124 ****
  :1041C0003100033CF2D0400031004F4E5FF3042435
  :1041D000F2F0EFFF31003041F2D0100031003041F9
! :1041E0000B120A120C4F0B4E0A4D3C5000100D439F
! :1041F0005F427F108F115E42FF108E110F8E1F9352
! :1042000001341D434D9302243C5080000E4B0F4C53
! :104210000D4A3D533D930724EE4F00001F531E539C
! :104220003D533D93F9231F433A413B4130410B122B
! :104230000A120912081207120612318000020A4EF1
! :104240000B4FB01260454F9302201E43653C3A501D
! :1042500090010B630E4A0F4BB0122C43B012EA438D
! :10426000064E074FB012EA43084E094F0FDE0F9378
! :104270004F240E460F478E108F104EEF0EEF7FF338
! :1042800012C30F100E100A4E3893022039934324A4
! :104290000E460F473EF0FF010FF30B410B5E165326
! :1042A0000763B012BE43CB4F000038533963089305
! :1042B0000A2009930820B012EA43064E074FB012B5
! :1042C000EA43084E094F0E460F478E108F104EEFEF
! :1042D0000EEF7FF312C30F100E100A9E04200893F6
! :1042E000D3230993D1234F4AB012A2410B433C4040
! :1042F00000020D43B01270473C4000020D41B01265
! :10430000D2442E434F9308240893B3230993B12337
! :10431000F2D010001D000E430F4E31500002364106
! :104320003741384139413A413B4130410B120A1281
! :104330000A4E0B4FF2F0EFFF1D00F2D080FF1D0080
! :104340004E43F240ABFF7700C29302000534F2F017
! :104350007F0002001F43013C0F437FF34F93F4277C
! :104360005E537E900500ED2BF2D010001D00F2F0A0
! :10437000EFFF1D003BD000036C424F4C0F5F0F5FFF
! :104380000F5F0D4F3D820E4A0F4B0D93052412C354
! :104390000F100E101D83FB23C24E7700C293020044
! :1043A0000534F2F07F0002001F43013C0F437FF30E
! :1043B0004F93F4277C53E1233A413B4130415F4224
! :1043C0007600C24377005F4202007FF04000052480
! :1043D000F2F0BFFF02001F43013C0F437FF34F93F6
! :1043E000F2275F4276007FF330410B120A12091266
! :1043F00009430A434B43B012BE434D4F0E434F4B4C
! :104400000F5F0F5F0C4F0C5C0F4E0E4D0C9304248E
! :104410000E5E0F6F1C83FC2309DE0ADF5B536B9279
! :10442000EA2B0E490F4A39413A413B4130410B12C8
! :104430000A12091208120B4F084D0A4E3B50001089
! :104440003D4000103C40001009435E427F108E1139
! :104450005F42FF108F110E8F1E9301341943499351
! :1044600003243D508000043C3B5080003C508000C1
! :10447000B24084A52A01B24000A52C01B24002A599
! :104480002801CC430000B24040A528010F430E4B49
! :104490000E580C9B02280C9E0328EC4D0000033C98
! :1044A000EC4A00001A531F531C531D533F907F00CA
! :1044B000F02B6D4D5D53CC4D0000B24000A528019E
! :1044C000B24010A52C011F43384139413A413B41CC
! :1044D00030410B120A1209120A4E0B4F0F4D0D4AB2
! :1044E000094F0E4A0F4B3E8000500F7307280E4CA9
! :1044F0000F430E5A0F6B1E831F7302280F432C3C71
! :10450000B24084A52A01B24000A52C01B24002A508
! :1045100028018A430000B24040A528010B430F4CFC
! :1045200012C30F100B9F112C0C4F3D90FEFF062461
! :104530000F4B0F5F0F59AD4F0000033CBD400040D3
! :1045400000001B532D530B9CF02BB24000A52801FB
! :10455000B24010A52C011F4339413A413B41304143
! :104560000B120A120912081207120612051204127F
! :10457000074E084F3E5003000F63B0122C43B01299
! :10458000BE43444FF2D010001D00375010000863A6
! :104590003B4000013A4050034643469F472C4F465C
! :1045A0000F5F0E4F0F430E570F68B0122C43B0121F
! :1045B000BE43454FB012BE437FF38F1005DFF2D0EC
! :1045C00010001D000E4B0F430E570F68B0122C4306
! :1045D0000B430943099A132CB012BE437FF38F108B
! :1045E0000FE97E420F9304340F5F3FE02110013C3E
! :1045F0000F5F7E53F723094F1B530B9AED2BF2D01D
! :1046000010001D004F461F530A4F3C4050040B43FF
! :104610000D43B01290470B4E3A4050044F46B01233
! :10462000A24156534694022C0599B9270F4346944C
! :1046300001201F433441354136413741384139412A
! :104640003A413B4130410B120A12091231800600F7
! :104650001D430E413F407000B012E041D1530000B5
! :10466000E19300001D287A4007004B434F4AB012E7
! :10467000A2414E433F433F53FE235E536E92FA2BBB
! :104680005B537AE37B900600F12B0E433F400F0013
! :10469000B0122E426F930420B2400F5A2001FF3F08
! :1046A0001D430E413F407000B0122E441D430E4189
! :1046B0001E533F407E00B012E0415F4101006FF3A6
! :1046C0001F20E19300001C2C2D420E412E533F4031
! :1046D0007100B012E0411E4102001F410400B012FF
! :1046E0002E426F930420B2400F5A2001FF3FE1D3C6
! :1046F00001001D430E411E533F407E00B0122E4468
! :104700007A4007007F400700B012A24149433B4076
! :1047100000064F4AB012A2410F4B0B9302243F53A5
! :10472000FE234F4A12C34F10B012A2413F40000671
! :104730000F8B02243F53FE232B82EB23595312C3CA
! :104740004A1079900300E32BF14300001D430E4112
! :104750003F407000B0122E44B0125C413040005017
! :104760003150060039413A413B41304102DFFE3FC2
! :104770000E430F43083C12C30D100C1002280E5AB2
! :104780000F6B0A5A0B6B0C93F6230D93F4233041F5
! :0447900030407047FE
  :0400000300004000B9
  :00000001FF
--- 29,129 ----
  :1041C0003100033CF2D0400031004F4E5FF3042435
  :1041D000F2F0EFFF31003041F2D0100031003041F9
! :1041E0000B120A1209127A4007007F400700B01232
! :1041F000A24149433B4000064F4AB012A2410F4B37
! :104200000B9302243F53FE234F4A12C34F10B012A8
! :10421000A2413F4000060F8B02243F53FE232B8216
! :10422000EB23595312C34A1079900300E32B394111
! :104230003A413B4130410B120A120C4F0B4E0A4DD2
! :104240003C5000100D435F427F108F115E42FF1003
! :104250008E110F8E1F9301341D434D9302243C5049
! :1042600080000E4B0F4C0D4A3D533D930724EE4FFB
! :1042700000001F531E533D533D93F9231F433A4102
! :104280003B4130410B120A120912081207120612A2
! :10429000318000020A4E0B4FB012B6454F930220F8
! :1042A0001E43653C3A5090010B630E4A0F4BB0120F
! :1042B0008243B0124044064E074FB0124044084EAD
! :1042C000094F0FDE0F934F240E460F478E108F10AD
! :1042D0004EEF0EEF7FF312C30F100E100A4E3893FD
! :1042E0000220399343240E460F473EF0FF010FF39F
! :1042F0000B410B5E16530763B0121444CB4F000002
! :104300003853396308930A2009930820B0124044B7
! :10431000064E074FB0124044084E094F0E460F4755
! :104320008E108F104EEF0EEF7FF312C30F100E1092
! :104330000A9E04200893D3230993D1234F4AB01235
! :10434000A2410B433C4000020D43B012C8473C4021
! :1043500000020D41B01228452E434F9308240893C4
! :10436000B3230993B123F2D010001D000E430F4E6A
! :104370003150000236413741384139413A413B41E1
! :1043800030410B120A120A4E0B4FF2F0EFFF1D00E4
! :10439000F2D080FF1D004E43F240ABFF7700C29386
! :1043A00002000534F2F07F0002001F43013C0F437E
! :1043B0007FF34F93F4275E537E900500ED2BF2D0F0
! :1043C00010001D00F2F0EFFF1D003BD000036C4217
! :1043D0004F4C0F5F0F5F0F5F0D4F3D820E4A0F4B2B
! :1043E0000D93052412C30F100E101D83FB23C24E24
! :1043F0007700C29302000534F2F07F0002001F43F1
! :10440000013C0F437FF34F93F4277C53E1233A4160
! :104410003B4130415F427600C24377005F42020079
! :104420007FF040000524F2F0BFFF02001F43013C73
! :104430000F437FF34F93F2275F4276007FF33041C3
! :104440000B120A12091209430A434B43B0121444D7
! :104450004D4F0E434F4B0F5F0F5F0C4F0C5C0F4ED9
! :104460000E4D0C9304240E5E0F6F1C83FC2309DE9B
! :104470000ADF5B536B92EA2B0E490F4A39413A41EE
! :104480003B4130410B120A12091208120B4F084D22
! :104490000A4E3B5000103D4000103C4000100943C4
! :1044A0005E427F108E115F42FF108F110E8F1E93A0
! :1044B00001341943499303243D508000043C3B5090
! :1044C00080003C508000B24084A52A01B24000A583
! :1044D0002C01B24002A52801CC430000B24040A507
! :1044E00028010F430E4B0E580C9B02280C9E0328EC
! :1044F000EC4D0000033CEC4A00001A531F531C53C0
! :104500001D533F907F00F02B6D4D5D53CC4D00004F
! :10451000B24000A52801B24010A52C011F4338412C
! :1045200039413A413B4130410B120A1209120A4EFD
! :104530000B4F0F4D0D4A094F0E4A0F4B3E80005056
! :104540000F7307280E4C0F430E5A0F6B1E831F73F9
! :1045500002280F432C3CB24084A52A01B24000A59A
! :104560002C01B24002A528018A430000B24040A5B8
! :1045700028010B430F4C12C30F100B9F112C0C4F33
! :104580003D90FEFF06240F4B0F5F0F59AD4F00000B
! :10459000033CBD40004000001B532D530B9CF02BEF
! :1045A000B24000A52801B24010A52C011F4339419B
! :1045B0003A413B4130410B120A120912081207120C
! :1045C000061205120412074E084F3E5003000F63F7
! :1045D000B0128243B0121444444FF2D010001D00B8
! :1045E0003750100008633B4000013A4050034643F7
! :1045F000469F472C4F460F5F0E4F0F430E570F68D5
! :10460000B0128243B0121444454FB01214447FF3E9
! :104610008F1005DFF2D010001D000E4B0F430E5718
! :104620000F68B01282430B430943099A132CB0124E
! :1046300014447FF38F100FE97E420F9304340F5F11
! :104640003FE02110013C0F5F7E53F723094F1B53BE
! :104650000B9AED2BF2D010001D004F461F530A4F4E
! :104660003C4050040B430D43B012E8470B4E3A4018
! :1046700050044F46B012A24156534694022C05995D
! :10468000B9270F43469401201F4334413541364139
! :104690003741384139413A413B4130410B120A120E
! :1046A00031800600B2403002A001B2400002A201F7
! :1046B000F2401B0080000F431F533F900036FC3B2D
! :1046C000A2D3A00192D3A0011F42A4011FF3FC2793
! :1046D0000F43B290670E400101281F437FF34F93B1
! :1046E0000620B012E041B0125C41304000501D4342
! :1046F0000E413F407000B0123642D1530000E193AA
! :1047000000001D287A4007004B434F4AB012A241D7
! :104710004E433F433F53FE235E536E92FA2B5B534F
! :104720007AE37B900600F12B0E433F400F00B0125E
! :1047300084426F930420B2400F5A2001FF3F1D4373
! :104740000E413F407000B01284441D430E411E5381
! :104750003F407E00B01236425F4101006FF31F20E0
! :10476000E19300001C2C2D420E412E533F4071005E
! :10477000B01236421E4102001F410400B0128442B2
! :104780006F930420B2400F5A2001FF3FE1D3010094
! :104790001D430E411E533F407E00B0128444B012B0
! :1047A000E041F14300001D430E413F407000B01254
! :1047B0008444B0125C4130400050315006003A4110
! :1047C0003B41304102DFFE3F0E430F43083C12C322
! :1047D0000D100C1002280E5A0F6B0A5A0B6B0C931B
! :0C47E000F6230D93F42330413040C8470D
  :0400000300004000B9
  :00000001FF



More information about the Tinyos-beta-commits mailing list