-
Notifications
You must be signed in to change notification settings - Fork 160
Building AVRDUDE for Windows using MSYS2
Marius Greuel edited this page May 11, 2022
·
20 revisions
If you prefer to use MSYS2 as your development environment, you may build AVRDUDE directly in MSYS2.
MSYS2 can also be used to build native Windows binaries, i.e. executables that do not require any MSYS2 DLLs to execute. If you want to create native Windows binaries, make sure that you do not use the MSYS environment. Instead, use a Windows compatible environment, such as MINGW32 or MINGW64.
Update the package database first:
pacman -Syu
For 32-bit builds, use the MINGW32 environment and install
pacman -S --needed base-devel git mingw-w64-i686-gcc mingw-w64-i686-cmake
pacman -S --needed mingw-w64-i686-libelf mingw-w64-i686-libusb mingw-w64-i686-libusb-compat-git mingw-w64-i686-libusb-win32 mingw-w64-i686-hidapi mingw-w64-i686-libftdi
For 64-bit builds, use the MINGW64 environment and install
pacman -S --needed base-devel mingw-w64-x86_64-gcc mingw-w64-x86_64-cmake
pacman -S --needed mingw-w64-x86_64-libelf mingw-w64-x86_64-libusb mingw-w64-x86_64-libusb-compat-git mingw-w64-x86_64-libusb-win32 mingw-w64-x86_64-hidapi mingw-w64-x86_64-libftdi
For 32-bit builds, use the MINGW32 environment and run the following commands:
git clone https://github.com/avrdudes/avrdude
cd avrdude
cmake -G"MSYS Makefiles" -D CMAKE_BUILD_TYPE=RelWithDebInfo -B build_mingw32
cmake --build build_mingw32
For 64-bit builds, use the MINGW64 environment and run the following commands:
git clone https://github.com/avrdudes/avrdude
cd avrdude
cmake -G"MSYS Makefiles" -D CMAKE_BUILD_TYPE=RelWithDebInfo -B build_mingw64
cmake --build build_mingw64