X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=tools%2Ftinyos%2Fmisc%2Ftos-build-deluge-image;h=3095167aeeed9ad4c37b26a5700c52c0c9ec4691;hb=62b84950912c1c033c401fb0b2a1efaceec78280;hp=085424011b42e7cccfec016c81ff3a3b68e7e435;hpb=a887d42035d66e33374c484606bbb11cafec6c31;p=tinyos-2.x.git diff --git a/tools/tinyos/misc/tos-build-deluge-image b/tools/tinyos/misc/tos-build-deluge-image index 08542401..3095167a 100755 --- a/tools/tinyos/misc/tos-build-deluge-image +++ b/tools/tinyos/misc/tos-build-deluge-image @@ -20,8 +20,8 @@ # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF # THE POSSIBILITY OF SUCH DAMAGE. -# @author Chieh-Jan Mike Liang # @author Razvan Musaloiu-E. +# @author Chieh-Jan Mike Liang import sys, struct, operator from xml.dom.minidom import parse @@ -147,8 +147,8 @@ for line in image.split(): all.append((start_addr, section)) if rectype == 0x03: # This last record updates the first 4 bytes which - # holds some some low level configuration. They are - # the same all the time so I guess that's why they are + # holds some low level configuration. They are the + # same all the time so I guess that's why they are # skipped. break section = [] @@ -173,6 +173,7 @@ for (addr, data) in all: all_data += encode(addr, 4) + \ encode(len(data), 4) + \ data +all_data += encode(0, 4) + encode(0, 4) # Add the marker for the end of an image padding = [0] * (DELUGE_BYTES_PER_PAGE - len(all_data) % DELUGE_BYTES_PER_PAGE) if len(padding) < DELUGE_BYTES_PER_PAGE: all_data += padding