CVS: python/msp430 memory.py,1.4,1.5
Chris Liechti <[email protected]>
| Newsgroups | gmane.comp.hardware.texas-instruments.msp430.gcc.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/mspgcc/python/msp430
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4185/python/msp430
Modified Files:
memory.py
Log Message:
- fix setMem function
- add --calibrate option, that recalculates the DCO calibration values of F2xx devices
- default tolerance changed (more accurate)
Index: memory.py
===================================================================
RCS file: /cvsroot/mspgcc/python/msp430/memory.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -w -d -r1.4 -r1.5
--- memory.py 28 Jan 2006 15:35:42 -0000 1.4
+++ memory.py 2 Feb 2006 00:01:19 -0000 1.5
@@ -219,15 +219,15 @@
range to be written has to be existent. a ValueError is raised if not
all data could be written (attention: a part of the data may have been
written!)"""
- data = []
+ #~ print "%04x: %r" % (address, contents)
for seg in self.segments:
- #~ print "0x%04x " * 2 % (seg.startaddress, seg.startaddress + len(seg.data))
+ #~ print "0x%04x " * 3 % (address, seg.startaddress, seg.startaddress + len(seg.data))
if seg.startaddress <= address and seg.startaddress + len(seg.data) >= address:
#segment contains data in the address range
offset = address - seg.startaddress
length = min(len(seg.data)-offset, len(contents))
seg.data = seg.data[:offset] + contents[:length] + seg.data[offset+length:]
contents = contents[length:] #cut away what is used
- if not contents: break #stop if done
+ if not contents: return #stop if done
address += length
raise ValueError("could not write all data")
-------------------------------------------------------
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://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642