<p>To use openFPGALoader under GuixSystem without root privileges it is necessary to install the necessary udev rules. This can be done by extending <codeclass="docutils literal notranslate"><spanclass="pre">udev-service-type</span></code> in the <codeclass="docutils literal notranslate"><spanclass="pre">operating-system</span></code> configuration file with this package</p>
<p>Additionally, <codeclass="docutils literal notranslate"><spanclass="pre">plugdev</span></code> group should be registered in the <codeclass="docutils literal notranslate"><spanclass="pre">supplementary-groups</span></code> field of your <codeclass="docutils literal notranslate"><spanclass="pre">user-account``declaration.</span> <spanclass="pre">Refer</span><spanclass="pre">to</span><spanclass="pre">``Base</span><spanclass="pre">Services</span></code> section in the manual for examples.</p>
</section>
<sectionid="arch-linux">
<h3>Arch Linux<aclass="headerlink"href="#arch-linux"title="Link to this heading">¶</a></h3>
<p>openFPGALoader is available in the default repositories:</p>
<h3>From source<aclass="headerlink"href="#from-source"title="Link to this heading">¶</a></h3>
<p>This application uses <codeclass="docutils literal notranslate"><spanclass="pre">libftdi1</span></code>, so this library must be installed (and, depending on the distribution, headers too):</p>
<p><codeclass="docutils literal notranslate"><spanclass="pre">libudev-dev</span></code> is optional, may be replaced by <codeclass="docutils literal notranslate"><spanclass="pre">eudev-dev</span></code> or just not installed.</p>
</div>
<p>By default, <codeclass="docutils literal notranslate"><spanclass="pre">(e)udev</span></code> support is enabled (used to open a device by his <codeclass="docutils literal notranslate"><spanclass="pre">/dev/xx</span></code> node).
<p>Alternatively you can manually specify the location of <codeclass="docutils literal notranslate"><spanclass="pre">libusb</span></code> and <codeclass="docutils literal notranslate"><spanclass="pre">libftdi1</span></code>:</p>
<p>You may also need to add this if you see link errors between <codeclass="docutils literal notranslate"><spanclass="pre">libusb</span></code> and <codeclass="docutils literal notranslate"><spanclass="pre">pthread</span></code>:</p>
<p>The default install path is <codeclass="docutils literal notranslate"><spanclass="pre">/usr/local</span></code>, to change it, use <codeclass="docutils literal notranslate"><spanclass="pre">-DCMAKE_INSTALL_PREFIX=myInstallDir</span></code> in cmake invokation.</p>
</section>
<sectionid="udev-rules">
<h3>Udev rules<aclass="headerlink"href="#udev-rules"title="Link to this heading">¶</a></h3>
<p>By default, users have no access to converters.
A rule file (<aclass="extlink-ghsrc reference external"href="https://github.com/trabucayre/openFPGALoader/blob/master/99-openfpgaloader.rules">99-openfpgaloader.rules</a>) for <codeclass="docutils literal notranslate"><spanclass="pre">udev</span></code> is provided at the root directory
These rules set access right and group (<codeclass="docutils literal notranslate"><spanclass="pre">plugdev</span></code>) when a converter is plugged.</p>
sudo<spanclass="w"></span>udevadm<spanclass="w"></span>control<spanclass="w"></span>--reload-rules<spanclass="w"></span><spanclass="o">&&</span><spanclass="w"></span>sudo<spanclass="w"></span>udevadm<spanclass="w"></span>trigger<spanclass="w"></span><spanclass="c1"># force udev to take new rule</span>
sudo<spanclass="w"></span>usermod<spanclass="w"></span>-a<spanclass="w"></span><spanclass="nv">$USER</span><spanclass="w"></span>-G<spanclass="w"></span>plugdev<spanclass="w"></span><spanclass="c1"># add user to plugdev group</span>
</pre></div>
</div>
<p>After that you need to unplug and replug your device.</p>
<divclass="admonition hint">
<pclass="admonition-title">Hint</p>
<p><codeclass="docutils literal notranslate"><spanclass="pre">usermod</span></code> is used to add <codeclass="docutils literal notranslate"><spanclass="pre">$USER</span></code> as a member of <codeclass="docutils literal notranslate"><spanclass="pre">plugdev</span></code> group.
However this update is not taken into account immediately: it’s required to
logout from current session and login again.
Check, by using <codeclass="docutils literal notranslate"><spanclass="pre">id</span><spanclass="pre">$USER</span></code>, if <codeclass="docutils literal notranslate"><spanclass="pre">plugdev</span></code> is mentioned after <codeclass="docutils literal notranslate"><spanclass="pre">groups=</span></code>.
An alternate (and temporary) solution is to use <codeclass="docutils literal notranslate"><spanclass="pre">sudo</span><spanclass="pre">-</span><spanclass="pre">$USER</span></code> to have
your user seen as a member of <codeclass="docutils literal notranslate"><spanclass="pre">plugdev</span></code> group (works only for the current terminal).</p>
</div>
</section>
</section>
<sectionid="macos">
<h2>macOS<aclass="headerlink"href="#macos"title="Link to this heading">¶</a></h2>
<p>openFPGALoader is available as a <aclass="reference external"href="https://brew.sh">Homebrew</a> formula:</p>
<h2>Common<aclass="headerlink"href="#common"title="Link to this heading">¶</a></h2>
<p>Bitstreams for <em>XC2C (coolrunner-II)</em> needs to be remapped using <codeclass="docutils literal notranslate"><spanclass="pre">.map</span></code> shipped with <em>ISE</em>.
<em>ISE</em> path is set at configure time using:</p>
<h3>Disabling/Enabling Cable or Vendor Drivers<aclass="headerlink"href="#disabling-enabling-cable-or-vendor-drivers"title="Link to this heading">¶</a></h3>
<p>With the default <codeclass="docutils literal notranslate"><spanclass="pre">cmake</span><spanclass="pre">..</span></code> configuration, openFPGALoader enables
<codeclass="docutils literal notranslate"><spanclass="pre">ENABLE_CABLE_ALL=ON</span></code> and <codeclass="docutils literal notranslate"><spanclass="pre">ENABLE_VENDORS_ALL=ON</span></code>. This means all cable
and vendor drivers are enabled by default, then filtered only by OS
capabilities and available dependencies.</p>
<p>To reduce binary size, speed up the build, or keep support limited to selected
cables/vendors, you can explicitly enable or disable options.</p>
<p>This produces an <strong>openFPGALoader</strong> binary with no cable/vendor support.
Then re-enable only what you need by adding one or more options below.</p>
<p>Each item in the following lists is a CMake option name. Use them with
<codeclass="docutils literal notranslate"><spanclass="pre">-D<OPTION>=ON</span></code> to enable or <codeclass="docutils literal notranslate"><spanclass="pre">-D<OPTION>=OFF</span></code> to disable.</p>
<divclass="admonition note">
<pclass="admonition-title">Note</p>
<p>The default value for each option is provided by <codeclass="docutils literal notranslate"><spanclass="pre">ENABLE_CABLE_ALL</span></code> and
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">ENABLE_ALTERA_SUPPORT</span></code>: Enable Altera/Intel device family support.</p></li>
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">ENABLE_ANLOGIC_SUPPORT</span></code>: Enable Anlogic device family support.</p></li>
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">ENABLE_COLOGNECHIP_SUPPORT</span></code>: Enable Cologne Chip device family support (requires libftdi).</p></li>
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">ENABLE_EFINIX_SUPPORT</span></code>: Enable Efinix device family support (requires libftdi).</p></li>
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">ENABLE_GOWIN_SUPPORT</span></code>: Enable Gowin device family support.</p></li>
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">ENABLE_ICE40_SUPPORT</span></code>: Enable Lattice iCE40 device family support (requires libftdi).</p></li>
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">ENABLE_LATTICE_SUPPORT</span></code>: Enable Lattice device family support.</p></li>
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">ENABLE_LATTICESSPI_SUPPORT</span></code>: Enable Lattice SSPI support (requires libftdi).</p></li>
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">ENABLE_XILINX_SUPPORT</span></code>: Enable Xilinx device family support.</p></li>
</ul>
<divclass="admonition note">
<pclass="admonition-title">Note</p>
<p>SPI support is hardcoded to FTDI. When FTDI support is disabled, some
vendor drivers are also disabled (<em>iCE40</em>, <em>Cologne Chip</em>, <em>Efinix</em>, and