GeMRTOS ships a Windows simulation layer that runs the same kernel sources as the FPGA target, so you can explore the API, the scheduling behaviour and the example catalogue without a board. Building it on Windows needs GCC from MSYS2 — and it needs the 32-bit toolchain specifically.
This is the step most often gotten wrong. The general MinGW instructions you will find elsewhere install the 64-bit compiler (mingw-w64-x86_64-gcc) and use the MINGW64 environment. GeMRTOS’s supplied build scripts require C:\msys64\mingw32\bin\gcc.exe and the MINGW32 environment. If you install only the 64-bit package, the build stops before it starts.
Install MSYS2 and the 32-bit GCC #
- Download and install MSYS2 from msys2.org. Accept the default location,
C:\msys64— the GeMRTOS scripts look there. - Open the MSYS2 MINGW32 terminal from the Start menu. Not MINGW64, and not the plain MSYS terminal.
- Install the 32-bit compiler and make:
pacman -S mingw-w64-i686-gcc make - Confirm what you actually installed:
If this printsgcc -dumpmachine # expected: i686-w64-mingw32x86_64-w64-mingw32, you are in the MINGW64 terminal. Close it and open MINGW32.
Build and run the tests #
From the project root, tests\run_tests.bat sets up the MINGW32 environment for you and invokes make. It checks for C:\msys64\mingw32\bin\gcc.exe first and tells you exactly which package to install if it is missing, so it is the quickest way to confirm your toolchain is correct.
A healthy run ends with a per-binary summary and a final pass line. If the compiler is wrong, you will see the missing-GCC message instead of compiler errors — the script fails early on purpose rather than producing confusing link failures later.
Optional: Visual Studio Code #
If you prefer an editor with debugging, install Visual Studio Code and its C/C++ extension, then add C:\msys64\mingw32\bin to your PATH so the extension finds the same compiler the build scripts use. Microsoft’s Using GCC with MinGW guide covers the editor setup — but follow the package and environment names above rather than the 64-bit ones in that guide.
Adding mingw32\bin to PATH is only needed for the editor. The GeMRTOS build scripts locate the compiler themselves.