FX2LOAD_WRAPPER(1)           Retro Project Manual           FX2LOAD_WRAPPER(1)


NAME
       fx2load_wrapper - auto-load firmware into Cypress FX2 USB controller

SYNOPSIS
       fx2load_wrapper [--board=b] [--file=f] [--ihx_path=p] [--cycfx2prog]
                       [--force] [--dry_run]
       fx2load_wrapper --help

DESCRIPTION
       Checks firmware state of a Cypress FX2 USB controller and re-loads  the
       firmware  in  case  of  a  mismatch  of  currently  active  and desired
       firmware.

       The command locates a USB device with a USB path defined by  the  envi-
       ronment  variables RETRO_FX2_VID and RETRO_FX2_PID, or default vid=16c0
       and pid=03ef.  It inquires with lsusb(1) the  'iProduct'  attribute  of
       the  currently  active USB descriptor. If this attribute is defined and
       equals the basename of the firmware image given with --file it  is  as-
       sumed the proper firmware is already active. Otherwise the firmware im-
       age is loaded with either fxload(1) or cycfx2prog.

       Note: after a firmware load the Cypress FX2  USB  controller  restarts.
       This causes a USB re-enumeration, the USB device disconnects and recon-
       nects with a new device descriptor. It can  take  some  time  till  the
       Linux USB stack shows the new device descriptor. The command sleeps for
       1.5 seconds, this is usually enough to ensure that subsequent  commands
       see the new state.

OPTIONS
       --board=b
              determines  the  type  of board to be configured. The default is
              'nexys2', currently supported boards are:
              nexys2 Digilent Nexys2. Default file: nexys2_jtag_2fifo_ic.ihx
              nexys3 Digilent Nexys3. Default file: nexys3_jtag_2fifo_ic.ihx
              atlys  Digilent Atlys. Default file: nexys3_jtag_2fifo_ic.ihx

       --file=f
              specifies the firmware image to be loaded. Must be in .ihx  for-
              mat and located in the path defined with the --ihx_path option.

       --ihx_path=p
              specifies  the directory were firmware image files are searched.
              The default is $RETROBASE/tools/fx2/bin.

       --cycfx2prog
              Use cycfx2prog instead of fxload(1) to load the firmware.

       --force
              Unconditionally load the firmware, even when an  'iProduct'  at-
              tribute  match  is  seen.  Useful  to reset the Cypress FX2 con-
              troller.

       --dry_run
              Don't load the firmware, display only the command used to do so.

       --help print help text and exit.

EXIT STATUS
       In case of an error, an exit status 1 is returned.

ENVIRONMENT
       RETRO_FX2_VID, RETRO_FX2_PID
           Define the USB path of the Cypress FX2 USB controller. If not spec-
           ified the defaults vid=16c0 and pid=03ef are used.

       RETROBASE
           Path  to current Retro project root directory. Used for the default
           firmware path in case no --ihx_path option is given.

EXAMPLES
       fx2load_wrapper --board=nexys2 --file=nexys2_jtag_2fifo_ic.ihx
           Checks whether the 'nexys2_jtag_2fifo_ic' version of  the  firmware
           is loaded and in case not, loads the firmware image.


SEE ALSO
       fxload(1), config_wrapper(1)


AUTHOR
       Walter F.J. Mueller <W.F.J.Mueller@gsi.de>


Retro Project                     2013-01-05                FX2LOAD_WRAPPER(1)
 
Generated: 2023-02-09
Generated by man2html V0.26
page hit count: 478
Valid CSS Valid XHTML 1.0 Strict