===============================================================================
C2xx Programming Utilities                                           Jan 2002

Spectrum Digital Inc                                                                                 
12502 Exchange Dr.
Suite 440
Stafford, Texas 77477

Web:        http://www.spectrumdigital.com
Support:    support@spectrumdigital.com
Phone:      281-494-4500
Fax:        281-494-5310

Release 3.32
===============================================================================

1.0 New Features
----------------
- Included new programming algos from TI for F2407

- Included programming support from TI for F2407A with security

- Included support for lf2401a

- Changed install to remove all algo files. Each algo file is now contained
  in a zip file so that you can install only those files that you are
  interested in.

1.1 History
-----------
Release 3.30
- Fixed a bug in prg2xxw95.exe where the minimum FLASH write size was
  set to PRG_bufsize.  It should have been the smaller of PRG_bufsize
  or the coff section size.

- Removed old readme files and included some updated docs.


Release 3.22
------------
Updated support for LF2407

Added in the SdConfig utility to the driver release.  This utility replaces
all the old emulator specific setup/reset utilities.  If this is an update
install then you should do the following:
   1) Before installing you may wish to save your sdopts.cfg file.
   2) After installing run sdconfig to update your settings and test the
      emulator setup. 

Added in support for the eZdsp2407

Release 3.21
------------
Added programming files for the LF2407.

Release 3.20
------------
Added support for the XDS510PP_PLUS and SPI515 emulators.

Release 3.00
-----------
Programming support for FLASH memory through the JTAG port for Win95/WinNt.

2.0 What is Included
--------------------
   prg2xxw.txt    - This file.  Contains programming instructions
   prg2xxw95.exe  - C2xx programming executable.
   emu2xxwdm.dll  - C2xx emulation software.
   sdsmg51095.dll - XDS510pp SMG/SCIF drivers
   tismg51095.dll - XDS510 SMG/SCIF drivers
   sdspi515.dll   - XDS510PP_PLUS and SPI515 drivers.
   sdiont.sys     - WinNT driver
   sdopts.cfg     - Options file
   cofflib.dll    - Coff loader lib.
   board.dat      - Board configuration file, obj.
   board.cfg      - Board configuration file, source.
   portio.exe     - Port configuration utility (XDS510PP)
   spi515.exe     - Port configuration utility (XDS510PP_PLUS, SPI515)
   setpath.bat    - Sets programmer environment
   
Note: 
      F206/F240/F243 files are from TI WEB with modifications to the
      batch files to support the XDS510PP.
 
2.1 Installation Directories
----------------------------
Express directory specifiers:

       <INSTALLDIR>    Base location that you specify on install. Default is
                       c:\specdig\prg2xx
       <WINSYSDIR>     Win95  - \windows\system
                       WinNT  - \winnt\system32

       Install File Directories:

       <INSTALLDIR>\	    - Programming utility

       <WINSYSDIR>          - SD emulator drivers and config files.

       <WINSYSDIR>\drivers  - NT specific kernel mode drivers
 
3.0 Installation
----------------
  If installing under Windows NT you have to log on as administrator to load
  the driver "sdiont.sys".

  3.1 Software 
    3.1.1. If installing from floppy disk run "setup.exe".  If installing
           from self extracting setup then run "setupprg2xx.exe".  
    
  3.2 NT Driver Install (Manual Install)
    If you did not install the NT driver during the software installation you
    can manually install the driver with by doing the following:

    3.2.1. Log on as administrator
    3.2.2. From the install directory execute 
                  "portio -dadd <install_dir\specdig>\sdiont.sys".
           <install_dir> has to be the full path name to the
           sdiont.sys WinNT driver.  This will load and start the driver.
           It also sets the driver flags for automatic startup on system
           boot.  This method does NOT put the sdiont.sys driver into
           your \winnt\system32\drivers.  This is not a significant issue
           but offers a little less protection from overwritting sdiont.sys.


5.0 Prg2xxw95.exe Useage
------------------------

   prg2xxw95 <options> <prog_algo> <flash_out>

   example:
      prg2xxw95 -p 378 -e -v -r 8000 at29c257.out sample.out

      Program flash using at29c257 algo. with sample.out output file.  Erase the
      flash before programming, verify after programming, relocate sample.out to
      c2xx address 0x8000.

   options:

    -e        Erase before programming              
    -h        Help, print this screen               
    -i xxxx   IO address of PMST (0xffe4)           
    -m xxxx   Load value of PMST (no load)          
    -n name   Device name in board.dat file (c2xx)  
    -o        No COFF file to be programmed         
    -p xxxx   Host I/O address (240)                
    -t xxxx   Load value of ST1 (0x17fc)            
    -v        Verify after programming              
    -w d      Wait factor (1)                       
    -b x      Build boot block, size 8 or 16        
    -r xxxx   Relocaction amount 
    -s xxxx   Set PRG_options for programming algos                   

   example:
     prg2xxw95 -p 378 -e -v -w 10 -b 8 -r 8000 at29c257.out boot2xx8.out

     Erase, 
     Verify, 
     Wait factor 10, 
     Build 8 bit Flash boot block, 
     Relocate boot2xx8.out to address 8000, 
     Program with at29c257 driver,
     Boot2xx8.out is coff image file.   


   NOTE: Before running any of the programming batch files in the subdirectories
         you need to edit and execute the batch file "setpath.exe".  This sets
         your programming environment.  You may wish to add this to your 
         autoexec.bat file.  You can then "cd" to the subdirectories to run
         the programming batch files.


6.0 sdopts.cfg Configuration Options 
-----------------------------------------------------------------------
The following section is extracted from the sdopts.cfg which is installed
into your Windows System directory.  Run the SdConfig utility to setup your
emulator options and test your JTAG connection.

# ======================================================================================
# Spectrum Digital Emulator Configuration file "sdopts.cfg".  This file should be 
# located in your Windows system directory so that it is available to all emulator
# applications. 
#
#  Windows System Directories
#    Win95      \windows\system
#    WinNT      \winnt\system32
#
# Supports
#     XDS510PP      Spectrum Digital emulator, printer port
#     XDS510        Texas Instruments emulator, ISA
#     SPI510        Spectrum Digital emulator, low voltage, data logging, ISA
#     SPI515        Spectrum Digital emulator, low voltage, printer port
#     SPI520        Spectrum Digital emulator, low voltage, data logging, printer port
#     eZdsp54x      Spectrum Digital eZdsp54x
#     eZdsp2710     Spectrum Digital eZdsp2710
#     eZdspvc33     Spectrum Digital eZdspvc33 
#     XDS510PP_PLUS Spectrum Digital emulator, printer port (performance enhanced version)
#
# See your emulator documentation for more details on options and support.  XDS510PP
# emulation software will search for the traditional "xds510pp.ini" first.  If
# this file is not found then it will use "sdopts.cfg".  For other emulators
# "sdopts.cfg" is the only config file supported.
#
# sdopts.cfg file search order is:
#    1) Local directory.  Generally your debugger launch directory or GoDSP drivers
#       directory.
#    2) Directory pointed to by D_DIR
#    3) Windows System directory
#
# Emulator software has built in defaults for options which you can override by 
# supplying the appropriate option(s).  You only need to supply those options that
# you want to override.  Any options supplied that are not used by a
# particular emulator are ignored.
#
# OPTIONS SUMMARY
# ===============
#
# [EmulatorId=xxx]
# ----------------
#     where xxx is 1-99; SPI520 
#     where xxx is 3bc, 278, 378; XDS510PP,SPI515, XDS510PP_PLUS, eZdsp
#     where xxx is 240,280,320,340; XDS510, SPI510
# 
#     The EmulatorId corresponds to the port address used to start the debugger.
#     Under GoDSP Code Composer this is supplied during the setup using cc_setup.exe.
#     For TI debuggers this is passed in with the -p option.  
#
#     CodeComposer Example: 
#                           [ I/O Port ]  0x3bc,  0x278,  0x378           -- XDS510PP/SPI515/eZdsp
#                                                                         -- XDS510PP_PLUS
#                           [ I/O Port ]  0x240,  0x280,  0x320,  0x340   -- SPI510/XDS510
#                           [ I/O Port ]  0x13bc, 0x1278, 0x2278, 0x2378  -- SPI520
#     TI Debugger  Example: 
#                             -p 3bc,  -p 278,  -p 378            -- XDS510PP
#                             -p 240,  -p 280,  -p 320,  -p 340   -- SPI510/XDS510
#                             -p 13bc, -p 1278, -p 2278, -p 2378  -- SPI520
#
#     NOTES: The SPI520 EmulatorId is taken from the most significant nibble of the
#            address.  Example: -p 1278 corresponds to EmulatorId=1.
#
#            The XDS510PP, SPI515, XDS510PP_PLUS and eZdsp products "share" the same 
#            EmulatorId (port address). 
#            To select an emulator or eZdsp, uncomment it's product name and comment out the others.
#              EmuProductName=XDS510PP
#              #EmuProductName=SPI515
#              #EmuProductName=XDS510PP_PLUS
#	       #EmuProductName=EZDSPVC3X
#	       #EmuProductName=EZDSP54X
#              #EmuProductName=EZDSP2710
#
#
# "Emu" options
# -------------
#     EmuPortAddr          Emulator port address
#     EmuPortMode          Printer port mode, SPP4,SPP8,EPP,ECP
#     EmuPortSpeed         Emulator port speed (0-fastest 100-slowest)
#                            If using the SPI515 or XDS510PP_PLUS in EPP mode on a Pentium PC then
#                            EmuPortSpeed may need to be set greater then 0. The failure 
#                            mode generally shows up as errors on DSP Reset or memory read/write.  
#     EmuAddOptoPod        Include SD opto-isolator pod
#     EmuDisablePolling    Disable certain emulation polling for improved performance.
#     EmuProductName       Name of hardware product. Valid names
#				XDS510PP
#				SPI515 
#                          	XDS510PP_PLUS
#				EZDSPVC3X
#                               EZDSP54X
#                               EZDSP2710
#                          Default is XDS510PP. 
#     EmuDoWaitInReset     Perform C27x style Wait-In-Reset.  Option support by product:
#                             XDS510PP      - Not supported, (option ignored).
#                             SPI510        - Hard coded for Wait-In-Reset,(option ignored).
#                             SPI520        - Hard coded for Wait-In-Reset,(option ignored).
#                             SPI515        - Option supported.
#                             XDS510PP_PLUS - Option supported.
#
# "Dlog" options
# --------------
#     These options are only valid for the SPI510, SPI515 and SPI520.
#     DlogEmuPinEnable     Enable the use of C27x EMU0/1 datalogging
#     DlogRtdxEnable       Enable Rtdx support of EMU0/1 datalogging
#     DlogStopOnBufferFull Stop when buffer full(DlogExpress only)
#     DlogInvertDataRecv   Invert incoming data
#     DlogInvertFrameSync  Invert incoming frame sync.
#     DlogInvertClk        Invert incoming clock
#     DlogStoreIncremental Store data incrementally (as it comes in or on exit)
#     DlogUseDlogExpress   Use DlogExpress module if found
#     DlogBinFileName      Path\filename to store binary data
#     DlogStatusFile       Path\filename to store datalogging status information
#     DlogBinFileSize      Number of 1024 byte blocks to store
#
# ======================================================================================

7.0 Utilities
-------------
A configuration utility is included for each emulator.  
 
  Emulator          Support Utility
  --------          ---------------
  xds510pp          portio.exe
  xds510/spi510     spi510.exe
  spi520            spi520.exe
  spi515            spi515.exe

Executing the utility with -help, or no options will give the list of options 
available.  

Option support:

    Option                portio.exe  spi510.exe  spi530.exe  spi515.exe
    --------------------------------------------------------------------
    -h                       yes        yes         yes          yes
    -p                       yes        yes         yes          yes     
    -q                       yes        yes         yes          yes
    -e                       yes        no          yes          yes      
    -s                       yes        no          no           no
    -r                       yes        yes         yes          yes 
    -x                       yes        yes         yes          no
    -nsc                     yes        no          yes          yes 
    -tosh                    yes        no          yes          yes  
    -smc                     yes        no          yes          yes
    -dadd                    yes        yes         yes          yes
    -ddrem                   yes        yes         yes          yes 

7.1 Option explanation
-----------------------
-h      Help (shows the options)

-p xxxx Specify the host I/O port.

-q      Wait for user prompt to exit utility

-e      Examine the ports available on the PC and hopefully
        find one that works.

-s      Select the "fastest" operating mode for a port.  
        Must have power on the XDS510PP and target board.
        You must specify a -p <io port> option if you are not
        using 378 as your default.  This option does NOT 
        read xds510pp.ini.  It will create a xds510pp.sav file
        that you can copy to xds510pp.ini when you find a
        preferred setting.

-r      Resets the port (same as emurst)
        Must have power on the emulator and target board.
        This option will also print out extended diagnostics
        if there is trouble resetting the emulator. 

-x      Xds_diag.  Only run this after you think you have a good 
        port and a valid board.dat file.
        Must have power on the XDS510PP and target board.
        This utility will can verify the DSP processor Id and
        test that your basic scan path is functional.
        This option does NOT apply to the C3x as it is not
        a JTAG device.

        XDS diagnostics [options]                  
         - n  Processor name                   
         - f  Board file name                  
         - c  Continuous cycling               
         - d  Cycle data                       
         - v  Run integrity test  

-nsc    Replaces nscmode.exe.
        nscmode [options]
        -help         help
        -verbose      verbose
        -compatible   unidirectional
        -extended     bidirectional
        -epp1.7       EPP 1.7 enabled
        -epp1.9       EPP 1.9 enabled
        -ecp          ECP enabled

-tosh   Replaces tosh.exe.

-smc    Replaces smcmode.exe.
        smcmode [options]
        -h     help
        -r     reset status register
        -m x   set to mode x = 0..4

        Mode 0 -> Standard bidirectional mode
        Mode 1 -> EPP and SPP mode
        Mode 2 -> ECP mode
        Mode 3 -> ECP and EPP mode
        Mode 4 -> Non bidirectional mode

-dadd drvpath\drvname  Add\start NT driver.  The driver flags
                       will be set for automatic startup.  

-ddrem drvname         Stop\remove NT driver. Do not include 
                       .sys in the drvname
 
7.2 Setting Printer Port Mode 
-----------------------------

Notes:  For new PCs try to set the port for ECP or ECP+ (SPP8 or EPP)
        if available.  If an ECP port is detected then the emulator
        software sets the ECP submode based on the setting in your 
        xds510pp.ini/sdopts.cfg file.

        ***WARNING***  Not all ECP mode devices support EPP submode. 
        After setting your port to ECP run portio.exe with -s.  This will
        show which submode is supported.

        Detecting EPP mode is not 100% reliable due to the various implementations
        of EPP mode.  If you run portio -e and it does not detect a port then
        run portio -s.  Running portio -s will make accesses to the emulation
        device in the XDS510PP.   This check is more reliable but does require
        that you have the XDS510PP and the target system powered up and have a
        minimally functional target.
        
        The portio.exe utility and low level emulator software generate a
        log file named SdEmuLog.txt.  Following is an example: 

		***** Spectrum Digital Inc.   *****
		***** www.spectrumdigital.com *****

		IniFilePath = C:\composer
		Incoming Port Address     = 0x0378
		Using Port Address        = 0x0378
		Port Mode                 = EPP
		Port Speed                = 0x0000
		SCIF Error                = 0
        
        IniFilePath:            Path of the xds510pp.ini file that is 
                                being used.

        Incoming Port Address:  -p xxxx value passed in from the debugger.

        Using Port Address:     Actual address used by the emulator. These
                                should always be the same.	

        Port Mode:              Printer port mode used.

        Port Speed:             Port speed used.

        SCIF Error              Low level emulation driver error.  If the
                                error code is NOT 0 then run portio.exe -r.
                                This will attempt to reset the emulator and
                                check basic connection to the target.  It also
                                provides additional error message to help you
                                resolve the problem.
