Nios II Classic Software Developer’s Handbook

ID 683282
Date 5/14/2015
Public
Document Table of Contents

4.11.3.4.3. nios2-flash-programmer

Description

Programs data to flash memory on the target board.

Usage

nios2-flash-programmer [-h/--help] [-c/--cable <cable name>]
       [-d/--device <device index>] [-i/--instance <instance>]     
       [-s/--sidp <address>] [-I/--id <id>] [-t/--timestamp <timestamp>]
       -b/--base <address> [-e/--epcs]                                  
       <action> [-g/--go] [--dualdie]  

Options

-h/--help                   Print this message
 -Q/--quiet                  Don't print anything if everything works
    --debug                  Print debug information

 -c/--cable <cable name>     Specifies which JTAG cable to use (not needed if
                             you only have one cable)
 -d/--device <device index>  Specifies in which device you want to look for the
                             Nios II debug core (1 = device nearest TDI etc.)
 --dualdie                   Force override the die size to be dual die.
 -i/--instance <instance>    Specifies the INSTANCE value of the debug core
                             (not needed if there is exactly one on the chain)

 -s/--sidp <address>         Base-address of System ID peripheral on target
 -I/--id <system-id-value>   Unique ID code for target system
 -t/--timestamp <time-stamp> Timestamp for target-system (when last generated)
    --accept-bad-sysid       Continue even if the system ID comparison fails

 -b/--base <address>         Base address of FLASH/EPCS to operate on
 -e/--epcs                   This operation is on an EPCS flash
 -M/--mmu                    MMU present in the Nios II cpu.
 -E/--erase <start>+<size>   Erase a range of bytes in the flash, or the entire
    --erase-all              flash before/instead of programming it.
 -P/--program                Program flash from the input files (the default)
    --no-keep-nearby         Don't preserve bytes which need to be erased but
                             which aren't specified in the input file
 -Y/--verify                 Verify that contents of flash match input files
 <filename>*                 The names of the file(s) to program or verify

 -R/--read <file>            Read flash contents into file
 -B/--read-bytes <start>+<size> Specify which bytes to read

 -g/--go                     Run processor from reset vector after program.

Input files should be in Motorola S-Record format. Addresses within the files are interpreted as offsets from the base address of the flash. Output files written by the tool are in the same format. The flash programmer supports all CFI flashes which use the AMD programming algorithm (CFI algorithm 2) or the Intel algorithm (1 or 3).