Skip to content

Building AVRDUDE for Linux

mcuee edited this page Dec 2, 2022 · 18 revisions

Prerequisites

To build AVRDUDE for Linux, you need to install the following packages.

gcc g++ git cmake flex bison libelf libusb libhidapi libftdi1 readline

Note that you may need to adapt the code depending on the different Linux distribution you are using.

For instance, for Debian based systems, you would run:

sudo apt-get install build-essential git cmake flex bison libelf-dev libusb-dev libhidapi-dev libftdi1-dev libreadline-dev

For RPM based systems, you would run:

sudo dnf install gcc-c++ git cmake flex bison elfutils-libelf-devel libusb-devel hidapi-devel libftdi-devel readline-devel

Build Instructions

To build AVRDUDE for Linux, run the following commands:

git clone https://github.com/avrdudes/avrdude
cd avrdude
./build.sh

If you want to enable LINUXGPIO or LINUXSPI support, add the CMake options -DHAVE_LINUXGPIO=ON and -DHAVE_LINUXSPI=ON:

cmake -D CMAKE_BUILD_TYPE=RelWithDebInfo -D HAVE_LINUXGPIO=ON -D HAVE_LINUXSPI=ON -B build_linux

Installation

To install a local build on your system, run the following commands:

sudo cmake --build build_linux --target install

Clone this wiki locally