Skip to content

Build RIOT on Windows OS

Koen Zandberg edited this page Jun 17, 2022 · 14 revisions

This page documents a brief description about building RIOT on Windows OS. There is no special build trick for RIOT so default build system settings for arm cross compilers will be described for Windows Operating Systems.

1- Installing ARM GCC Toolchain

  • Download installer from here and start the installation.

  • Please select a path (Destination Folder) without spaces: e.g. "C:/armgcc"

    ARM GCC Path

  • Select "Add path to environment variable"

Add to Environment Paths

2- Installing MinGW and MSYS

  • Download MINGW from here and start installation. Please select short paths without spaces for MinGW directory: e.g. c:\MinGW

MinGW Path

  • Select following items to install in MinGW Setup : mingw32-base, mingw32-gcc-g++, msys-base

MINGW Items

and also install Mintty for terminal emulation under "All Packages" : msys-mintty

MINTTY

and now click "Apply Changes" under "Installation" Menu.

  • Find mintty under "C:\MinGW\msys\1.0\bin" and create a Desktop shortcut. And right click on the desktop shortcut, select "Properties" and change target to "C:\MinGW\msys\1.0\bin\mintty.exe /bin/bash -l"

MINTTY Target

  • Open MINTTY by clicking desktop shortcut and install updates by following command : mingw-get update

MINGW Updates

  • Install also following items in MINTTY by "mingw-get install" command: msys-wget, msys-zlib, msys-unzip, msys-mktemp

MINGW Tools

  • Add following paths to Environment Variables : "C:\MinGW\bin", "C:\MinGW\msys\1.0\bin"

Environment Variables

3- Build environment is ready now. Build your RIOT application. Build RIOT

4- Flashing

  • On some platforms RIOT uses OpenOCD for flashing the nodes. Although, OpenOCD does not support Windows officially, they do provide a link to some Windows binaries of their flashing tool. You can find the link at the OpenOCD homepage.
Clone this wiki locally