source: rtems/doc/started/nt.t @ 3bfda69

4.104.114.84.95
Last change on this file since 3bfda69 was 2c5ba07, checked in by Joel Sherrill <joel.sherrill@…>, on 09/26/03 at 21:19:52

2003-09-26 Joel Sherrill <joel@…>

  • nt.t: Significant update of Windows information. Hopefully this is now more useful.
  • Property mode set to 100644
File size: 5.1 KB
Line 
1@c
2@c  COPYRIGHT (c) 1988-2002.
3@c  On-Line Applications Research Corporation (OAR).
4@c  All rights reserved.
5@c
6@c  $Id$
7@c
8
9@appendix Using MS-Windows as a Development Host
10
11This chapter discusses the installation of the GNU tool chain
12on a computer running the Microsoft Windows operating system.
13
14This chapter was originally written by
15@uref{mailto:g_montel@@yahoo.com, Geoffroy Montel <g_montel@@yahoo.com>}
16with input from
17@uref{mailto:<D.J@@fiddes.surfaid.org>, David Fiddes <D.J@@fiddes.surfaid.org>}.
18It was based upon his successful but unnecessarily
19painful efforts with Cygwin beta versions.
20Cygwin and this chapter have been updated multiple times since
21those early days although their pioneering efforts
22and input is still greatly appreciated.
23
24@section Microsoft Windows Version Requirements
25
26RTEMS users report fewer problems when using Microsoft
27Windows NT, 2000, or XP.  Although, the open source tools
28that are used in RTEMS development do execute on Windows 95,
2998, or ME, they tend to be more stable when used with
30the modern Windows variants.
31
32@section Cygwin
33
34For RTEMS development, the recommended approach is to use
35Cygwin 1.0 or later. Cygwin is  available from
36@uref{http://sources.redhat.com/cygwin, http://sources.redhat.com/cygwin}
37Recent versions of Cygwin are vastly improved over the beta
38versions.  Most of the oddities, instabilities, and performance
39problems have been resolved.  The installation procedure
40is much simpler.  However, there are a handful of issues
41that remain to successfully use Cygwin as an RTEMS development
42environment.
43
44@itemize @bullet
45
46@item There is no @code{cc} program by default.  The GNU configure
47scripts used by RTEMS require this to be present to work properly.
48The solution is to link @code{gcc.exe} to @code{cc.exe} as follows:
49
50@example
51ln -s /bin/gcc.exe  /bin/cc.exe
52@end example
53
54@item Make sure @code{/bin/sh.exe} is GNU Bash.  Some Cygwin
55versions provide a light Bourne shell which is insufficient to build
56RTEMS.  To see which shell is installed as @code{/bin/sh.exe}, execute
57the command @code{/bin/sh --version}.  If it looks similar to
58the following, then it is GNU Bash and you are OK:
59
60@example
61GNU bash, version 2.04.5(12)-release (i686-pc-cygwin)
62Copyright 1999 Free Software Foundation, Inc.
63@end example
64
65If you get an error or it claims to be any other shell, you need
66to copy it to a fake name and copy
67@code{/bin/bash.exe} to @code{/bin/sh.exe}:
68
69@example
70cd /bin
71mv sh.exe old_sh.exe
72cp bash.exe sh.exe
73@end example
74
75The Bourne shell has to be present in @code{/bin} directory to run
76shell scripts properly.
77
78@item Make sure you unarchive and build in a binary mounted
79filesystem (e.g. mounted with the @code{-b} option).  Otherwise,
80many confusing errors will result. 
81
82@item A user has reported that they needed
83to set CYGWIN=ntsec for chmod to work correctly, but had to set
84CYGWIN=nontsec for compile to work properly (otherwise there were
85complaints about permissions on a temporary file).
86
87@item If you want to build the tools from source, you have the
88same options as UNIX users.
89
90@item You may have to uncompress archives during this
91process.  You must @b{NOT} use @code{WinZip} or
92@code{PKZip}.  Instead the un-archiving process uses
93the GNU @code{zip} and @code{tar} programs as shown below:
94
95@example
96tar -xzvf archive.tgz
97@end example
98
99@code{tar} is provided with Cygwin.
100
101@end itemize
102
103@section Text Editor
104
105You absolutely have to use a text editor which can
106save files with Unix format. So do @b{NOT} use Notepad
107or Wordpad!  There are a number of editors
108freely available that can be used. 
109
110@itemize @bullet
111@item @b{VIM} (@b{Vi IMproved}) is available from
112@uref{http://www.vim.org/,http://www.vim.org/}. 
113This editor has the very handy ability to easily
114read and write files in either DOS or UNIX style.
115
116@item @b{GNU Emacs} is available for many platforms
117including MS-Windows.  The official homepage
118is @uref{http://www.gnu.org/software/emacs/emacs.html,
119http://www.gnu.org/software/emacs/emacs.html}.
120The GNU Emacs on Windows NT and Windows 95/98 FAQ is at
121@uref{http://www.gnu.org/software/emacs/windows/ntemacs.html,
122http://www.gnu.org/software/emacs/windows/ntemacs.html}.
123
124@end itemize
125
126If you do accidentally end up with files
127having MS-DOS style line termination, then you
128may have to convert them to Unix format for some
129Cygwin programs to operate on them properly. The
130program @code{dos2unix} can be used to put them
131back into Unix format as shown below:
132
133@example
134$ dos2unix XYZ
135Dos2Unix: Cleaning file XYZ ...
136@end example
137
138@section System Requirements
139
140Although the finished cross-compiler is fairly easy on resources,
141building it can take a significant amount of processing power and
142disk space. 
143
144@itemize @bullet
145
146@item The faster the CPU, the better. The tools and Cygwin can be
147@b{very} CPU hungry.
148
149@item The more RAM, the better.  Reports are that when building GCC
150and GDB, peak memory usage can exceed 256 megabytes.
151
152@item The more disk space, the better. You need more if you are building
153the GNU tools and the amount of disk space for binaries is obviously
154directly dependent upon the number of CPUs you have cross toolsets
155installed for.
156
157@end itemize
158
Note: See TracBrowser for help on using the repository browser.