CVS: python/msp430 bsl.py,1.8,1.9

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-serv23100/python/msp430

Modified Files:
	bsl.py 
Log Message:
- small bugfix
- add nonstandard BSL baudrates: 56700, 115200. These are not supported by TI's BSL but from custom ones.

Index: bsl.py
===================================================================
RCS file: /cvsroot/mspgcc/python/msp430/bsl.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -w -d -r1.8 -r1.9
--- bsl.py	12 Aug 2005 21:10:44 -0000	1.8
+++ bsl.py	29 Sep 2005 21:32:40 -0000	1.9
@@ -378,11 +378,12 @@
         #Transmitting part ----------------------------------------
         #Prepare data for transmit
         if (length % 2) != 0:
-            #/* Fill with one byte to have even number of bytes to send */
+            #Fill with one byte to have even number of bytes to send
             if self.protocolMode == self.MODE_BSL:
                 dataOut.append(0xFF)  #fill with 0xFF
             else:
                 dataOut.append(0)     #fill with zero
+            length += 1
 
         txFrame = "%c%c%c%c" % (self.DATA_FRAME | self.seqNo, cmd, len(dataOut), len(dataOut))
 
@@ -818,7 +819,7 @@
                 if DEBUG:
                     sys.stderr.write("Autodetect successful: %04x -> %s\n" % (dev_id, self.cpu))
             else:
-                sys.stderr.write("Autodetect failed! Unkown ID: %04x. Trying to continue anyway.\n" % dev_id)
+                sys.stderr.write("Autodetect failed! Unknown ID: %04x. Trying to continue anyway.\n" % dev_id)
                 self.cpu = F1x                      #assume something and try anyway..
 
         sys.stderr.write("Current bootstrap loader version: %x.%x (Device ID: %04x)\n" % (bslVerHi, bslVerLo, dev_id))
@@ -974,11 +975,15 @@
              9600:[0x8580, 0x0000],
             19200:[0x86e0, 0x0001],
             38400:[0x87e0, 0x0002],
+            57600:[0x0000, 0x0003],     #nonstandard XXX BSL dummy BCSCTL settings!
+           115200:[0x0000, 0x0004],     #nonstandard XXX BSL dummy BCSCTL settings!
         },
         F4x: {
              9600:[0x9800, 0x0000],
             19200:[0xb000, 0x0001],
             38400:[0xc800, 0x0002],
+            57600:[0x0000, 0x0003],     #nonstandard XXX BSL dummy BCSCTL settings!
+           115200:[0x0000, 0x0004],     #nonstandard XXX BSL dummy BCSCTL settings!
         },
     }
     def actionChangeBaudrate(self, baudrate=9600):
@@ -995,6 +1000,8 @@
             raise ValueError, "baudrate not valid. valid values are %r" % baudconfigs.keys()
         
         sys.stderr.write("Changing baudrate to %d ...\n" % baudrate)
+        if baudrate > 38400:
+            sys.stderr.write("Note: The selected baudrate is not TI standard! They will not work with TI's BSLs.\n")
         sys.stderr.flush()
         self.bslTxRx(self.BSL_CHANGEBAUD,   #Command: change baudrate
                     a, l)                   #args are coded in adr and len



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
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.