Version 7 (modified by ChrisJohns, on Jul 21, 2006 at 7:41:44 AM) (diff)

/* MinGW Tools for Windows */

MinGW Tools for Windows

Windows users can now use MinGW base RTEMS tools. These tools will generate the same application code for RTEMS as the tools on Linux or Cygwin. MinGW tools use the native Windows runtime rather than access Windows via the POSIX interface Cygwin provides. MinGW tools are faster than the Cygwin equivalent and are not confused by Cygwin mount points. Compiler errors will show a Windows path rather than a Cygwin path.

The RTEMS MinGW tools are packaged in Windows installers. The latest tools are:

Click on the link above to install the tools. The tools are still being worked on so things may changed. These tools are currenty missing GDB. This is to be added next.

To test the tools open a Command prompt (cmd) set the path to the installed location (default is c:\rtems\bin) and enter the GCC command for your tool set. For example the ARM GCC command is:


You can add a batch file for RTEMS which will give you a Windows command window ready to run:

type rtems.bat

@echo off set PATH=c:\rtems;c:\mingw\bin;c:\msys\1.0\bin;%PATH% set PROMPT=RTEMS(arm) $P$G If "x%OS%x" == "xwindows_NTx" Goto WinNT_Title exit :WinNT_Title Title RTEMS(arm) doskey > Nul

Place this in the install point and create a Desktop short cut or Quick Start short cut.

Setting Up MinGW

The tools as installed do not need any extra packages, DLLs or installs to work. You could use any available make program or tools to build any RTEMS application. If you want some excellent tools or wish to build RTEMS on Windows the MinGW project provides just what you need. You can find the MinGW project at

The MinGW project has 2 packages we are interested in using. The first MinGW package which contains a Windows native GCC compiler, and GNU make (called mingw32-make). The second package is MSYS for Minimal SYStem. It is a stand alone package based on the excellent and sucessful Cygwin package but simplifed to providing a self hosted mingw32 target POSIX style environment. It provides a shell with enough functionality to run configure scripts from the autooconf package. It is simpler to install and setup than the larger more complex Cygwin package.

Click on the above and install each package. The default settings for these package should be ok for most users.

If you have Cygwin installed, or another package which contains Cygwin you should consider removing any paths to it from your global path variable and using batch files to set paths specifically. It can be confusing if you end up mixing all of together. The example batch file above shows how you can manage specific paths for MinGW and RTEMS.

With MSYS you can run the RTEMS configure script. You can use the MSYS shell which you can find as a menu or Desktop icon. This is just like a Unix shell so you need to know some basic Unix commands to use. You can also run configure from a Windows command prompt started with the rtems.bat file shown above by placing "sh" before the configure command.

If you wish to modify RTEMS and need to run autoconf, automake or any of the autotools you will need to install the MinGW MSYS Developers Tool kit.

Building RTEMS

To build RTEMS with the source code in a directory 'c:\rtems\src\rtems' you would do the following:

c: cd \rtems\src mkdir m68k cd m68k sh ../rtems/configure --target=m68k-rtems4.7 --enable-multilib --prefix=/c/rtems