-
Notifications
You must be signed in to change notification settings - Fork 159
General Build Instructions Using CMake
mcuee edited this page May 11, 2025
·
1 revision
AVRDUDE mainly uses CMake for building from source. autotools build is also supported.
Depending on your requirements, the following prerequisites are needed:
- libelf including header files (for directly reading ELF files)
- libusb 0.1 or 1.0 (or compatible), including header files
- libftdi or libftdi1 (for direct access to FTDI devices)
- libhidapi or libhid (for access to recent Atmel/Microchip dongles)
- CMake version 3.14 or later
When building AVRDUDE, you have a few customizations options to choose from that enable additional programmers in AVRDUDE:
-
HAVE_LINUXGPIO
- Enable Linux sysfs GPIO support (default OFF) -
HAVE_LINUXSPI
- Enable Linux SPI support (default OFF) -
HAVE_PARPORT
- Enable parallel port support (default OFF)
For a complete list of options, type cmake -LH
. You can also use the CMake GUI to configure and build the project.
When you configure the project using CMake, use the -D option to customize a configuration option.
cmake -D CMAKE_BUILD_TYPE=RelWithDebInfo -B build_linux
cmake --build build_linux
At the end of the CMake configuration, a configuration summary is issued, like this:
-- DO HAVE libelf
-- DO HAVE libusb
-- DO HAVE libusb_1_0
-- DO HAVE libhidapi
-- DON'T HAVE libftdi
-- DO HAVE libftdi1
-- DO HAVE libreadline
-- DO HAVE libserialport
-- DISABLED doc
-- DISABLED parport
-- DISABLED linuxgpio
-- DISABLED linuxspi
-- DO HAVE swig+Python3
Make sure all the features you are interested in have been found.
Alternative configure and build option using build.sh (not working for MSVC build). This is still using CMake.
./build.sh