CVS: python ihex2titext.py,1.3,1.4 titext2ihex.py,1.3,1.4

Chris Liechti <[email protected]>
Newsgroups gmane.comp.hardware.texas-instruments.msp430.gcc.cvs
Message-ID <[email protected]>
Update of /cvsroot/mspgcc/python
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22111/python

Modified Files:
	ihex2titext.py titext2ihex.py 
Log Message:
use the new capabilities of the memory object

Index: ihex2titext.py
===================================================================
RCS file: /cvsroot/mspgcc/python/ihex2titext.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -w -d -r1.3 -r1.4
--- ihex2titext.py	28 Dec 2005 22:02:27 -0000	1.3
+++ ihex2titext.py	30 Dec 2005 01:50:28 -0000	1.4
@@ -39,8 +39,4 @@
         data.loadFile(filename)
 
 #output TI-Text
-for segment in data:
-    out.write("@%04x\n" % segment.startaddress)
-    for i in range(0, len(segment.data), 16):
-        out.write("%s\n" % " ".join(["%02x" % ord(x) for x in segment.data[i:i+16]]))
-out.write("q\n")
+data.saveTIText(out)

Index: titext2ihex.py
===================================================================
RCS file: /cvsroot/mspgcc/python/titext2ihex.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -w -d -r1.3 -r1.4
--- titext2ihex.py	28 Dec 2005 22:02:27 -0000	1.3
+++ titext2ihex.py	30 Dec 2005 01:50:28 -0000	1.4
@@ -40,6 +40,5 @@
         data.loadFile(filename)
 
 #write ihex file
-for segment in data:
-    makeihex((segment.startaddress, segment.data), eof=0, output=out)
-_ihexline(0, [], type=1, output=out)
+data.saveIHex(out)
+



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.