tos-set-symbols.1 \
tos-storage-at45db.1 \
tos-storage-stm25p.1 \
- tos-write-image.1
+ tos-write-image.1 \
+ tos-build-deluge-image.1 \
+ tos-deluge.1
bin_SCRIPTS = tos-ident-flags \
# Converts baud rate from platform name to value, if necessary
try:
- int(baudrate)
+ baudrate = int(baudrate)
except:
baudrate = __baud_rate.get(baudrate)
ident[k] = v
for p in ['unix_time', 'user_hash', 'uid_hash']:
ident[p] = int(ident[p][:-1], 16)
-image = dom.getElementsByTagName('image')[0].firstChild.nodeValue
+
+error = "ERROR: getting the image from the XML file failed."
+try:
+ image_element = dom.getElementsByTagName('image')[0]
+ if image_element.getAttribute('format') != 'ihex':
+ error = "ERROR: image format is %s instead of ihex" % image_element.getAttribute('format')
+ sys.exit()
+ image = image_element.firstChild.nodeValue
+except:
+ sys.stderr.write(error + '\n')
+ sys.exit()
all = []
section = []
--- /dev/null
+.TH tos-build-deluge-image 1 "Jul 16, 2007"
+.LO 1
+.SH NAME
+
+tos-build-deluge-image \- internal tool for Deluge T2
+
+.SH DESCRIPTION
+
+\fBtos-build-deluge-image\fR is used by \fBtos-deluge\fR to construct the binary image needed by tosboot.
+
+.SH "SEE ALSO"
+\fItos-deluge\fR(1)
\ No newline at end of file
print "--------------------------------------------------"
# Writes the new binary image
- if op_erase(s, img_num):
- if op_write(s, img_num, p.stdout.read()):
+ image = p.stdout.read()
+ if len(image) > 0 and op_erase(s, img_num):
+ if op_write(s, img_num, image):
if op_sync(s, img_num):
print "--------------------------------------------------"
metadata = getMetaData(s, img_num)
--- /dev/null
+.TH tos-deluge 1 "Jul 16, 2007"
+.SH NAME
+tos-deluge \- Management tool for Deluge T2
+
+.SH SYNOPSIS
+\fBtos-deluge\fR \fIdevice\fR \fIbaudrate\fR <\fB-p\fR|\fB-r\fR|\fB-d\fR|\fB-e\fR|\fB-s\fR> \fIimage_number\fR
+
+\fBtos-deluge\fR \fIdevice\fR \fIbaudrate\fR \fB-i\fR \fIimage_number\fR \fItos_image.xml\fR
+
+.SH DESCRIPTION
+
+\fBtos-deluge\fR is the management tool for Deluge T2. The available operations are:
+
+.SH ARGUMENTS
+.TP
+.I device
+Any device accepted by PySerial. Examples:
+.RS
+.IP \(bu 4
+/dev/ttyUSB0
+.IP \(bu 4
+COM10
+.IP \(bu 4
+11
+.RE
+
+.TP
+.I baudrate
+Two shortcuts are available: \fBmicaz\fR for 57600 and \fBtelosb\fR for 115200.
+.TP
+.I image_number
+A integer number. 0 is the first image.
+
+.SH OPTIONS
+.TP
+.B -p, --ping
+Provide status of the image in the external flash
+.TP
+.B -i, --inject
+Inject a compiled TinyOS application. The tos_image.xml file path
+.TP
+.B -r, --reprogram
+Reprogram the network
+.TP
+.B -b, --reprogram_bs
+Reprogram only the directly-connected mote
+.TP
+.B -d, --dissemination
+Disseminate the image in the external flash to the network
+.TP
+.B -e, --erase
+Erase an image in the external flash
+.TP
+.B -s, --reset
+Reset the versioning information for a given image