<spanid="advanced-usage"></span><h1>Advanced usage of openFPGALoader<aclass="headerlink"href="#advanced-usage-of-openfpgaloader"title="Link to this heading">¶</a></h1>
<sectionid="resetting-an-fpga">
<h2>Resetting an FPGA<aclass="headerlink"href="#resetting-an-fpga"title="Link to this heading">¶</a></h2>
<h2>Automatic file type detection bypass<aclass="headerlink"href="#automatic-file-type-detection-bypass"title="Link to this heading">¶</a></h2>
<p>Default behavior is to use file extension to determine file parser.
To avoid this mechanism <codeclass="docutils literal notranslate"><spanclass="pre">--file-type</span><spanclass="pre">type</span></code> must be used.</p>
<h2>FT231/FT232 bitbang mode and pins configuration<aclass="headerlink"href="#ft231-ft232-bitbang-mode-and-pins-configuration"title="Link to this heading">¶</a></h2>
<p>FT232R and ft231X may be used as JTAG programmer.
JTAG communications are emulated in bitbang mode.</p>
<p>To use these devices user needs to provides both the cable and the pin mapping:</p>
<li><p>ft23XXX may be <codeclass="docutils literal notranslate"><spanclass="pre">ft232RL</span></code> or <codeclass="docutils literal notranslate"><spanclass="pre">ft231X</span></code>.</p></li>
<li><p>TDI:TDO:TCK:TMS may be the pin ID (0 <= id <= 7) or string value.</p></li>
<h2>Writing to an arbitrary address in flash memory<aclass="headerlink"href="#writing-to-an-arbitrary-address-in-flash-memory"title="Link to this heading">¶</a></h2>
<p>With FPGA using an external SPI flash (<em>xilinx</em>, <em>lattice ECP5/nexus/ice40</em>, <em>anlogic</em>, <em>efinix</em>) option <codeclass="docutils literal notranslate"><spanclass="pre">-o</span></code> allows
one to write raw binary file to an arbitrary adress in FLASH.</p>
<h2>Detect/read/write on primary/secondary flash memories<aclass="headerlink"href="#detect-read-write-on-primary-secondary-flash-memories"title="Link to this heading">¶</a></h2>
<p>With FPGA using two external SPI flash (some <em>xilinx</em> boards) option <codeclass="docutils literal notranslate"><spanclass="pre">--target-flash</span></code> allows to select the QSPI chip.</p>
<h2>Using an alternative directory for <em>spiOverJtag</em><aclass="headerlink"href="#using-an-alternative-directory-for-spioverjtag"title="Link to this heading">¶</a></h2>
<p>By setting <codeclass="docutils literal notranslate"><spanclass="pre">OPENFPGALOADER_SOJ_DIR</span></code> it’s possible to override default
<liclass="toctree-l1 current"><aclass="current reference internal"href="#">Advanced usage of openFPGALoader</a><ul>
<liclass="toctree-l2"><aclass="reference internal"href="#resetting-an-fpga">Resetting an FPGA</a></li>
<liclass="toctree-l2"><aclass="reference internal"href="#using-negative-edge-for-tdo-s-sampling">Using negative edge for TDO’s sampling</a></li>
<liclass="toctree-l2"><aclass="reference internal"href="#reading-the-bitstream-from-stdin">Reading the bitstream from STDIN</a></li>
<liclass="toctree-l2"><aclass="reference internal"href="#automatic-file-type-detection-bypass">Automatic file type detection bypass</a></li>
<liclass="toctree-l2"><aclass="reference internal"href="#ft231-ft232-bitbang-mode-and-pins-configuration">FT231/FT232 bitbang mode and pins configuration</a></li>
<liclass="toctree-l2"><aclass="reference internal"href="#writing-to-an-arbitrary-address-in-flash-memory">Writing to an arbitrary address in flash memory</a></li>
<liclass="toctree-l2"><aclass="reference internal"href="#detect-read-write-on-primary-secondary-flash-memories">Detect/read/write on primary/secondary flash memories</a></li>
<liclass="toctree-l2"><aclass="reference internal"href="#using-an-alternative-directory-for-spioverjtag">Using an alternative directory for <em>spiOverJtag</em></a></li>