Nios® II Software Developer Handbook

ID 683525
Date 8/28/2023
Public
Document Table of Contents

5.11.3.4.8. jtagconfig

Description

Allows you configure the JTAG server on the host machine. It can also detect a JTAG chain and set up the download hardware configuration.

Usage

jtagconfig [--enum]
       jtagconfig --add <type> <port> [<name>]
       jtagconfig --remove <cable>
       jtagconfig --getparam <cable> <param>
       jtagconfig --setparam <cable> <param> <value>
       jtagconfig --define <jtagid> <name> <irlength>
       jtagconfig --undefine <jtagid> <name> <irlength>
       jtagconfig --defined
       jtagconfig --addserver <server> <password>
       jtagconfig --enableremote <password>
       jtagconfig --disableremote
       jtagconfig --version
       jtagconfig --help
       jtagconfig --extrahelp

Options

--version | -v    Displays the version of the jtagconfig utility you are using.                                    

--help | -h       Displays the options for the jtagconfig utility.

--extrahelp       Displays this help information.

--enum            Displays the JTAG ID code for the devices in each JTAG chain
                  attached to programming hardware. If the JTAG Server        
                  recognizes a device, it displays the device name. If the    
                  JTAG Server cannot use a device, it marks the device with an
                  exclamation mark (!).                                       

                  The following code is an example of output from the
                  'jtagconfig --enum' command:                       

                  1) ByteBlasterMV on LPT1
                  090010DD   EPXA10       
                  049220DD   EPXA_ARM922  
                  04000101 !              
                  090000DD ! EP20K1000E   
                  04056101 !              
                  010020DD   EPC2         
                  010020DD   EPC2         
                  010020DD   EPC2         

                  In this example, the JTAG Server does not recognize two of
                  the eight devices, and cannot use three devices.  If you need
                  to use one of the unused devices then use the --define option
                  to define unused devices with JTAG IDs.                      

                  You can also use this option by typing the command
                  'jtagconfig' without an argument.                 

--add <hardware>  Specifies the port to which you attached new programming
  <port> [<name>] hardware. For example, 'jtagconfig --add byteblastermv lpt1'
                  specifies that you attached a ByteBlasterMV cable to port   
                  LPT1. You can also use '[<name>]' to add a string that      
                  describes the hardware to the output from the               
                  'jtagconfig --enum' command.                                

                  The JTAG Server automatically detects cables that you attach
                  to a USB port, therefore you do not need to use this command
                  for these cables.                                           

--remove <cable>  Removes the hardware setup that is indicated with the number
                  listed for the hardware in the output of the '--enum'       
                  command. In the example for the '--enum' command, above, the
                  number '1)' is listed for the ByteBlasterMV cable.          
                  Therefore, the command-line 'jtagconfig --remove 1' removes 
                  the hardware setup for the ByteBlasterMV cable.

                  If the hardware specified is attached to a remote JTAG server
                  then the connection to the remote JTAG server is removed instead.

--getparam        Get a hardware specific parameter from the cable specified.
<cable> <param>   The parameters supported vary by cable type, see the
                  documentation for your cable for details.

--setparam        Set a hardware specific parameter on the cable specified.
<cable> <param>   The parameters supported vary by cable type, see the
<value>           documentation for your cable for details.
                  This command can only set numeric parameters (the suffixes
                  k and M are recognized when parsing the value).

--define <jtagid> Tells the JTAG server about the name and IR length of a new
<name> <irlength> device.  This is stored and used in future enumerations
                  to reduce the number of devices which cannot be used

--undefine        Tells the JTAG server to remove information about the name
<jtagid> <name>   and IR length of a device.

--defined         Displays the JTAG IDs, names and IR lengths of all non-Intel FPGA
                  devices known about by the JTAG server.

--addserver       Tells Quartus to connect to the remote JTAG server and make
<servername>      all cables on that server available to local applications.
<password>

                  An IP address or DNS name may be used to specify the server
                  to connect to.  The password given here must match the
                  password used on the remote server.

--enableremote    Tells the JTAG server to allow connections from remote
<password>        machines.  These machines must specify the same password
                  when connecting.

--disableremote   Tells the JTAG server not to accept any more connections
                  from remote machines.  Remote connections currently in use
                  are not terminated.
Note: If a development board has more than one JTAG port, you must run this command first to identify the correct JTAG cable. For example, you have to run this command to identify the correct JTAG cable and then run the nios2-terminal command using the correct JTAG port: nios2-terminal -c 2.