Menu

Build

Tormod Volden

Building on Windows

Install MSYS2 from http://msys2.github.io/

To avoid interference from other software on your computer, set a clean path in the MSYS window before running the upgrade commands:

PATH=/usr/local/bin:/usr/bin:/bin:/opt/bin

update-core
pacman -Su
pacman -Sy

Close all MSYS windows and open a new one to install the toolchain:

PATH=/usr/local/bin:/usr/bin:/bin:/opt/bin

pacman -S mingw-w64-x86_64-gcc
pacman -S make

Now open a MINGW64 shell to build stm32flash:

PATH=/mingw64/bin:/usr/local/bin:/usr/bin:/bin

cd stm32flash
make

Cross-building for Windows

E.g. on a Debian/Ubuntu system with the gcc-mingw-w64-x86-64 package installed:

CC=x86_64-w64-mingw32-gcc make

Alternatively with autotools: (doesn't seem to produce good binaries - help is welcome)

autoreconf -v -i # Can be skipped if there is already a "configure" script distributed
./configure --host=x86_64-w64-mingw32
make

Related

Wiki: Home

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.