CVS: python msp430-jtag.py,1.9,1.10

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-serv16016/python

Modified Files:
	msp430-jtag.py 
Log Message:
- F2xx support

Index: msp430-jtag.py
===================================================================
RCS file: /cvsroot/mspgcc/python/msp430-jtag.py,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -w -d -r1.9 -r1.10
--- msp430-jtag.py	14 Jun 2005 10:16:58 -0000	1.9
+++ msp430-jtag.py	22 Dec 2005 01:57:37 -0000	1.10
@@ -52,6 +52,8 @@
 Program Flow Specifiers:
 
   -e, --masserase       Mass Erase (clear all flash memory)
+                        Note: SegmentA on F2xx is NOT erased, that must be
+                        done separately with --erase=0x1000
   -m, --mainerase       Erase main flash memory only
   --eraseinfo           Erase info flash memory only (0x1000-0x10ff)
   --erase=address       Selectively erase segment at the specified address
@@ -156,8 +158,11 @@
                     sys.stderr.write("Address range end address must be a valid number in dec, hex or octal\n")
                     sys.exit(2)
                 while adr <= adr2:
-                    if adr < 0x1100:
-                        modulo = 128
+                    if not (0x1000 <= adr <= 0xffff):
+                        sys.stderr.write("Start address is not within Flash memory\n")
+                        sys.exit(2)
+                    elif adr < 0x1100:
+                        modulo = 64     #F2xx XXX: on F1xx/F4xx are segments erased twice
                     elif adr < 0x1200:
                         modulo = 256
                     else:
@@ -173,8 +178,11 @@
                     sys.stderr.write("Segment address must be a valid number in dec, hex or octal or a range adr1-adr2\n")
                     sys.exit(2)
         elif o == "--eraseinfo":
+            #F2xx XXX: on F1xx/F4xx are segments erased twice
             toinit.append(jtagobj.makeActionSegmentErase(0x1000))
+            toinit.append(jtagobj.makeActionSegmentErase(0x1040))
             toinit.append(jtagobj.makeActionSegmentErase(0x1080))
+            toinit.append(jtagobj.makeActionSegmentErase(0x10c0))
         elif o in ("-p", "--program"):
             todo.append(jtagobj.actionProgram)          #Program file
         elif o in ("-v", "--verify"):



-------------------------------------------------------
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.