CVS: packaging README-msp430-bsl.txt, 1.2, 1.3 README-msp430-jtag.txt, 1.2, 1.3 makefile, 1.25, 1.26

Chris Liechti <[email protected]> Thu, 15 Feb 2007 05:16:00 -0800
Newsgroups gmane.comp.hardware.texas-instruments.msp430.gcc.cvs
Message-ID <[email protected]>
Update of /cvsroot/mspgcc/packaging
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv21310/packaging

Modified Files:
	README-msp430-bsl.txt README-msp430-jtag.txt makefile 
Log Message:
sync files, used for 20070213 build of installer

Index: README-msp430-bsl.txt
===================================================================
RCS file: /cvsroot/mspgcc/packaging/README-msp430-bsl.txt,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -w -d -r1.2 -r1.3
--- README-msp430-bsl.txt	26 Sep 2005 22:46:39 -0000	1.2
+++ README-msp430-bsl.txt	15 Feb 2007 13:15:54 -0000	1.3
@@ -1,5 +1,5 @@
-pyBSL
-----
+msp430-bsl
+==========
 
 BootStrapLoader software for the flash devices MSP430F1xx 
 (maybe F4xx too, but its not tested).
@@ -10,10 +10,11 @@
 
 (C) 2001-2003 Chris Liechti <[email protected]>
 
+
 Features
 --------
 
-- understands ELF, TI-Text and Intel-hex
+- understands ELF, TI-Text and Intel-hex object files
 - download to Flash and/or RAM, erase, verify
 - reset and wait for keypress (to run a device directly from the port
   power)
@@ -22,14 +23,15 @@
   device in an earlier session
 - upload a memory block MSP->PC (output as binary data or hex dump)
 - written in Python, runs on Win32, Linux, BSD (other unices have other
-  device names but should be faisible), Jython (Python in Java)
-- use per command line, or in a Python script
+  device names but should be faisible)
+- use on command line, or in a Python script
 - download a program, execute it, resynchronize and upload results.
   (for testing and callibration)
-- downladable BSL for larger devices
+- downloadable BSL for larger devices (integrated or user supplied)
 - baudrate change for newer MSP430-BSLs
 - test and reset lines can be inverted for non standard BSL hardware
 
+
 Requirements
 ------------
 - Linux, BSD, Un*x or Windows PC
@@ -37,25 +39,15 @@
 - win32all extensions to Python on Windows
 - BSL hardware with an MSP430 device connected to a serial port 
 
+
 Installation
 ------------
 Python installations are available from www.python.org. On Windows simply
 use the installer. The win32all package has an installer too. These
 installations should run fine with the deafults.
 
-On Linux just Python is needed. On many distributions is Python 1.5.2
-incuded. I suggest that an upgrade to 2.2 or newer. There are rpm and deb
-binary packages and a source tarball availabe through the Python homepage.
-
-The pybsl archive can simply be unpacked to a directory, Windows users
-can use WinZip or WinRar among others to extract the gzipped tar file.
-If you want to run it from everywhere the directory where the file bsl.py
-is, should be added to the PATH.
-Look at "/etc/profile" on Linux, "autoexec.bat" on Win9x/ME,
-System Properties/Environment in Win2000/NT/XP.
+XXX
 
-For Jython you need to have installed the "Java Communications API"
-(JavaComm).
 
 Short introduction
 ------------------
@@ -63,10 +55,10 @@
 in the application note "slaa96b" from TI (see references). Then this
 programm can be used to communicate between the PC and the MSP430 device.
 
-The program can be started by typing "python bsl.py" in a console. Often
-it works also with just "bsl.py" or "./bsl.py".
+The program can be started by typing "msp430-bsl" in a console.
+To run it in the source directory, use "python msp430-bsl.py"
 
-USAGE: bsl.py [options] [file]
+USAGE: msp430-bsl [options] [file]
 
 If "-" is specified as file the data is read from the stdinput.
 A file ending with ".txt" is considered to be in TIText format,
@@ -76,10 +68,12 @@
 General options:
   -h, --help            Show this help screen.
   -c, --comport=port    Specify the communication port to be used.
-                        (Default is 0)
+                        (Default is 0)::
+                        
                                 0->COM1 / ttyS0
                                 1->COM2 / ttyS1
                                 etc.
+                                
   -P, --password=file   Specify a file with the interrupt vectors that
                         are used as password. This can be any file that
                         has previously been used to program the device.
@@ -99,7 +93,7 @@
   -I, --intelhex        Force fileformat to IntelHex
   -T, --titext          Force fileformat to be TIText
   -N, --notimeout       Don't use timeout on serial port (use with care)
-  -B, --bsl=bsl.txt     Load and use new BSL from the TI Text file
+  -B, --bsl=filename    Load and use new BSL from the TI Text file
   -S, --speed=baud      Reconfigure speed, only possible with newer
                         MSP403-BSL versions (>1.5, read slaa089a.pdf for
                         details). If the --bsl option is not used, an
@@ -116,6 +110,8 @@
   --invert-reset        Invert signal on RST pin (used for some BSL hardware)
   --invert-test         Invert signal on TEST/TCK pin (used for some BSL
                         hardware)
+  --slow                Add delays when operating the conrol pins. Useful if
+                        the pins/circuit has high capacitance.
 
 Program Flow Specifiers:
   -e, --masserase       Mass Erase (clear all flash memory)
@@ -151,36 +147,27 @@
 
 Examples
 --------
-These exaples assume that you have added the installation directory to
-the PATH. type the full path to bsl.py otherwise and maybe use
-"python bsl.py".
-
-bsl.py -e
+``msp430-bsl -e``
         Only erase flash.
 
-bsl.py -eErw 6port.a43
+``msp430-bsl -eErw 6port.a43``
         Erase flash, erase check, download an executable, run it (reset)
         and wait.
         
         Old F149 devices need addidional erase cycles! Use the -m
         option in this case (-m20 will be OK is most cases):
-        "python bsl.py -eErwm20 6port.a43"
+        "msp430-bsl -eErwm20 6port.a43"
 
-bsl.py 6port.a43
+``msp430-bsl 6port.a43``
         Download of an executable to en empty (new or erased) device.
         (Note that in new devices some of the first bytes in the
         information memory are random data. If data should be
         downloaded there, specify -eE.)
 
-bsl.py -erwB BL_150S_14x.txt -S 38400 6port.a43
-        Erase device, change baudrate and download a new BSL, then
-        download the specified file. After that, reset the device and
-        wait for user input.
-
-bsl.py --go=0x220 ramtest.a43
+``msp430-bsl --go=0x220 ramtest.a43``
         Download a program into RAM and run it (on an erased device)
 
-bsl.py --go=0x200 -P 6port.a43 ramtest.a43
+``msp430-bsl --go=0x200 -P 6port.a43 ramtest.a43``
         Download a program into RAM and run it (on a device that was
         previously programmed with 6port.a43 and therefore needs a
         specific password).
@@ -188,21 +175,24 @@
         For old devices that use the patch the above command gives a
         conflict with the patch. But as the patch is only needed to
         programm flash, it can be left out when running a program solely
-        from RAM:
-        "python bsl.py --go=0x200 -u -P 6port.a43 ramtest.a43"
+        from RAM::
 
-bsl.py -u 0x0c00 -s 1024 -P 6port.a43
+          msp430-bsl --go=0x200 -u -P 6port.a43 ramtest.a43
+
+``msp430-bsl -u 0x0c00 -s 1024 -P 6port.a43``
         Get a memory dump in HEX, from the bootstrap loader (on a device
         that was previously programmed with 6port.a43 and therefore needs
         a specific password):
 
-        or on unix with the use of "hexdump":
-        "python bsl.py -u 0x0c00 -s 1024 -P 6port.a43 -b | hexdump"
+        or on unix with the use of "hexdump"::
 
-        or save the binary in a file:
-        "python bsl.py -u 0x0c00 -s 1024 -P 6port.a43 -b >dump.bin"
+          msp430-bsl -u 0x0c00 -s 1024 -P 6port.a43 -b | hexdump
 
-bsl.py --go=0x220 --upload=0x200 --size=256 ramtest.a43
+        or save the binary in a file::
+        
+          msp430-bsl -u 0x0c00 -s 1024 -P 6port.a43 -b >dump.bin
+
+``msp430-bsl --go=0x220 --upload=0x200 --size=256 ramtest.a43``
         Download the file ramtest.a43 to an empty device, execute its
         main function at 0x0220. The BSL then tries to reconnect to the
         device. This does only work when the program on the MSP430
@@ -219,38 +209,40 @@
         program which possibly destroys a program that was downloaded
         to RAM.
 
-bsl.py -rw
+``msp430-bsl -rw``
         Just start the user program (with a reset) and wait.
 
-bsl.py -rwc1
+``msp430-bsl -rwc1``
         Reset the device on the second serial/COM port and wait.
 
-cat 6port.a43|bsl.py -eE -
+``cat 6port.a43|msp430-bsl -eE -``
         Pipe the data from "cat" to the BSL to erase and program the
         flash. (un*x example, don't forget the dash at the end of the
         line)
 
-bsl.py -e -S 38400 6port.a43
+``msp430-bsl -e -S 38400 6port.a43``
         First download the internal replacement BSL and then use it
         to program at 38400 baud. Only works with targets with more
         than 1kB of RAM.
 
-bsl.py -e -B BL_150S_14x.txt -S 38400 6port.a43
+``msp430-bsl -e -B BL_150S_14x.txt -S 38400 6port.a43``
         First download the given replacement BSL and then use it to
         program at 38400 baud. Only works with targets with more
         than 1kB of RAM.
 
+
 History
 -------
   V1.4
-        uses improved serial library
-        support for BSL download to MSP
+    uses improved serial library,
+    support for BSL download to MSP,
         support for higher baudrates (up to 38400)
 
   V1.5
-        ELF file support
+    ELF file support,
         replacement BSLs are now internal
 
+
 References
 ----------
 - Python: http://www.python.org
@@ -263,11 +255,11 @@
   and http://www.activestate.com/Products/ActivePython/win32all.html
 
 - slaa89.pdf: "Features of the MSP430 Bootstrap Loader in the
-  MSP430F1121", TI
+  MSP430F1121", TI, http://www.ti.com/msp430
 
 - slaa96b.pdf: "Application of Bootstrap Loader in MSP430 With Flash
   Hardware and Software Proposal", TI
 
 - Texas Instruments MSP430 Homepage, links to Datasheets and Application
-  Notes: http://www.ti.com/sc/docs/products/micro/msp430/msp430.htm
+  Notes: http://www.ti.com/msp430
 

Index: README-msp430-jtag.txt
===================================================================
RCS file: /cvsroot/mspgcc/packaging/README-msp430-jtag.txt,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -w -d -r1.2 -r1.3
--- README-msp430-jtag.txt	26 Sep 2005 22:46:39 -0000	1.2
+++ README-msp430-jtag.txt	15 Feb 2007 13:15:54 -0000	1.3
@@ -1,102 +1,165 @@
-pyJTAG
-------
+msp430-jtag
+===========
 
-Software to talk to the parallel port JTAG PCB as seen with the FET kits.
-It is released under a free software license,
-see license.txt for more details.
+Software to talk to the parallel port JTAG adapter as seen with the FET kits.
+It is released under a free software license, see license.txt for more details.
+
+(C) 2002-2006 Chris Liechti <[email protected]>
 
-(C) 2002-2003 Chris Liechti <[email protected]>
 
 Features
 --------
 
-- understands ELF, TI-Text and Intel-hex
-- download to Flash and/or RAM, erase, verify
+- understands ELF, TI-Text and Intel-hex object files
+- download to Flash and/or RAM, erase flash, verify
 - reset device
-- load addres into R0/PC and run
-- upload a memory block MSP->PC (output as binary data or hex dump)
-- written in Python, runs on Win32, Linux, BSD
-- use per command line, or in a Python script
+- upload a memory block MSP->PC (output as binary data or hex dump, ihex)
+- written in Python, runs on Win32, Linux, BSD, ...
+- 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
 ------------
-Python installations are available from www.python.org. On Windows simply
-use the installer. The win32all package has an installer too. These
-installations should run fine with the deafults.
+Binaries for Windows can be found in the download section of
+http://mspgcc.sf.net
 
-On Linux just Python is needed. On some distributions is Python 1.5.2
+Linux users should refer to the next secion.
+
+
+Building from source
+--------------------
+The libraries from the CVS module jtag/* have to be built. This includes
+MSP430mspgcc.dll and HIL.dll (respectively libMSP430mspgcc.so and
+libHIL.so ony Un*x platforms)
+
+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.
 
-The pyjtag archive can simply be unpacked to a directory, Windows users
-can use WinZip or WinRar among others to extract the gzipped tar file.
-If you want to run it from everywhere the directory where the file jtag.py
-is, should be added to the PATH.
-Look at "~/.profile", "/etc/profile" on Linux, "autoexec.bat" on Win9x/ME,
-System Properties/Environment in Win2000/NT/XP.
+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. The ctypes backend is also capable of using the closed
+source MSP430.dll/libMSP430.so library from TI or 3rd party supliers.
+
+Alternatively there is the older python extension module implemented in c
+called _parjtag.so/dll. Its sources can be found in the "python" folder of
+the CVS repository mentioned above. However, not all of the newest features
+may work with this backend.
 
-_parjtag.so/dll from the jtag archive must be copied to the same directory as
-jtag.py. On Windows also MSP430mspgcc.dll and HIL.dll must be located in the
-same dir or somewhere in the PATH.
 
 Short introduction
 ------------------
 This software uses the JTAG hardware that comes with the FET kits. It is
-connected to the parallel port.
+connected to the parallel port. Using 3rd party backends it is also possible
+to use USB programmers.
 
-The program can be started by typing "python jtag.py" in a console. Often
-it works also with just "jtag.py" or "./jtag.py".
+The program can be started by typing ``msp430-jtag`` when installed correctly
+If it's used from the source directory use "python msp430-jtag.py".
 
-USAGE: jtag.py [options] [file]
-If "-" is specified as file the data is read from the stdinput.
-A file ending with ".txt" is considered to be in TIText format all
-other filenames are considered IntelHex.
+
+USAGE: msp430-jtag [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
+other filenames are considered to be in Intel HEX format.
 
 General options:
-  -h, --help            Show this help screen.
-  -l, --lpt=name        Specify an other parallel port.
-                        (defaults to LPT1 (/dev/parport0 on unix)
+  -h, --help            Show this help text.
+  --help-backend        Show help about the different backends.
   -D, --debug           Increase level of debug messages. This won't be
-                        very useful for the average user...
-  -I, --intelhex        Force fileformat to IntelHex
-  -T, --titext          Force fileformat to be TIText
+                        very useful for the average user.
+  -I, --intelhex        Force input file format to Intel HEX.
+  -T, --titext          Force input file format to be TI-Text.
+  -R, --ramsize         Specify the amount of RAM to be used to program
+                        flash (default, if --ramsize is not given is
+                        autodetect).
+
+Connection:
+  -l, --lpt=name        Specify an other parallel port or serial port for the
+                        USBFET (the later requires MSP430.dll instead of
+                        MSP430mspgcc.dll).
+                        (defaults to "LPT1" ("/dev/parport0" on Linux))
+  --slowdown=microsecs  Artificially slow down the communication. Can help
+                        with long lines, try values between 1 and 50 (parallel
+                        port interface with mspgcc's HIL library only).
+                        (experts only)
+  --backend=backend     Select an alternate backend. See --help-backend for
+                        more information.
+
+.. note:: On Windows, use "TIUSB" or "COM5" etc if using MSP430.dll from TI.
+          If a MSP430.dll is found it is prefered, otherwise MSP430mspgcc.dll
+          is used.
+.. note:: --slowdown > 50 can result in failures for the ramsize autodetection
+          (use --ramsize option to fix this). Use the --debug option and watch
+          the outputs. The DCO clock adjustment and thus the Flash timing may
+          be inaccurate for large values.
+
+Funclets:
   -f, --funclet         The given file is a funclet (a small program to
-                        be run in RAM)
-  -R, --ramsize         Specify the amont of RAM to be used to program
-                        flash (default 256).
+                        be run in RAM).
+  --parameter=option    Pass parameters to funclets.
+                        Registers can be written like "R15=123" or "R4=0x55"
+                        A string can be written to memory with "0x2e0=hello"
+                        --parameter can be given more than once.
+  --result=value        Read results from funclets. "Rall" reads all registers
+                        (case insensitive) "R15" reads R15 etc. Address ranges
+                        can be read with "0x2e0-0x2ff". See also --upload.
+                        --result can be given more than once.
+  --timeout=value       Abort the funclet after the given time in seconds
+                        if it does not exit no itself. (default 1)
 
-Program Flow Specifiers:
+.. note:: Writing and/or reading RAM before and/or after running a funclet may
+          not work as expected on devices with the JTAG bug like the F123.
+.. note:: Only possible with MSP430mspgcc.dll, not other backends.
 
-  -e, --masserase       Mass Erase (clear all flash memory)
-  -m, --mainerase       Erase main flash memory only
-  --eraseinfo           Erase info flash memory only (0x1000-0x10ff)
-  --erase=address       Selectively erase segment at the specified address
-  -E, --erasecheck      Erase Check by file
-  -p, --program         Program file
-  -v, --verify          Verify by file
+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.
+  --erase=adr1-adr2     Selectively erase a range of segments.
+  -E, --erasecheck      Erase Check by file.
+  -p, --program         Program file.
+  -v, --verify          Verify by file.
+  --secure              Blow JTAG security fuse.
+  
+                        .. warning:: 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.
+execution order. For the options "E", "p" and "v" a file must be specified.
 Program flow specifiers default to "p" if a file is given.
-Don't forget to specify "e" or "eE" when programming flash!
+Don't forget to specify "e", "eE" or "m" when programming flash!
 "p" already verifies the programmed data, "v" adds an additional
-verification though uploading the written data for a 1:1 compare.
+verification through uploading the written data for a 1:1 compare.
 No default action is taken if "p" and/or "v" is given, say specifying
-only "v" does a check by file of a programmed device.
+only "v" does a "check by file" of a programmed device.
 
-Data retreiving:
-  -u, --upload=addr     Upload a datablock (see also: -s).
-  -s, --size=num        Size of the data block do upload. (Default is 2)
+Data retrieving:
+  -u, --upload=addr     Upload a datablock (see also: --size).
+                        It is also possible to use address ranges. In that
+                        case, multiple --upload parameters are allowed.
+  -s, --size=num        Size of the data block to upload (Default is 2).
   -x, --hex             Show a hexadecimal display of the uploaded data.
-                        (Default)
+                        This is the default format, see also --bin, --ihex.
   -b, --bin             Get binary uploaded data. This can be used
                         to redirect the output into a file.
   -i, --ihex            Uploaded data is output in Intel HEX format.
@@ -110,73 +173,187 @@
                         the programm that is specified in the reset
                         interrupt vector. (see also -g)
   -w, --wait            Wait for <ENTER> before closing parallel port.
+  --no-close            Do not close port on exit. Allows to power devices
+                        from the parallel port interface.
 
+Address parameters for --erase, --upload, --size can be given in
+decimal, hexadecimal or octal.
 
-Examples
+Examples:
+    Mass erase and program from file: "msp430-jtag -e firmware.elf"
+    Dump Information memory: "msp430-jtag --upload=0x1000-0x10ff"
+
+
+.. note::
+    Some versions of the Texas Instruments MSP430 Development Tool
+    require that you give the '--no-close' option to msp430-jtag. This
+    is because the Texas Instruments tool is powered via the JTAG
+    adapter; the '--no-close' option prevents msp430-jtag from powering
+    the adapter off.  You may also need to restart the program with 
+    msp430-jtag (using the '--no-close' and '-r' options is sufficient)
+    after rebooting your machine.
+
+    Other development kits that rely on the parallel port for their power
+    source may also need the '--no-close' option.  It is preferable to
+    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`` to power the
+    eval board from the JTAG interface.
+
+
+Backends
 --------
-These examples assume that you have added the installation directory to
-the PATH. Type the full path to jtag.py otherwise and maybe use
-"python jtag.py". Depending on installation it may also appear under the
-name "msp430-jtag".
+msp430-jtag can use different libraries to connect to the target.
+The backend can be chosen with the --backend command line option.
 
-jtag.py -e
+"mspgcc"
+    Using MSP430mspgcc.dll, the open source implementation from the mspgcc
+    project.
+
+"ti" (default)
+    Using MSP430.dll, the proprietary library from TI or a compatible one
+    from a 3rd pary supplier.
+
+"parjtag"
+    Old way of using MSP430mspgcc.dll. Use "mspgcc" instead.
+
+Compatibility of backends:
+
+    +-------------------------------------------+--------+--------+
+    | Feature                                   | mspgcc | ti     |
+    +===========================================+========+========+
+    | 4 Wire JTAG                               | yes    | yes    |
+    +-------------------------------------------+--------+--------+
+    | 4 Wire JTAG on devices with spy-bi-wire   | yes(1) | no     |
+    +-------------------------------------------+--------+--------+
+    | using --spy-bi-wire option                | no     | yes    |
+    +-------------------------------------------+--------+--------+
+    | support for USB JTAG adapters             | no     | yes    |
+    +-------------------------------------------+--------+--------+
+    | unsing --funclet option                   | yes    | no     |
+    +-------------------------------------------+--------+--------+
+
+Notes:
+    (1) Timing critical, may not work on all machines or at every try.
+
+
+Examples
+--------
+``msp430-jtag -e``
         Only erase flash.
 
-jtag.py -eErw 6port.a43
-        Erase flash, erase check, download an executable, run it (reset)
-        and wait.
+``msp430-jtag -eErw 6port.a43``
+    Erase flash, erase check, download an executable, run it (reset) and wait,
+    the keep it powered (from the parallel port).
 
-jtag.py -mS -R 2048 6port.a43
-        Use ramsize option on a device with 2k RAM to speed up
-        download. Of course any value from 128B up to the maximum
-        a device has is allowed.
-        The progress and mainerase options are also activated.
-        Only erasing the main memory is useful to keep calibration
-        data in the information memory.
+``msp430-jtag -mS -R 2048 6port.a43``
+    Use ramsize option on a device with 2k RAM to speed up download. Of
+    course any value from 128B up to the maximum a device has is allowed.
+    The progress and mainerase options are also activated. Only erasing the
+    main memory is useful to keep calibration data in the information memory.
 
-jtag.py 6port.a43
-        Download of an executable to en empty (new or erased) device.
-        (Note that in new devices some of the first bytes in the
-        information memory are random data. If data should be
-        downloaded there, specify -eE.)
+``msp430-jtag 6port.a43``
+    Download of an executable to en empty (new or erased) device. (Note that
+    in new devices some of the first bytes in the information memory are
+    random data. If data should be downloaded there, specify -eE.)
 
-jtag.py --go=0x220 ramtest.a43
-        Download a program into RAM and run it, may not work
-        with all devices.
+``msp430-jtag --go=0x220 ramtest.a43``
+    Download a program into RAM and run it, may not work with all devices.
 
-jtag.py -f blinking.a43
-        Download a program into RAM and run it. It must be
-        a special format with "startadr", "entrypoint",
-        "exitpoint" as the first three words in the data
-        and it must end on "jmp $". See MSP430debug sources
-        for more info.
+``msp430-jtag -f blinking.a43``
+    Download a program into RAM and run it. It must be a special format with
+    "startadr", "entrypoint", "exitpoint" as the first three words in the
+    data and it must end on "jmp $". See MSP430mspgcc sources for more info.
 
-jtag.py -u 0x0c00 -s 1024
+``msp430-jtag -u 0x0c00 -s 1024``
         Get a memory dump in HEX, from the bootstrap loader.
-        or save the binary in a file:
-          "python jtag.py -u 0x0c00 -s 1024 -b >dump.bin"
-        or as an intel-hex file:
-          "python jtag.py -u 0x0c00 -s 1024 -i >dump.a43"
+    Or save the binary in a file::
 
-jtag.py -r
+      msp430-jtag -u 0x0c00 -s 1024 -b >dump.bin
+    
+    or as an intel-hex file::
+    
+      msp430-jtag -u 0x0c00 -s 1024 -i >dump.a43
+
+``msp430-jtag``
         Just start the user program (with a reset).
 
-cat 6port.a43|jtag.py -e -
-        Pipe the data from "cat" to jtag.py to erase and program the
-        flash. (un*x example, don't forget the dash at the end of the
-        line)
+``cat 6port.a43|msp430-jtag -e -``
+    Pipe the data from "cat" to msp430-jtag to erase and program the flash.
+    (un*x example, don't forget the dash at the end of the line)
+
+
+USB JTAG adapters
+-----------------
+This section only applies to Windows. On linux replace MSP430.dll with
+libMSP430.so etc.
+
+USB JTAG adapters are supported through the MSP430.dlls from the adaptor
+vendor. To enable its use, copy MSP430.dll to the ``bin\lib`` folder, where
+``shared.zip`` is located. Optionally copy ``HIL.dll`` to the ``bin`` folder.
+
+For example for MSP-FET430UIF from TI:
+
+- download a the MSP430.dll binary from the downloads section in
+  http://mspgcc.sf.net
+- copy MSP430.dll to ``c:\mspgcc\bin`` (substitute the source and
+  destination folders according to you own setup)
+
+The windows installer already includes this library.
+
+To use the first available MSP-FET430UIF::
+
+    msp430-jtag -l TIUSB --upload=0x0ff0
+
+The MSP-FET430UIF is registered as serial port. If more than one MSP-FET430UIF
+is connected, find out which COM port the desired adapter is using with the
+Device Manager. Then for example run::
+
+    msp430-jtag -l COM5 --upload=0x0ff0
+
+Linux users have to specify the serial port differently::
+
+    msp430-jtag -l /dev/ttyUSB0 --upload=0x0ff0
+
 
 History
 -------
-1.0     public release
-1.1     fix of verify error
-1.2     use the verification during programming
-1.3     meinerase, progress options, ihex output
+V1.0
+    Public release.
+
+V1.1
+    Fix of verify error.
+
+V1.2
+    Use the verification during programming.
+
+V1.3
+    Mainerase, progress options, ihex output.
+
+V2.0
+    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. Allow multiple --upload with address ranges.
+
+V2.3
+    Added support for F2xx and MSP430X architectures. Improved 3rd party
+    library support for Linux and Windows.
+
 
 References
 ----------
 - Python: http://www.python.org
 
+- ctypes: http://starship.python.net/crew/theller/ctypes
+  This module is included in the standard distribution since Python 2.5:
+  http://docs.python.org/lib/module-ctypes.html
+
 - Texas Instruments MSP430 Homepage, links to Datasheets and Application
-  Notes: http://www.ti.com/sc/msp430
+  Notes: http://www.ti.com/msp430
 

Index: makefile
===================================================================
RCS file: /cvsroot/mspgcc/packaging/makefile,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -w -d -r1.25 -r1.26
--- makefile	28 Nov 2006 03:00:39 -0000	1.25
+++ makefile	15 Feb 2007 13:15:54 -0000	1.26
@@ -74,8 +74,7 @@
 GDB             = gdb-$(GDB_VERSION)
 
 # external tools
-#~ NSIS           := "/cygdrive/c/Program Files/NSIS/makensis"
-NSIS           := "/cygdrive/c/Programme/NSIS/makensis"
+NSIS           := "/cygdrive/c/Program Files/NSIS/makensis"
 DOWONLOAD      := wget
 ifdef WINDIR
 # file lists are used to build the windows installer
@@ -137,6 +136,8 @@
 	@echo ARCHIVES = $(ARCHIVES)
 	@echo CVSFILES = $(CVSFILES)
 	@echo PATCHES = $(PATCHES)
+	@echo SHELL = $(SHELL)
+	set
 
 ##############################################################################
 # Set up the environment
@@ -150,7 +151,7 @@
 ##############################################################################
 .PHONY: sf
 sf:
-	@echo Just press enter at the following password prompt
+	@echo "Just press enter at the following password prompt"
 	cd $(CVSFILES) && cvs -d:pserver:[email protected]:/cvsroot/mspgcc login
 	cd $(CVSFILES) && cvs -z3 -d:pserver:[email protected]:/cvsroot/mspgcc co gcc
 	cd $(CVSFILES) && cvs -z3 -d:pserver:[email protected]:/cvsroot/mspgcc co gdb
@@ -186,78 +187,101 @@
 # -clean rules, so that a build always starts in a fresh folder.
 # Once built, the -install target can be called more than once, witout
 # triggering a complete rebuild
+binutils: binutils-build binutils-install
+gcc: gcc-build gcc-install
+gdb: gdb-build gdb-install
 
+# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
 # Binutils: assembler, linker and more
+# optional --disable-nls 
 binutils-clean:
+	@echo "###############################################################################"
+	@echo "##  msp430-binutils ($(BINUTILS_VERSION))"
+	@echo "###############################################################################"
 	rm -rf $(BUILDDIR)/$(BINUTILS)
 binutils-build: binutils-clean $(ARCHIVES)/$(BINUTILS).tar.bz2
-	@echo "Unpacking binutils"
+	@echo "## Unpacking binutils"
 	cd $(BUILDDIR) && tar xjf $(ARCHIVES)/$(BINUTILS).tar.bz2
-	@echo Applying extra mspgcc patches...
+	@echo "## Applying extra mspgcc patches..."
 	#~ cd $(BUILDDIR)/$(BINUTILS); patch -p1 < $(PATCHES)/binutils-14x1-21x1-42x-42x0.patch
 	cd $(BUILDDIR)/$(BINUTILS); patch -p1 < $(PATCHES)/binutils-14x1-20x1-20x2-20x3-22x4-42x-42x0-461x.patch
-	@echo "Configure and building binutils (this takes a while)"
-	cd $(BUILDDIR)/$(BINUTILS) && ./configure --target=msp430 --prefix=$(INSTALLDIR) --disable-nls >$(BUILDDIR)/binutils-build.log 2>&1
+	@echo "## Configure and building binutils (this takes a while)"
+	cd $(BUILDDIR)/$(BINUTILS) && ./configure --target=msp430 --prefix=$(INSTALLDIR) >$(BUILDDIR)/binutils-build.log 2>&1
 	cd $(BUILDDIR)/$(BINUTILS) && make >>$(BUILDDIR)/binutils-build.log 2>&1
-	@echo binutils compiled
+	@echo "## binutils compiled"
 binutils-install:
 	cd $(BUILDDIR)/$(BINUTILS); make install >>$(BUILDDIR)/binutils-build.log 2>&1
 	$(FILELIST) $(INSTALLDIR) >$(BUILDDIR)/files-binutils.txt
+	@echo "## binutils installed"
 
+# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
 # The compiler
-# optional --program-suffix=-x.x --enable-languages=c,c++,ada,f77
+# optional --program-suffix=-x.x --enable-languages=c,c++,ada,f77 --disable-nls 
 gcc-clean:
+	@echo "###############################################################################"
+	@echo "##  msp430-gcc ($(GCC_VERSION))"
+	@echo "###############################################################################"
 	rm -rf $(BUILDDIR)/$(GCC)
 gcc-build: gcc-clean \
             $(ARCHIVES)/gcc-core-$(GCC_VERSION).tar.bz2 \
-            #~ $(ARCHIVES)/gcc-g++-$(GCC_VERSION).tar.bz2 \
+            $(ARCHIVES)/gcc-g++-$(GCC_VERSION).tar.bz2 \
             #~ $(ARCHIVES)/gcc-ada-$(GCC_VERSION).tar.bz2 \
             #~ $(ARCHIVES)/gcc-g77-$(GCC_VERSION).tar.bz2
 	cd $(BUILDDIR) && tar xjf $(ARCHIVES)/gcc-core-$(GCC_VERSION).tar.bz2
-	#~ cd $(BUILDDIR) && tar xjf $(ARCHIVES)/gcc-g++-$(GCC_VERSION).tar.bz2
+	cd $(BUILDDIR) && tar xjf $(ARCHIVES)/gcc-g++-$(GCC_VERSION).tar.bz2
 	#~ cd $(BUILDDIR) && tar xjf $(ARCHIVES)/gcc-ada-$(GCC_VERSION).tar.bz2
 	#~ cd $(BUILDDIR) && tar xjf $(ARCHIVES)/gcc-g77-$(GCC_VERSION).tar.bz2
 	#~ cd $(BUILDDIR) && tar xjf $(ARCHIVES)/gcc-java-$(GCC_VERSION).tar.bz2
-	@echo Applying mspgcc patches
+	@echo "## Applying mspgcc patches"
 	cp -r $(CVSFILESGCC)/* $(BUILDDIR)/$(GCC)
 ifdef WINDOWS
-	@echo Applying patch for oooooooold windoze
+	@echo "## Applying patch for oooooooold windoze"
 	cd $(BUILDDIR)/$(GCC); patch -p1 < $(PATCHES)/gcc-3.2.3-cygwin.patch #win98 patch
 endif
 	cd $(BUILDDIR)/$(GCC); patch -p1 < $(PATCHES)/gcc-3.2.3-__FUNCTION__.patch
-	@echo "Configuring and building msp430-gcc (this takes a while)"
-	cd $(BUILDDIR)/$(GCC); ./configure --target=msp430 --prefix=$(INSTALLDIR) --disable-nls >$(BUILDDIR)/gcc-build.log 2>&1
+	@echo "## Configuring and building msp430-gcc (this takes a while)"
+	cd $(BUILDDIR)/$(GCC); ./configure --target=msp430 --prefix=$(INSTALLDIR) --enable-languages=c,c++ >$(BUILDDIR)/gcc-build.log 2>&1
 	cd $(BUILDDIR)/$(GCC); make >>$(BUILDDIR)/gcc-build.log 2>&1
-	@echo msp430-gcc done
+	@echo "## msp430-gcc done"
 gcc-install:
 	$(FILELIST) $(INSTALLDIR) >files-before.txt
 	cd $(BUILDDIR)/$(GCC); make install >>$(BUILDDIR)/gcc-build.log 2>&1
 	$(FILELIST) $(INSTALLDIR) >files-after.txt
 	$(FILEDIFF) files-before.txt files-after.txt >$(BUILDDIR)/files-gcc.txt
 	$(FILELIST_RM) files-before.txt files-after.txt
+	@echo "## gcc installed"
 
+# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
 # The debugger
 gdb-clean:
+	@echo "###############################################################################"
+	@echo "##  msp430-gdb ($(GDB_VERSION))"
+	@echo "###############################################################################"
 	rm -rf $(BUILDDIR)/$(GDB)
 gdb-build: gdb-clean \
             $(ARCHIVES)/gdb-$(GDB_VERSION).tar.bz2
 	cd $(BUILDDIR) && tar xjf $(ARCHIVES)/gdb-$(GDB_VERSION).tar.bz2
-	@echo Applying mspgcc patches
+	@echo "## Applying mspgcc patches"
 	cp -r $(CVSFILES)/gdb/gdb-$(GDB_VERSION)/* $(BUILDDIR)/$(GDB)
 	#~ cp -r $(CVSFILES)/gdb/gdb-current/* $(BUILDDIR)/$(GDB)
-	@echo "Configuring and building msp430-gdb (this takes a while)"
+	@echo "## Configuring and building msp430-gdb (this takes a while)"
 	cd $(BUILDDIR)/$(GDB); ./configure --target=msp430 --prefix=$(INSTALLDIR) --disable-nls >$(BUILDDIR)/gdb-build.log 2>&1
 	cd $(BUILDDIR)/$(GDB); make >>$(BUILDDIR)/gdb-build.log 2>&1
-	@echo msp430-gdb done
+	@echo "## msp430-gdb done"
 gdb-install:
 	$(FILELIST) $(INSTALLDIR) >files-before.txt
 	cd $(BUILDDIR)/$(GDB); make install >>$(BUILDDIR)/gdb-build.log 2>&1
 	$(FILELIST) $(INSTALLDIR) >files-after.txt
 	$(FILEDIFF) files-before.txt files-after.txt >$(BUILDDIR)/files-gdb.txt
 	$(FILELIST_RM) files-before.txt files-after.txt
+	@echo "## gdb installed"
 
+# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
 # C library for the cross compiler
 msp430-libc-clean:
+	@echo "###############################################################################"
+	@echo "##  libc"
+	@echo "###############################################################################"
 	rm -rf $(BUILDDIR)/msp430-libc
 msp430-libc-build: msp430-libc-clean
 	cp -r $(CVSFILES)/msp430-libc $(BUILDDIR)
@@ -272,19 +296,29 @@
 	$(FILELIST) $(INSTALLDIR) >files-after.txt
 	$(FILEDIFF) files-before.txt files-after.txt >$(BUILDDIR)/files-libc.txt
 	$(FILELIST_RM) files-before.txt files-after.txt
+	@echo "## msp430-libc installed"
 
 
+# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
 # install binary verisons of msp430-gdbproxy and MSP430.dll
 gdbproxy-install:
+	@echo "###############################################################################"
+	@echo "##  msp430-gdbproxy"
+	@echo "###############################################################################"
 ifdef WINDOWS
 	cp msp430-gdbproxy.exe MSP430.dll $(INSTALLDIR)/bin/
 else
 	install -m 644 libMSP430.so $(INSTALLDIR)/lib/
 	install msp430-gdbproxy $(INSTALLDIR)/bin/
 endif
+	@echo "## msp430-gdbproxy installed"
 
+# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
 # (lib)MSP430mspgcc.dll/so (lib)HIL.dll/so and giveio, loaddrv on windows.
 libmspgcc-clean:
+	@echo "###############################################################################"
+	@echo "##  libmspgcc"
+	@echo "###############################################################################"
 	rm -rf $(BUILDDIR)/libmspgcc
 libmspgcc-build: libmspgcc-clean
 	mkdir $(BUILDDIR)/libmspgcc
@@ -303,9 +337,14 @@
 	cd $(BUILDDIR)/libmspgcc/msp430 && make install LIB_PREFIX=$(INSTALLDIR)/lib >>$(BUILDDIR)/libmspgcc-build.log 2>&1
 	cd $(BUILDDIR)/libmspgcc/hardware_access && make install LIB_PREFIX=$(INSTALLDIR)/lib >>$(BUILDDIR)/libmspgcc-build.log 2>&1
 endif
+	@echo "## libmspgcc installed"
 
+# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
 # Examples. Cleanup the examples folder and install them.
 examples-build:
+	@echo "###############################################################################"
+	@echo "##  examples"
+	@echo "###############################################################################"
 	rm -rf $(BUILDDIR)/examples
 	mkdir $(BUILDDIR)/examples
 	cp -r $(CVSFILES)/examples/* $(BUILDDIR)/examples
@@ -319,9 +358,14 @@
 	cp -r $(BUILDDIR)/examples/* $(INSTALLDIR)/share/doc/mspgcc-examples >>$(BUILDDIR)/examples.log 2>&1
 endif
 	$(FILELIST) $(INSTALLDIR)/examples >$(BUILDDIR)/files-examples.txt
+	@echo "## examples installed"
 
+# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
 # Addon mspgcc libraries: libmspgcc libcommandline and more
 libraries-build:
+	@echo "###############################################################################"
+	@echo "##  libraries"
+	@echo "###############################################################################"
 	rm -rf $(BUILDDIR)/libraries
 	mkdir $(BUILDDIR)/libraries
 	cp -r $(CVSFILES)/libraries/* $(BUILDDIR)/libraries
@@ -332,9 +376,14 @@
 	$(FILELIST) $(INSTALLDIR) >files-after.txt
 	$(FILEDIFF) files-before.txt files-after.txt >$(BUILDDIR)/files-libraries.txt
 	$(FILELIST_RM) files-before.txt files-after.txt
+	@echo "## libraries installed"
 
+# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
 # Documenation. Currently depends on prebuilt PDFs
 docs-build:
+	@echo "###############################################################################"
+	@echo "##  docs"
+	@echo "###############################################################################"
 	rm -rf $(BUILDDIR)/docs
 	mkdir $(BUILDDIR)/docs
 	cp -r $(CVSFILES)/docs/* $(BUILDDIR)/docs
@@ -349,9 +398,14 @@
 	mkdir -p $(INSTALLDIR)/share/doc/mspgcc-doc
 	cp mspgcc-manual.pdf mspgcc-faq.pdf $(INSTALLDIR)/share/doc/mspgcc-doc
 endif
+	@echo "## docs installed"
 
+# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
 # msp430-jtag, msp430-bsl and more tools
 pytools-build:
+	@echo "###############################################################################"
+	@echo "##  python tools"
+	@echo "###############################################################################"
 	rm -rf $(BUILDDIR)/python
 	mkdir $(BUILDDIR)/python
 	cp -r $(CVSFILES)/python/* $(BUILDDIR)/python/
@@ -390,9 +444,12 @@
 	install $(BUILDDIR)/python/msp430-dco.py $(INSTALLDIR)/bin/msp430-dco
 	cp -r $(BUILDDIR)/python/mspgcc $(INSTALLDIR)/bin
 endif
+	@echo "## python tools installed"
 
+# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
 # strip executables so that they get smaller
 stripfiles:
+	@echo "## stipping executables"
 ifdef WINDOWS
 	strip $(INSTALLDIR)/bin/*.exe
 	strip $(INSTALLDIR)/msp430/bin/*.exe


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV