Nios® II Flash Programmer User Guide

ID 683118
Date 11/06/2017
Public
Document Table of Contents

3.1.1.1. General Parameters

Table 5.  General Parameters
Name Required Description
--cable=<cable name> Required if there are multiple download cables connected to the host computer. Specifies which download cable to use.6
--device=<device index> Required if there are multiple devices in the JTAG chain. Specifies the FPGA's device number in the JTAG chain. The device index specifies the device where the flash programmer looks for the Nios® II JTAG debug module. JTAG devices are numbered relative to the JTAG chain, starting at 1.7
--instance=<instance> Required if there are multiple Nios® II processors with JTAG debug modules in the target design on the FPGA. Specifies which Nios® II JTAG debug module to look at in the FPGA. The instance ID specifies the JTAG debug module that is used for programming flash memory.8
--sidp=<address> Optional; required for system ID validation. Contains the base address of the System ID component in your system. This value is in hexadecimal format (for example, 0x01000000).9
--id=<id> Optional; required for system ID validation. Contains the ID value programmed into the System ID component in your system. This value is randomly selected each time you regenerate your Platform Designer system. This value is in unsigned decimal format (for example, 2056847728u).10
--timestamp=<time> Optional; required for system timestamp validation. Contains the timestamp value programmed into the System ID component in your system. Platform Designer sets this value based on the time of system generation. This value is in unsigned decimal format (for example, 1177105077u). Turning this parameter on is the same as turning off the Ignore mismatched system timestamp check box in the Nios® II Flash Programmer GUI Hardware Connections dialog box.11
--accept-bad-sysid Optional; defaults off. Bypasses the system ID validation. Forces the flash programmer to download a flash image. Turning this parameter on is the same as turning on the Ignore mismatched system ID check box in the Nios® II Flash Programmer GUI Hardware Connections dialog box.
--erase=<start>,<size> Optional; defaults off. Erases a range of bytes in the flash memory.
--erase-all Optional; defaults off. Erases the entire flash memory. The erase operation occurs before programming, if an input file is provided for programming.
--program Optional; defaults on if an input file is specified. Programs flash memory from the input files.
--no-keep-nearby Optional; defaults off. Throws away partial sector data. If the data to program does not completely fill the first or last sector, the flash programmer normally preserves and reprograms the original data in those sectors. The --no-keep-nearby parameter disables this feature. This option speeds up the programming process, but is only appropriate if the existing flash memory contents are unimportant.
--verify Optional; defaults off. Verifies that contents of flash memory match input files.
{ <file> } Optional. Specifies the name(s) of the input file(s) to program or verify. Separate multiple file names with spaces.
--read=<file> Optional; defaults off. Reads flash memory contents into the specified file.
--read-bytes=<start>,<size> Optional if --read is specified; defaults off. Specifies which address range to read (byte addresses).
--go Optional; defaults off. Runs the processor from its reset vector after flash memory programming is complete.
6 The --cable parameter is only needed if there are multiple download cables connected to the host computer. To determine the cable names, run jtagconfig.
7 The --device parameter is only needed if there are two or more processors in different devices with the same instance ID. To determine the JTAG device index, run jtagconfig.
8 There are two ways to find the correct value of the instance ID for a processor. The easiest is to use the Nios® II Flash Programmer GUI to create a sample flash programmer script. For more information, refer to the "Using the Flash Programmer GUI" chapter. Alternatively, open < Intel® Quartus® Prime project name>.jdi, in the Intel® Quartus® Prime project directory. Locate the Nios® II processor node by finding a value of hpath containing "<processor module name>=". The instance ID is specified as instance_id.
9 In system.h and in your board support package (BSP), the system ID base address is specified by SYSID_BASE.
10 In system.h and in your BSP the system ID value is specified by SYSID_ID.
11 In system.h and in your BSP, the system ID time stamp is specified by SYSID_TIMESTAMP.