Nios II Classic Software Developer’s Handbook

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

4.11.3.4.2. nios2-flash-programmer-generate

Description

The nios2-flash-programmer-generate command will convert multiple files to the .flash format and then program them to the designated target flash devices (--program-flash). This is a convenience utility that manages calls to the following command line utilities: bin2flash, elf2flash, sof2flash, and nios2-flash-programmer. This utility also generates a convenience shell script that captures the sequence of conversion and flash programmer command line tool expressions.

Usage

nios2-flash-programmer-generate --sopcinfo <filename> --flash-dir
<filepath> [<options>]                                                  

Options

--flash-dir <filepath>  Path to the directory where the flash files are
                        generated. Use . for the current directory. This
                        command overwrites pre-existing files in <filepath>
                        without warning.                                   

--sopcinfo <filename>   The SOPC Builder system file (.sopcinfo).

Optional Arguments:

--accept-bad-sysid      Continue even if the system ID comparison fails

--add-bin <fname> <flash-slave-desc> <offset>  Specify an bin file to
                        convert and program. The filename, target flash slave
                        descriptor, and target offset amount are required.   
                        This option can be used multiple times for .sof files.

--add-elf <fname> <flash-slave-desc> <extra-elf2flash-arguments>   
                        Specify an elf file to convert and program. The
                        filename, and target flash slave descriptor are
                        required. This option can be used multiple times for
                        .elf files. The [<extra-elf2flash-arguments>] can   
                        be any of these options supported by 'elf2flash':   
                        'save', 'sim_optimize'. The 'elf2flash' options:    
                        'base', 'boot', 'end', 'reset' have default values  
                        computed, but are also supported as                 
                        [<extra-elf2flash-arguments>] for manual override   
                        of those defaults. Do not prepend extra arguments with
                        '--'.                                                 

--add-sof <fname> <flash-slave-desc> <offset> <extra-sof2flash-arguments>   
                        Specify an sof file to convert and program. The     
                        filename, target flash slave descriptor, and target 
                        offset amount are required. This option can be used 
                        multiple times for .sof files. The                  
                        [<extra-sof2flash-arguments>] can be any of these   
                        options supported by 'sof2flash':                   
                        'activeparallel', 'compress', 'save',               
                        'timestamp'. Do not prepend extra arguments with    
                        '--'.                                               

--cable <cable name>    Specifies which JTAG cable to use (not needed if you
                        only have one cable). Not used without              
                        --program-flash option                              

--cpu <cpu name>        The SOPC Builder system file Nios II CPU name. Not
                        required if only one Nios II CPU in the system.   

--debug                 Sends debug information, exception traces, verbose
                        output, and default information about the command's
                        operation, to stdout.                              

--device <device name>  Specifies in which device you want to look for the Nios
                        II debug core ('1' is device nearest TDI etc.). Not used
                        without --program-flash option                          

--erase-first           Erase entire flash targets before programming them.
                        Not used without --program-flash option            

--extended-help         Displays full information about this command and its
                        options.                                            

--go                    Run processor from reset vector after program.

--help                  Displays basic information about this command and its
                        options.                                             

--id <address>          Unique ID code for target system. Not used without
                        --program-flash option                            

--instance <instance value> Specifies the INSTANCE value of the debug core (not
                        needed if there is exactly one on the chain). Not used 
                        without --program-flash option                         

--jvm-max-heap-size <value> Optional. The maximum memory size to be used for
                        allocations when running this tool. This value is   
                        specified as <size><unit> where unit can be m (or M) for
                        multiples of megabytes or g (or G) for multiples of     
                        gigabytes. The default value is 512m.                   

--log <filename>        Creates a debug log and write to specified file. Also
                        logs debug information to stdout.

--mmu                   Specifies if the CPU with the corresponding INSTANCE
                        value has an MMU (not needed if there is exactly one CPU
                        in the system). Not used without --program-flash
                        option

--program-flash         Providing this flag causes calls to
                        nios2-flash-programmer to be generated and
                        executed. This results in flash targets being
                        programmed.

--script-dir <filepath> Path to the directory where a shell script of this tools
                        executed command lines is generated. This convenient
                        script can be used in place of this
                        'nios2-flash-programmer-generate' command. Use .
                        for the current directory. This command overwrites
                        pre-existing files in <filepath> without warning.

--sidp <address>        Base-address of System ID peripheral on target. Not
                        used without --program-flash option

--silent                Suppresses information about the command's
                        operation normally sent to stdout.

--timestamp <time-stamp>Timestamp for target-system (when last generated).

--verbose               Sends verbose output, and default information about
                        the command's operation, to stdout.

--version               Displays the version of this command and exits with a
                        zero exit status.