X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=tos%2Flib%2Ftosboot%2FTOSBootM.nc;h=fb73723ee06b280c220ece55e8579befcf59c60c;hb=6061f45930a7b91681a41cb84dea385454813054;hp=e04718f4d33d0abb97845aaf126aa3857511e20b;hpb=bd9dd78d2699882e732caef8be76b0fa975bced6;p=tinyos-2.x.git diff --git a/tos/lib/tosboot/TOSBootM.nc b/tos/lib/tosboot/TOSBootM.nc index e04718f4..fb73723e 100644 --- a/tos/lib/tosboot/TOSBootM.nc +++ b/tos/lib/tosboot/TOSBootM.nc @@ -96,10 +96,11 @@ implementation { } bool verifyImage(ex_flash_addr_t startAddr) { - uint16_t addr; + uint32_t addr; uint8_t numPgs; uint8_t i; + if (!verifyBlock(startAddr + offsetof(DelugeIdent,crc), startAddr, offsetof(DelugeIdent,crc))) return FALSE; @@ -118,9 +119,6 @@ implementation { for ( i = 0; i < numPgs; i++ ) { if (!verifyBlock(startAddr + i*sizeof(uint16_t), startAddr + addr, DELUGE_BYTES_PER_PAGE)) { - if (i == 0) - while (1) - call Leds.flash(2); return FALSE; } addr += DELUGE_BYTES_PER_PAGE; @@ -131,7 +129,7 @@ implementation { error_t programImage(ex_flash_addr_t startAddr) { uint8_t buf[TOSBOOT_INT_PAGE_SIZE]; - uint16_t pageAddr, newPageAddr; + uint32_t pageAddr, newPageAddr; in_flash_addr_t intAddr; in_flash_addr_t secLength; ex_flash_addr_t curAddr;