CVS: python README-msp430-jtag.txt,1.4,1.5 msp430-jtag.py,1.16,1.17
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-serv14451/python Modified Files: README-msp430-jtag.txt msp430-jtag.py Log Message: - new --quiet option to suppress diagnostic messages (don't use ;-) - new option --secure to blow the JTAG fuse (only with some backends and JTAG adapters) - new backend selection on windows: 1. try TI/3 party suppliers MSPGCC.dll (no funclets support in that case!) 2. use our MSPGCC implementation. This allows to use the USB JTAG adapters, at least on windows Index: README-msp430-jtag.txt =================================================================== RCS file: /cvsroot/mspgcc/python/README-msp430-jtag.txt,v retrieving revision 1.4 retrieving revision 1.5 diff -u -w -d -r1.4 -r1.5 --- README-msp430-jtag.txt 27 Dec 2005 15:16:33 -0000 1.4 +++ README-msp430-jtag.txt 9 Mar 2006 21:00:52 -0000 1.5 @@ -5,7 +5,7 @@ It is released under a free software license, see license.txt for more details. -(C) 2002-2004 Chris Liechti <[email protected]> +(C) 2002-2006 Chris Liechti <[email protected]> Features @@ -19,13 +19,15 @@ - use on command line, or in a Python script - reset and wait for keypress (to run a device directly from the port power) +- TI/3rd party library support for USB JTAG adaptors (Windows only) Requirements ------------ - Linux, BSD, Un*x or Windows PC -- Python 2.0 or newer, 2.2+ recomeded +- Python 2.0 or newer, 2.3+ recomeded - Parallel JTAG hardware with an MSP430 device connected + (optionaly a USB adapter and a coresponding MSP430.dll on Windows) Installation @@ -33,26 +35,28 @@ Binaries for Windows can be found in the download section of http://mspgcc.sf.net -XXX +Linux users should refer to the next secion. -Bilding from source -------------------- + +Building from source +-------------------- The libraries from the CVS module jtag/* have to be built. -On Linux/Un*x just Python 2.2+ is needed. On some distributions is Python 1.5.2 +On Linux/Un*x Python 2.2+ is needed. On some distributions is Python 1.5.2 installed per default. You may meed to change the first line in the script from "python" to "python2". Maybe Python 2.x is in a separate package that has to be installed. There are rpm and deb binary packages and a source tarball available through the Python homepage. -_parjtag.so/dll from the jtag archive can be copied to the same directory as -msp430-jtag.py or to a directory on the PATH. +There prefered backend is the a ctypes version, which means just +libMSP430mspgcc.so/dll libHIL.so/HIL.dll is needed and of course the ctypes +python extension. + +Alternatively _parjtag.so/dll from the jtag archive can be copied to the same +directory as msp430-jtag.py or to a directory on the PATH. It's recomended to install jtag.py as "msp430-jtag" in a directory in the PATH and make it executable. -There is also a ctypes version, which means just libHIL.so/HIL.dll is needed -and the ctypes python extension. - Short introduction ------------------ @@ -63,8 +67,8 @@ If its used from the source directory use "python jtag.py". - USAGE: msp430-jtag.py [options] [file] +Version: 2.2 If "-" is specified as file the data is read from stdin. A file ending with ".txt" is considered to be in TI-Text format all @@ -110,6 +114,10 @@ -E, --erasecheck Erase Check by file -p, --program Program file -v, --verify Verify by file + --secure Blow JTAG security fuse. + Note: This is not reversible, use with care! + Note: Not supported with the simple parallel port + adapter (7V source required). The order of the above options matters! The table is ordered by normal execution order. For the options "Epv" a file must be specified. @@ -157,6 +165,9 @@ try programming the device *without* the '--no-close' option first, and introduce this option only if the uploaded code fails to start. + Aleternatively, it is possible run ``msp430-jtag -w`` t power the + eval board from the JTAG interface. + Examples -------- @@ -211,6 +222,31 @@ line) +USB JTAG adapters +----------------- +This section only applies to Windows (currently). + +USB JTAG adapters are supported trough the MSP430.dlls from the adaptor +vendor. To enable its use, copy MSP430.dll (and maybe HIL.dll) to the +``bin`` folder, where msp430-jtag.exe is located. + +For example for MSP-FET430UIF from TI: +- download and install CCE (Code Composer, the free version) +- install the USB driver that comes with CCE, you'll also need to install + CCE itself, as that unpacks the MSP430.dll. +- copy MSP430.dll and HIL.dll (or simply all the files you find in the folder) + from ``C:\Program Files\CCEssentials\FTSuite\emulation\msp430`` to + ``c:\mspgcc\bin`` (substitute the source and destination folders according + to you own setup) +- reboot + +The MSP-FET430UIF is registered as serial port. Find out which COM port it is +(Device Manager). The for example run:: + + msp430-jtag -l COM5 --upload=0x0ff0 + + + History ------- V1.0 @@ -226,11 +262,15 @@ mainerase, progress options, ihex output V2.0 - updateed imlementation, new ctypes backend + updated implementation, new ctypes backend V2.1 F2xx support, improved options for funclets +V2.2 + added --quiet and --secure. Try to use 3rd party MSP430 libraries so that + USB adapters can be used. + References ---------- Index: msp430-jtag.py =================================================================== RCS file: /cvsroot/mspgcc/python/msp430-jtag.py,v retrieving revision 1.16 retrieving revision 1.17 diff -u -w -d -r1.16 -r1.17 --- msp430-jtag.py 30 Dec 2005 03:47:49 -0000 1.16 +++ msp430-jtag.py 9 Mar 2006 21:00:52 -0000 1.17 @@ -16,7 +16,7 @@ from msp430 import memory, jtag -VERSION = "2.1" +VERSION = "2.2" DEBUG = 0 #disable debug messages by default @@ -76,6 +76,10 @@ -E, --erasecheck Erase Check by file -p, --program Program file -v, --verify Verify by file + --secure Blow JTAG security fuse. + Note: This is not reversible, use with care! + Note: Not supported with the simple parallel port + adapter (7V source required). The order of the above options matters! The table is ordered by normal execution order. For the options "Epv" a file must be specified. @@ -131,18 +135,19 @@ parameters = [] results = [] timeout = 1 + quiet = 0 - sys.stderr.write("MSP430 parallel JTAG programmer Version: %s\n" % VERSION) try: opts, args = getopt.getopt(sys.argv[1:], - "hl:weEmpvrg:Du:d:s:xbiITfR:S", + "hl:weEmpvrg:Du:d:s:xbiITfR:Sq", ["help", "lpt=", "wait" "masserase", "erasecheck", "mainerase", "program", "erase=", "eraseinfo", "verify", "reset", "go=", "debug", "upload=", "download=", "size=", "hex", "bin", "ihex", "intelhex", "titext", "funclet", "ramsize=", "progress", - "no-close", "parameter=", "result=", "timeout="] + "no-close", "parameter=", "result=", "timeout=", "secure", + "quiet"] ) except getopt.GetoptError, e: # print help information and exit: @@ -293,15 +298,29 @@ results.append(('0x%04x: %%r' % start, jtagobj.uploadData, (start, end-start))) elif o in ("--timeout", ): timeout = float(a) + elif o in ("--secure", ): + todo.append(jtagobj.actionSecure) + elif o in ("-q", "--quiet", ): + quiet = 1 + jtagobj.verbose = 0 + + if DEBUG: + if quiet: + quiet = 0 + sys.stderr.write("Disabling --quiet as --debug is active\n") + + if not quiet: + sys.stderr.write("MSP430 parallel JTAG programmer Version: %s\n" % VERSION) if len(args) == 0: + if not quiet: sys.stderr.write("Use -h for help\n") elif len(args) == 1: #a filename is given if not funclet: if not todo: #if there are no actions yet - todo.extend([ #add some useful actions... + todo.insert(0, #add some useful actions... jtagobj.actionProgram, - ]) + ) filename = args[0] else: #number of args is wrong sys.stderr.write("\nUnsuitable number of arguments\n") @@ -316,14 +335,17 @@ #sanity check of options if goaddr and reset: + if not quiet: sys.stderr.write("Warning: option --reset ignored as --go is specified!\n") reset = 0 if startaddr and reset: + if not quiet: sys.stderr.write("Warning: option --reset ignored as --upload is specified!\n") reset = 0 if startaddr and wait: + if not quiet: sys.stderr.write("Warning: option --wait ignored as --upload is specified!\n") wait = 0 @@ -350,6 +372,7 @@ if DEBUG > 5: sys.stderr.write("File: %r\n" % filename) + # debug messages if toinit: if DEBUG > 0: #debug #show a nice list of sheduled actions ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642