Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion tools/tinyos/misc/tos-build-deluge-image.in
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,11 @@ all = []
section = []
end_addr = None
offset = 0
addr_high = 0
for line in image.split():
#print "DEBUG:", line
length = int(line[1:3], 16)
addr = int(line[3:7], 16) + offset
addr = int(line[3:7], 16) + offset + addr_high
rectype = int(line[7:9], 16)
data = []
if len(line) > 11:
Expand Down Expand Up @@ -172,6 +173,8 @@ for line in image.split():
all.append((start_addr, section))
section = []
start_addr = addr
elif rectype == 0x04:
addr_high = int(line[9:9+4], 16) << 16

sys.stderr.write('Ihex read complete:\n')
sys.stderr.write(' ' + '\n '.join(["%5d bytes starting at 0x%X" % (len(l), a) for (a, l) in all]))
Expand Down
20 changes: 20 additions & 0 deletions tos/lib/tosboot/TosBootP.nc
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,29 @@ implementation {
intAddr++; curAddr++;

if ( --secLength == 0 ) {
while (TRUE) {
intAddr = extFlashReadAddr();
secLength = extFlashReadAddr();
curAddr = curAddr + 8;
#if defined(PLATFORM_TELOSB) || defined (PLATFORM_EPIC) || defined (PLATFORM_TINYNODE)
if (FALSE) {
// TODO: check of valid flash address range needed
#elif defined(PLATFORM_MICAZ) || defined(PLATFORM_IRIS)
if (intAddr > FLASHEND) {
// ram, eeprom, fuses ... programming not supported
#elif defined(PLATFORM_MULLE)
if (FALSE) {
// TODO: check of valid flash address range needed
#else
#error "Target platform is not currently supported by Deluge T2"
#endif
curAddr += secLength; // skip block
call ExtFlash.stopRead();
call ExtFlash.startRead(curAddr);
continue;
}
break;
}
}

newPageAddr = intAddr / TOSBOOT_INT_PAGE_SIZE;
Expand Down