XC3SPROG(1) | General Commands Manual | XC3SPROG(1) |
xc3sprog - JTAG programming utility for Xilinx FPGAs and PROMs
xc3sprog -c cable [options]
file1spec [file2spec ...]
xc3sprog -c cable [options] -j
xc3sprog is a command-line tool for programming FPGAs, microcontrollers and PROMs via JTAG.
In a typical application, xc3sprog reads a .BIT file generated by an FPGA design tool, and programs it into the PROM chip on an FPGA board for persistent storage or the configuration RAM of a FPGA for temporary storage. For other use cases, see the section EXAMPLES below.
As its name indicates, xc3sprog was originally designed for Xilinx Spartan-3 FPGAs. However, it has been extended to handle several other types of devices including Xilinx FPGAs, CPLDs, XCF flash PROMs, Atmel AVRs and SPI flash chips. xc3sprog supports several JTAG cables, including parallel port cables and USB programmers.
If multiple chain positions are specified, the data file will be split, programming the first part of the file into the first specified device and so on. This is useful for boards which a chain of multiple XCF chips to configure a single FPGA.
To override the defaults, specify a comma-separated list of
options. The following options are accepted:
master | XCFnnP is master (FPGA is slave) |
slave | XCFnnP is slave (FPGA is master, this is default) |
parallel | Parallel configuration data bus |
serial | Serial configuration data line (default) |
extclk | Use external clock in master mode |
intclk | Use internal clock in master mode |
fastclk | Use fast internal clock |
slowclk | Use slow internal clock |
One or more programming actions may be specified. Each action consists of a filename, optionally followed by attributes in the form <filename:action:offset:style:length>.
w | Erase, then write data from file to device and verify. |
W | Write with auto-sector erase, then verify. |
v | Verify device against file. |
r | Read from device and write to file (no overwriting). |
R | Read from device and write to file, overwriting existing files. |
BIT | Xilinx .BIT file format. Default for FPGA, XCF and SPI devices. |
BIN | Raw binary file. |
BPI | Raw binary file not bit reversed. |
MCS | Xilinx .MCS file format. |
IHEX | Intel HEX format. Also used by Xilinx PROMGEN when writing MCS files. Default for XMEGA devices. |
HEXRAW | Raw sequence of hexadecimal digits. |
JEDEC | Default for CPLD devices. |
The device database contains a list of supported JTAG devices. When xc3sprog starts, it scans the JTAG chain to discover all attached devices. A device database is used to map the 32-bit ID codes of the devices to descriptive names and get basic knowledge how to handle the part, at minimum how to skip it.
A default device database is compiled into the xc3sprog executable. The database is tried to be loaded from a file at run time. If the environment variable $XCDB is defined, it specifies the name of the device database file, otherwise the file devlist.txt is read from the current directory. If a database file is not found at all, the internal compile-time database will be used.
If a device is not yet know, the builtin list can be dumped, the information on the unknown part added and on the next run the new list will be read and used.
The cable database contains a list of supported JTAG cables. Each cable type is identified by a short label, such as pp, ftdijtag, or xpc. The database maps the label to parameters to be used to access the hardware of the cable.
A default cable database is compiled into the xc3sprog executable. The database is tried to be loaded from a file at run time. If the environment variable $CABLEDB is defined, it specifies the name of the cable database file, otherwise the file cablelist.txt is read from the current directory. If a database file is not found at all, the internal compile-time database will be used.
If a cable subtype (e.g. different VID/PID) is not yet know, the builtin list can be dumped, the information on the new cable added and on the next run the new list will be read and used.
The database contains a line for each nown cable. The line consists of the alias for that cable to used with the -c option, the basic type of the cable, the maximum allowed JTAG frequency of the cable and an optional option string.
For FTDI devices the option string contains the USB vendor ID (VID), USB product ID (PID), the USB device description string, the FTDI channel of the JTAG interface and eventual commands for setting other pins beside the JTAG pins. e.g. to switch on some buffers. If the JTAG device uses a FTDI default VID/PID, the USB device description string is important to destinguish your JTAG device from other eventual connected FTDI devices with the same VID/PID
http://sourceforge.net/projects/xc3sprog/
Feedback on success/failure/enhancement requests:
http://sourceforge.net/mail/?group_id=170565
2011-09-04 |