= MinGW Tools for Windows = [[TOC(TBR/UserManual/MinGW_Tools_for_Windows, depth=2)]] = Introduction = Windows users can use [http://www.mingw.org MinGW] based 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 and so do not confuse native Windows editors. The RTEMS MinGW Tools are not currently packaged in installers. The installers stopped around RTEMS 4.9 when the MinGW tools started to be built as part of the binary tool package. This means you need to manually step through the process. It is not difficult, how-ever it is not an easy installer. = Target User = This page targets a single user with a Windows machine who wishes to play with a real-time OS. This user is independent with no corporate support and she wants to build her desired board support package from a RTEMS release TAR-file or CVS. Only default installation paths are used so if the user wishes to access support on MinGW or MSYS mailing lists she has the standard set up and lay out for those forums. If you wish to contain all the RTEMS installed files in a common location you may find the hints in the [wiki:#Advanced_Users Advanced Users] section useful. = Base Installation = If you want some excellent tools or wish to build RTEMS on Windows the MinGW project provides just what you need. The RTEMS 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. Please note that the MinGW and MSYS installation is only necessary if you want to build RTEMS as RTEMS uses autoconf and automake. If someone else provides you with your desired RTEMS board support package you do not need them. The RTEMS Tools (compiler, assembler, linker etc.) do not depend on them. The only exception is the RTEMS ''Autoconf and Automake'' subpackage, but this package is only needed if you want do build RTEMS from the CVS sources. The MinGW project has a package management tool that will install and manage your MinGW installation. The [http://mingw.org/wiki/Getting_Started MinGW Getting Started Guide] will step you through installing MinGW and MSYS. Open the [http://mingw.org/wiki/Getting_Started MinGW Getting Started Guide] and select the link to download the GUI installer. Save this to disk and run it. Click through the default including the default path of "C:\MinGW". At the "Select Components" page select the C++ compiler and "MSYS Basic System" and "MinGW Developer Toolkit". Once installed you can use to the CLI version of the tool to upgrade and install further packages. Download the latest GUI installer from: *http://sourceforge.net/projects/mingw/files/Installer/mingw-get-inst/ If there are problems with the above links or to check for other MinGW packages, visit the [http://www.mingw.org/download.shtml MinGW Download Site] which should refer you to the [http://sourceforge.net/project/showfiles.php?group_id=2435 MinGW Sourceforge Files] page. = RTEMS Tools Installation = The built tools for RTEMS 4.11 can be found here: *http://www.rtems.org/ftp/pub/rtems/mingw32/4.11/ To download the required files for the SPARC architecture you need to enter the follow directories and download all the tar.bz2 files that do not end in "src.tar.bz2" unless you wish to have the source as well: *http://www.rtems.org/ftp/pub/rtems/mingw32/4.11/rtems-4.11-sparc-rtems4.11-binutils/ *http://www.rtems.org/ftp/pub/rtems/mingw32/4.11/rtems-4.11-sparc-rtems4.11-gcc/ *http://www.rtems.org/ftp/pub/rtems/mingw32/4.11/rtems-4.11-sparc-rtems4.11-gdb/ The exact file name changes as the tools are updated. For example the current binutils file is "rtems-4.11-sparc-rtems4.11-binutils-2.22-1.tar.bz2" where the binutils version is 2.22 and this is our 1st patch release. Download all the files to a single directory on your Windows machine. For example download to "C:\opt\rtems\packages" and opening a MSYS shell we would have: {{{ [chris@weka packages]$ cd /c/opt/rtems/packages/ [chris@weka packages]$ ls rtems-4.11-sparc-rtems4.11-binutils-2.22-1.tar.bz2 rtems-4.11-sparc-rtems4.11-gcc-libstdc++-4.6.2-9.tar.bz2 rtems-4.11-sparc-rtems4.11-gcc-4.6.2-9.tar.bz2 rtems-4.11-sparc-rtems4.11-gdb-7.4-1.tar.bz2 rtems-4.11-sparc-rtems4.11-gcc-c++-4.6.2-9.tar.bz2 rtems-4.11-sparc-rtems4.11-newlib-1.20.0-4.tar.bz2 rtems-4.11-sparc-rtems4.11-gcc-libgcc-4.6.2-9.tar.bz2 }}} To install open a MSYS shell and perform the following commands: {{{ [chris@weka /]$ cd /c [chris@weka c]$ for f in $(ls opt/rtems/packages/*.bz2); do tar xvjf $f; done ./ ./opt/ ./opt/rtems-4.11/ ./opt/rtems-4.11/bin/ ./opt/rtems-4.11/bin/sparc-rtems4.11-as.exe ./opt/rtems-4.11/bin/sparc-rtems4.11-objcopy.exe ./opt/rtems-4.11/bin/sparc-rtems4.11-ld.exe ./opt/rtems-4.11/bin/sparc-rtems4.11-strip.exe ./opt/rtems-4.11/bin/sparc-rtems4.11-c++filt.exe ./opt/rtems-4.11/bin/sparc-rtems4.11-size.exe ./opt/rtems-4.11/bin/sparc-rtems4.11-nm.exe ./opt/rtems-4.11/bin/sparc-rtems4.11-ld.bfd.exe ./opt/rtems-4.11/bin/sparc-rtems4.11-objdump.exe }}} Not all the files installed are shown in the example above. You will need to enter the autoconf and automake directories to obtain those packages and to install them if you wish to boostrap RTEMS. Finally update the MSYS file-system table to point to the install RTEMS tools. Again in a MSYS shell perform the following: {{{ [chris@weka etc]$ echo "c:\opt /opt" >> /etc/fstab [chris@weka etc]$ cd /opt/rtems-4.11 }}} You should now have a working set of RTEMS tools. = RTEMS Build = THIS NEEDS UPDATING. Someone please update ? Thanks Chris. We will use the [http://www.rtems.org/ftp/pub/rtems/4.10.2/rtems-4.10.2.tar.bz2 RTEMS 4.10.2] release here and assume that all tools from above are installed in their correct version (for this release use the RTEMS-4.10 tools). If you use a GIT version make sure that the Unix to DOS line endings conversion was switched off during the checkout and do not forget the bootstrap. The build will be done in a Windows command shell (''cmd.exe''). Execute the following commands within a Windows command shell to build for example the PSIM board support package (the '>' prompt indicates the Windows command shell): > set PATH=C:\opt\rtems-4.10\bin;C:\MinGW\bin;C:\msys\1.0\bin;%PATH% > tar xjf /c/download/rtems-4.10.2.tar.bz2 > mkdir rtems4.10-build > cd rtems4.10-build > sh ../rtems-4.10.2/configure --target=powerpc-rtems4.10 --enable-rtemsbsp=psim --enable-cxx --enable-tests=samples > make install Alternatively you can use a MSYS shell (''Start > All Programs > MinGW > MSYS > msys''). Execute the following commands within a MSYS shell to build for example the PSIM board support package (the '$' prompt indicates the MSYS shell): $ export PATH="/opt/rtems-4.10/bin:$PATH" $ tar xjf /c/download/rtems-4.10.2.tar.bz2 $ mkdir rtems4.10-build $ cd rtems4.10-build $ ../rtems-4.10.2/configure --target=powerpc-rtems4.10 --enable-rtemsbsp=psim --enable-cxx --enable-tests=samples $ make install It is recommended to use a fresh build directory for each configuration. See also [wiki:Building/RTEMS Building RTEMS]. = Advanced Users = = Installation Root Directory = You can use common root directory for all packages and tools like: