FX2LOAD_WRAPPER(1) Retro Project Manual FX2LOAD_WRAPPER(1) NNAAMMEE fx2load_wrapper - auto-load firmware into Cypress FX2 USB controller SSYYNNOOPPSSIISS ffxx22llooaadd__wwrraappppeerr [----bbooaarrdd==_b] [----ffiillee==_f] [----iihhxx__ppaatthh==_p] [----ccyyccffxx22pprroogg] [----ffoorrccee] [----ddrryy__rruunn] ffxx22llooaadd__wwrraappppeerr ----hheellpp DDEESSCCRRIIPPTTIIOONN 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 RREETTRROO__FFXX22__VVIIDD and RREETTRROO__FFXX22__PPIIDD, or default vid=16c0 and pid=03ef. It inquires with llssuussbb(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 ----ffiillee it is as- sumed the proper firmware is already active. Otherwise the firmware im- age is loaded with either ffxxllooaadd(1) or ccyyccffxx22pprroogg. NNoottee:: 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. OOPPTTIIOONNSS ----bbooaarrdd==_b determines the type of board to be configured. The default is 'nexys2', currently supported boards are: nneexxyyss22 Digilent Nexys2. Default file: nexys2_jtag_2fifo_ic.ihx nneexxyyss33 Digilent Nexys3. Default file: nexys3_jtag_2fifo_ic.ihx aattllyyss Digilent Atlys. Default file: nexys3_jtag_2fifo_ic.ihx ----ffiillee==_f specifies the firmware image to be loaded. Must be in _._i_h_x for- mat and located in the path defined with the ----iihhxx__ppaatthh option. ----iihhxx__ppaatthh==_p specifies the directory were firmware image files are searched. The default is _$_R_E_T_R_O_B_A_S_E_/_t_o_o_l_s_/_f_x_2_/_b_i_n. ----ccyyccffxx22pprroogg Use ccyyccffxx22pprroogg instead of ffxxllooaadd(1) to load the firmware. ----ffoorrccee Unconditionally load the firmware, even when an 'iProduct' at- tribute match is seen. Useful to reset the Cypress FX2 con- troller. ----ddrryy__rruunn Don't load the firmware, display only the command used to do so. ----hheellpp print help text and exit. EEXXIITT SSTTAATTUUSS In case of an error, an exit status 1 is returned. EENNVVIIRROONNMMEENNTT RREETTRROO__FFXX22__VVIIDD,, RREETTRROO__FFXX22__PPIIDD Define the USB path of the Cypress FX2 USB controller. If not spec- ified the defaults vid=16c0 and pid=03ef are used. RREETTRROOBBAASSEE Path to current Retro project root directory. Used for the default firmware path in case no ----iihhxx__ppaatthh option is given. EEXXAAMMPPLLEESS ffxx22llooaadd__wwrraappppeerr ----bbooaarrdd==nneexxyyss22 ----ffiillee==nneexxyyss22__jjttaagg__22ffiiffoo__iicc..iihhxx Checks whether the 'nexys2_jtag_2fifo_ic' version of the firmware is loaded and in case not, loads the firmware image. SSEEEE AALLSSOO ffxxllooaadd(1), ccoonnffiigg__wwrraappppeerr(1) AAUUTTHHOORR Walter F.J. Mueller Retro Project 2013-01-05 FX2LOAD_WRAPPER(1)