2021-11-28 09:11:51 +01:00
.. _install:
Installing openFPGALoader
#########################
Linux
=====
2024-12-21 16:12:24 +01:00
Debian/Ubuntu
----------
openFPGALoader is available in the default repositories:
.. code-block :: bash
sudo apt install openfpgaloader
2024-12-02 21:03:56 +01:00
Guix
----------
openFPGALoader is available in the default repositories:
.. code-block :: bash
guix install openfpgaloader
2025-07-03 10:43:40 +02:00
To use openFPGALoader under GuixSystem without root privileges it is necessary to install the necessary udev rules. This can be done by extending `` udev-service-type `` in the `` operating-system `` configuration file with this package
.. code-block :: bash
(udev-rules-service 'openfpgaloader openfpgaloader #:groups '(\"plugdev\")
Additionally, `` plugdev `` group should be registered in the `` supplementary-groups `` field of your `` user-account ` ` declaration. Refer to ` ` Base Services `` section in the manual for examples.
2021-11-28 09:11:51 +01:00
Arch Linux
----------
openFPGALoader is available in the default repositories:
.. code-block :: bash
sudo pacman -S openfpgaloader
2021-12-14 07:51:49 +01:00
Alternatively, you could build from source. First: install required libraries:
.. code-block :: bash
2023-02-02 07:38:35 +01:00
sudo pacman -S git cmake make gcc pkgconf libftdi libusb zlib hidapi gzip
2021-12-14 07:51:49 +01:00
Build step is similar as Debian
2021-11-28 09:11:51 +01:00
Fedora
------
openFPGALoader is available as a Copr repository:
.. code-block :: bash
sudo dnf copr enable mobicarte/openFPGALoader
sudo dnf install openFPGALoader
2024-12-21 16:12:24 +01:00
From source
2021-11-28 09:11:51 +01:00
----------------------------
This application uses `` libftdi1 `` , so this library must be installed (and, depending on the distribution, headers too):
.. code-block :: bash
2022-02-27 16:48:04 +01:00
sudo apt install \
2022-12-18 13:56:54 +01:00
git \
2023-02-02 07:38:35 +01:00
gzip \
2021-11-28 09:11:51 +01:00
libftdi1-2 \
libftdi1-dev \
libhidapi-hidraw0 \
libhidapi-dev \
libudev-dev \
zlib1g-dev \
cmake \
pkg-config \
make \
g++
.. HINT ::
`` libudev-dev `` is optional, may be replaced by `` eudev-dev `` or just not installed.
By default, `` (e)udev `` support is enabled (used to open a device by his `` /dev/xx `` node).
If you don't want this option, use:
.. code-block :: bash
-DENABLE_UDEV=OFF
2022-02-20 01:41:17 +01:00
By default, `` cmsisdap `` support is enabled (used for colorlight I5, I9).
2021-11-28 09:11:51 +01:00
If you don't want this option, use:
.. code-block :: bash
-DENABLE_CMSISDAP=OFF
Alternatively you can manually specify the location of `` libusb `` and `` libftdi1 `` :
.. code-block :: bash
-DUSE_PKGCONFIG=OFF \
-DLIBUSB_LIBRARIES=<path_to_libusb> \
-DLIBFTDI_LIBRARIES=<path_to_libftdi> \
-DLIBFTDI_VERSION=<version> \
-DCMAKE_CXX_FLAGS="-I<libusb_include_dir> -I<libftdi1_include_dir>"
You may also need to add this if you see link errors between `` libusb `` and `` pthread `` :
.. code-block :: bash
-DLINK_CMAKE_THREADS=ON
2022-07-26 20:32:46 +02:00
By default, `` libgpiod `` support is enabled
If you don't want this option, use:
.. code-block :: bash
-DENABLE_LIBGPIOD=OFF
2022-12-18 13:56:54 +01:00
Additionaly you have to install `` libgpiod ``
2021-11-28 09:11:51 +01:00
To build the app:
.. code-block :: bash
2021-12-05 03:36:21 +01:00
git clone https://github.com/trabucayre/openFPGALoader
2022-03-03 15:33:30 +01:00
cd openFPGALoader
2021-11-28 09:11:51 +01:00
mkdir build
cd build
2022-03-03 15:33:30 +01:00
cmake .. # add -DBUILD_STATIC=ON to build a static version
# add -DENABLE_UDEV=OFF to disable udev support and -d /dev/xxx
# add -DENABLE_CMSISDAP=OFF to disable CMSIS DAP support
2021-11-28 09:11:51 +01:00
cmake --build .
# or
make -j$(nproc)
To install
.. code-block :: bash
$ sudo make install
The default install path is `` /usr/local `` , to change it, use `` -DCMAKE_INSTALL_PREFIX=myInstallDir `` in cmake invokation.
Udev rules
----------
By default, users have no access to converters.
A rule file (:ghsrc: `99-openfpgaloader.rules <99-openfpgaloader.rules>` ) for `` udev `` is provided at the root directory
of this repository.
These rules set access right and group (`` plugdev `` ) when a converter is plugged.
.. code-block :: bash
sudo cp 99-openfpgaloader.rules /etc/udev/rules.d/
sudo udevadm control --reload-rules && sudo udevadm trigger # force udev to take new rule
sudo usermod -a $USER -G plugdev # add user to plugdev group
After that you need to unplug and replug your device.
2022-09-17 15:56:51 +02:00
.. HINT ::
`` usermod `` is used to add `` $USER `` as a member of `` plugdev `` group.
However this update is not taken into account immediately: it's required to
logout from current session and login again.
2022-12-18 13:56:54 +01:00
Check, by using `` id $USER `` , if `` plugdev `` is mentioned after `` groups= `` .
2022-09-17 15:56:51 +02:00
An alternate (and temporary) solution is to use `` sudo - $USER `` to have
your user seen as a member of `` plugdev `` group (works only for the current terminal).
2021-11-28 09:11:51 +01:00
macOS
=====
openFPGALoader is available as a `Homebrew <https://brew.sh> `__ formula:
.. code-block :: bash
brew install openfpgaloader
2022-12-18 13:56:54 +01:00
Alternatively, if you want to build it by hand:
2022-03-21 23:00:39 +01:00
.. code-block :: bash
brew install --only-dependencies openfpgaloader
2023-02-02 07:38:35 +01:00
brew install cmake pkg-config zlib gzip
2022-03-21 23:00:39 +01:00
git clone https://github.com/trabucayre/openFPGALoader
cd openFPGALoader
mkdir build
cd build
cmake ..
make -j
2021-11-28 09:11:51 +01:00
Windows
=======
Common
======
Bitstreams for *XC2C (coolrunner-II)* needs to be remapped using `` .map `` shipped with *ISE* .
*ISE* path is set at configure time using:
.. code-block :: bash
-DISE_PATH=/somewhere/Xilinx/ISE_VERS/
default: `` /opt/Xilinx/14.7 `` .