Changes between Version 44 and Version 45 of TBR/UserManual/MinGW_Tools_for_Windows


Ignore:
Timestamp:
Jan 6, 2008, 3:40:53 AM (12 years ago)
Author:
ChrisJohns
Comment:

Fixed errors.

Legend:

Unmodified
Added
Removed
Modified
  • TBR/UserManual/MinGW_Tools_for_Windows

    v44 v45  
    33= MinGW Tools for Windows =
    44
    5 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.
     5Windows 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 and so do not confuse native Windows editors.
    66
    7 The RTEMS MinGW Tools are packaged in Windows installers. The latest tools can be access using the top level installer. It will install the common files and present you with a selection box for the targets you wish to install. The installer will check to see if you have already have the target installer present and  if it is will not download it again but will install it.
     7The RTEMS MinGW Tools are packaged in Windows installers. The latest tools can be accessed using the top level installer. It will install the common files and present you with a selection box for the targets you wish to install. The installer will check to see if you already have the target installer present and if present it will not download it again and will install the one you already have.
    88
    99<blockquote>
     
    1313</blockquote>
    1414</blockquote>
    15 Is it '''recommended you install MinGW, MSYS and MSYS DTK''' before you install the RTEMS Tools. The autotools installer builds autoconf and automake before installing them on your computer. There is no safe way to build autoconf using a cross-build on a Linux host. To build the autotools packages on Windows MSYS and MSYS DTK are required. The autotools installer checks for them and aborts installation if they do not exist. Read the section [wiki:MinGW_Tools_for_Windows#Setting_Up_MinGW  Setting Up MinGW] for details.
     15It is '''recommended you install MinGW, MSYS and MSYS DTK''' before you install the RTEMS Tools. The autotools installer builds autoconf and automake before installing them on your computer. There is no safe way to build autoconf using a cross-build on a Linux host. To build the autotools packages on Windows MSYS and MSYS DTK are required. The autotools installer checks for them and aborts installation if they do not exist. Read the section [wiki:MinGW_Tools_for_Windows#Setting_Up_MinGW  Setting Up MinGW] for details.
    1616</blockquote>
    1717
    18 Previous versions of the installers are located at http://www.rtems.org/ftp/pub/rtems/windows/.
     18Previous versions of the tool installers are located at http://www.rtems.org/ftp/pub/rtems/windows/.
    1919
    2020For a detailed walk through of the installer take a look at [wiki:TBR/Delete/Installing_MinGW_RTEMS_Tools Installing MinGW RTEMS Tools].
    2121
    22 The source code for the tools is under the GNU GPL and can be found here http://www.rtems.org/ftp/pub/rtems/windows/4.8/build-16/source. The installers and tools are built and packaged on a Linux Fedora (FC7) computer and the scripts are all provided in the RTEMS source code using the [wiki:Building/MingwTools Building MinGW Tools] instructions.
     22The source code for the tools is under the GNU GPL and can be found here http://www.rtems.org/ftp/pub/rtems/windows/4.8/build-16/source. The installers and tools are built and packaged on a Linux Fedora (FC7) computer and the scripts are all provided in the RTEMS source code. Instructions on using the scripts can be found in [wiki:Building/MingwTools Building MinGW Tools].
    2323
    24 The RTEMS are all installed into the default path of <tt>c:\opt\rtems-4.8</tt>. To test the tools run the <tt>rtems.bat</tt> file. This will open a Windows Command prompt (cmd) with a valid path to the installed tools. You can find the <tt>rtems.bat</tt> where you installed the tools or under the '''RTEMS 4.8''' menu in the '''Start Menu'''. Enter the GCC command for your tool set. For example the ARM GCC command is:
     24The RTEMS Tools are all installed into the default path of <tt>c:\opt\rtems-4.8</tt>. The version number changes with each release. To test the tools run the <tt>rtems.bat</tt> file. This will open a Windows Command prompt (cmd) with a valid path to the installed tools. You can find the <tt>rtems.bat</tt> under the install point or in the '''RTEMS 4.8''' menu under the '''Start Menu'''. Enter the GCC command for your tool set. For example the RTEMS 4.8 ARM GCC command is:
    2525
    2626 RTEMS C:\opt\rtems-4.8> arm-rtems4.8-gcc
    2727 arm-rtems4.8-gcc: no input files
    2828
    29 A few batch files and a script file are installed into the install point. The first is called <tt>rtems-env.bat</tt>. It sets up the path and environment variables you need to run the RTEMS tools. The second is <tt>rtems.bat</tt>. It will open a Windows command box with the RTEMS tools path and environment set. The last is <tt>sh-run.bat</tt>. You call this from your editor when you want to compile within the editor. You need to install the MinGW and MSYS packages to use this batch file. For example:
     29A few batch files and a script file are installed into the install point. The first is called <tt>rtems-env.bat</tt>. It sets up the path and environment variables you need to run the RTEMS tools. The second is <tt>rtems.bat</tt>. It will open a Windows command box with the RTEMS tools path and environment set. The last is <tt>sh-run.bat</tt>. You can call this batch file from your editor when you want to compile within the editor. You need to install the MinGW and MSYS packages to use this batch file. For example:
    3030
    3131 c:\rtems\arm\sh-run.bat ./vs-make.sh /c/opt/src/rtems/app all
     
    3737The 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 http://www.mingw.org/.
    3838
    39 The MinGW project has 3 packages we are interested in using. You should install them before you install the RTEMS Tools. The first MinGW package contains a Windows native GCC compiler, and GNU make (called mingw32-make). The second package is MSYS for Minimal SYStem (MSYS), and the third is the Minimal SYStem Developers Tool Kit (MSYS DTK). MSYS 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</code> scripts from the autooconf package. It is simpler to install and setup than the larger more complex Cygwin package.
     39The MinGW project has 3 packages we are interested in using. You should install them before you install the RTEMS Tools. The first MinGW package contains a Windows native GCC compiler, and GNU make (called mingw32-make). The second package is MSYS for Minimal SYStem (MSYS), and the third is the Minimal SYStem Developers Tool Kit (MSYS DTK). MSYS is a stand alone package based on the excellent and successful Cygwin package but simplified to providing a self hosted mingw32 target POSIX style environment. It provides a shell with enough functionality to run {{{configure</code> scripts from the autoconf package. It is simpler to install and setup than the larger more complex Cygwin package.
    4040
    4141<blockquote>
     
    4545</blockquote>
    4646
    47 It is advised to set up a home directory that MSYS can use. If you do not the MSYS shell will use a default one for your login name. If you create a home directory MSYS will use it. To create a home directory simply create a '''HOME''' environment variable. For Windows 2000 and Windows XP open the ''System'' icon on the ''Control Panel'', select the ''Advanced'' tab then the ''Evironment Variables'' button. Add a ''New'' environment variable for your login called '''HOME''' and point it to the home directory you with to use. It could point to a network drive that is a real Unix home directory, your Windows home directory under ''Documents and Settings'' that becomes part of a roaming profile, or just a directory local to the disk.
    48 
    4947Click on the above and install each package. The default settings for these package should be ok for most users.  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].
    5048
     
    5351</blockquote>
    5452
    55 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.
     53It is advised to set up a home directory that MSYS can use and if you do not the MSYS shell will use a default one for your login name. If you create a home directory MSYS will use it. To create a home directory simply create a '''HOME''' environment variable. For Windows 2000 and Windows XP open the ''System'' icon on the ''Control Panel'', select the ''Advanced'' tab then the ''Environment Variables'' button. Add a ''New'' environment variable for your login called '''HOME''' and point it to the home directory you wish to use. It could point to a network drive that is a real Unix home directory, your Windows home directory under ''Documents and Settings'' that becomes part of a roaming profile, or just a directory local to the disk.
    5654
    57 The MSYS shell can run the RTEMS {{{configure</code> 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</code> from a Windows command prompt started with the rtems.bat file shown above by placing ''sh'' before the {{{configure</code> command.
     55If you have Cygwin installed, or another package which contains Cygwin you should consider removing any paths to those packages from your global path variable and using batch files to set paths specifically. It can be confusing if you end up mixing MSYS and Cygwin executables in the same environment. The installed batch file <tt>rtems.bat</tt> shows how you can manage specific paths for MinGW and RTEMS.
     56
     57The MSYS shell can run the RTEMS {{{configure</code> 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</code> from a Windows command prompt started with the <tt>rtems.bat</tt> file by placing ''sh'' before the {{{configure</code> command.
    5858
    5959If you wish to modify RTEMS and/or need to run autoconf, automake or any of the autotools you will need to install the ''MinGW MSYS Developers Tool kit''.
    6060
    61 The RTEMS installer checks to see if the MSYS <tt>/etc/fstab</tt> is present and appends the prefix the tools are built with as a mount to the install point you set in the installer. The <tt>/etc/fstab</tt> will have the following entry (rtems4.8):
     61The RTEMS installer checks to see if the MSYS <tt>/etc/fstab</tt> is present and appends the install path the tools are built with as a mount to the install point you set in the installer. The <tt>/etc/fstab</tt> will have the following entry (rtems4.8) for the default install point:
    6262
    6363 C:/opt/rtems-4.8 /opt/rtems-4.8
    6464
    65 The install tries hard to local MSYS. If it does not find it please let us know.
     65The install tries hard to locate MSYS. If it does not find it please let us know.
    6666= Building RTEMS =
    6767
     
    8484</blockquote>
    8585
    86 If you have checked RTEMS out from CVS you will first need to bootstrap. If you have used Windows to check out from CVS with tools such as [http://www.tortoisecvs.org/ TortoiseCVS] the files will have DOS line endings. This causes problems with autoconf and automake and some files need to be stripped. The RTEMS bootstrap script will be modifed to handle this and until then you will need to bootstrap with the following:
     86If you have checked RTEMS out from CVS you will first need to bootstrap. If you have used Windows to check out from CVS with tools such as [http://www.tortoisecvs.org/ TortoiseCVS] the files will have DOS line endings. This causes problems with autoconf and automake and some files need to be stripped. The RTEMS bootstrap script may be modified to handle this but until then you will need to bootstrap with the following:
    8787
    8888 > cd rtems-4.8