annotate README.host @ 441:41489edbdf76

* src/vectors.S: Added GRUB startup option to tests for IDT initialization. Added call to breakpoint() before cyg_start(), controlled by CYGDBG_HAL_DEBUG_GDB_INITIAL_BREAK.
author nickg
date Sun, 01 Dec 2002 15:50:14 +0000
parents 3f4258400ba5
children def85e4d96d2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
290
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
1 eCos Host-side Software
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
2 =======================
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
3
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
4 This README file only describes the eCos host-side software. For
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
5 details of the eCos target-side software or the required toolchains,
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
6 please see other documentation. A good starting point is
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
7 http://sources.redhat.com/ecos
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
8
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
9 There are two categories of host-side software. The host subdirectory
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
10 contains generic software, primarily related to the eCos configuration
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
11 technology. All eCos users will need to use some of this technology to
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
12 configure and build eCos, either using pre-built binaries or by
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
13 building the host-side software from source. The generic software
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
14 should be portable to a wide range of host platforms.
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
15
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
16 There is also package-specific host-side software. Much of this is I/O
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
17 related. For example the generic USB-slave package contains some
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
18 programs related to testing; a test application is run on a target
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
19 with suitable USB slave-side hardware, and needs to interact with
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
20 another program running on the USB host; the latter is
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
21 package-specific host-side software and can be found in the
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
22 subdirectory packages/io/usb/slave. Code like this may have
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
23 significant platform dependencies and may only work on a single
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
24 platform or on a small number of platforms. There may also be
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
25 special requirements, for example it may be necessary to install some
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
26 programs suid root so that they have appropriate access to the
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
27 hardware.
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
28
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
29
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
30 The host subdirectory includes the following:
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
31
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
32 infra/
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
33 This is an implementation of the eCos infrastructure that can be
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
34 used on the host-side, and provides assertion, tracing and
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
35 testcase support.
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
36
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
37 NOTE: the eCos infrastructure facilities are not especially
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
38 well-suited to host-side development, in particular they are not
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
39 C++-oriented. There are plans to remove the current infrastructure
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
40 completely and replace it with something more suitable. People
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
41 planning new projects should be aware of this, and may wish to
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
42 avoid using the current infrastructure.
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
43
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
44 libcdl/
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
45 The CDL library lies at the heart of the eCos configuration
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
46 technology.
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
47
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
48 tools/configtool/
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
49 The sources to the various configuration tools can be found here.
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
50
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
51 tools/configtool/common/common/
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
52 Contains sources related to makefile generation, shared by the
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
53 command line and graphical tools.
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
54
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
55 tools/configtool/standalone/common/
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
56 Contains the command line ecosconfig tool.
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
57
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
58 tools/configtool/standalone/wxwin/
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
59 Contains sources for the wxWindows-based, Linux and Windows graphical
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
60 configuration tool. The Windows version can currently only be
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
61 built with Visual C++, not with cygwin g++.
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
62
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
63 tools/configtool/common/win32/
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
64 tools/configtool/standalone/win32/
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
65 Contains sources for the older, MFC-based, Windows-only graphical
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
66 configuration tool. Again this can currently only be built with
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
67 Visual C++.
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
68
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
69 The two graphical configuration tools have their own build procedures,
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
70 described in tools/configtool/standalone/wxwin/ReadMe and
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
71 tools/configtool/standalone/win32/ReadMe respectively.
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
72
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
73 Package-specific host-side code lives in the host subdirectory of the
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
74 appropriate package, for example packages/io/usb/slave/<version>/host.
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
75 Most packages only provide target-side code and hence will not have a
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
76 host subdirectory. Users can install various packages from a variety
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
77 of sources, and where a package does have host-side software the
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
78 package documentation should be consulted for further information.
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
79
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
80
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
81 Installing on Linux and Other Unix Systems
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
82 ------------------------------------------
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
83
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
84 Both generic host-side software (infra, libcdl and ecosconfig) and
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
85 package-specific software can be built with the conventional
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
86 "configure/make/make install" sequence. However the code does not
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
87 conform fully to GNU coding standards so some operations such as "make
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
88 dist" are not supported. There is limited support for DejaGnu-based
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
89 testing.
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
90
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
91 Much of the host-side software has a dependency on Tcl. This is not
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
92 supplied with the sources since many users will already have a
345
3f4258400ba5 Fix host-side configury problems which can occur if you are not using
bartv
parents: 290
diff changeset
93 suitable installation, for example it is shipped as standard with all
3f4258400ba5 Fix host-side configury problems which can occur if you are not using
bartv
parents: 290
diff changeset
94 major Linux distributions. The generic host-side software should work
3f4258400ba5 Fix host-side configury problems which can occur if you are not using
bartv
parents: 290
diff changeset
95 with any release of Tcl from 8.0 onwards. The package-specific
3f4258400ba5 Fix host-side configury problems which can occur if you are not using
bartv
parents: 290
diff changeset
96 software requires a more recent version, 8.3 or later. If no suitable
3f4258400ba5 Fix host-side configury problems which can occur if you are not using
bartv
parents: 290
diff changeset
97 Tcl installation is available then the configure step will still
3f4258400ba5 Fix host-side configury problems which can occur if you are not using
bartv
parents: 290
diff changeset
98 succeed but some of the package-specific software will not be built.
290
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
99
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
100 There are two main approaches to building the host-side software:
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
101
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
102 1) build the generic and the package-specific code in one build tree.
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
103 This uses the top-level configure script. The script automatically
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
104 invokes the configure script in the main host subdirectory. In
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
105 addition it searches the packages hierarchy for host subdirectories
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
106 containing their own configure scripts and will invoke those.
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
107
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
108 Note: the search for host subdirectories happens during configure
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
109 time, not during the make. If new packages with host-side code are
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
110 added to the repository then it will be necessary to re-run the
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
111 toplevel configure script.
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
112
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
113 2) build the generic code in one build tree, using the configure
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
114 script in the toplevel's host subdirectory. Then build some or all
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
115 of the package-specific code in separate build trees, using the
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
116 configure scripts in each package's host subdirectory.
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
117
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
118 The first approach is generally simpler. However some of the
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
119 package-specific code requires special installation, for example a
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
120 program may have to be installed suid root so that it has the right
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
121 privileges to access hardware, and hence the "make install" step has
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
122 to be run by the superuser. Also some of the package-specific code is
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
123 rather specialized and may be of no interest to many users. For
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
124 example, the USB testing code is only useful when developing
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
125 USB-based applications. Hence some users may prefer the second
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
126 approach, building just the generic code and a subset of the
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
127 package-specific code.
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
128
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
129 It is necessary to use a separate build tree rather than build
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
130 directly in the source tree. This is enforced by the configure scripts.
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
131
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
132 $ mkdir build
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
133 $ cd build
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
134
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
135 The next step is to run the desired configure script. To build all
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
136 the host-side software this means the toplevel configure script:
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
137
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
138 $ <path>/configure <args>
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
139
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
140 Alternatively to build just the generic host-side software, use the
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
141 configure script in the host subdirectory.
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
142
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
143 $ mkdir host
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
144 $ cd host
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
145 $ <path>/host/configure <args>
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
146
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
147 Or, to build just one package's host-side code:
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
148
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
149 $ mkdir -p packages/io/usb/slave/current/host
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
150 $ cd packages/io/usb/slave/current/host
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
151 $ <path>/packages/io/usb/slave/current/host/configure <args>
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
152
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
153 (It is not actually necessary to use the same directory structure in
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
154 the build tree as in the source tree, but doing so can avoid
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
155 confusion).
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
156
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
157 A list of all the command-line options can be obtained by running
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
158 "configure --help". The most important ones are as follows:
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
159
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
160 1) --prefix. This can be used to specify the location of the install
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
161 tree, defaulting to /usr/local, so the ecosconfig program ends up
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
162 in /usr/local/bin/ecosconfig and the CDL library ends up in
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
163 /usr/local/lib/libcdl.a. If an alternative location is preferred
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
164 this can be specified with --prefix, for example:
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
165
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
166 $ <path>/configure --prefix=/usr/local/ecos <args>
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
167
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
168 2) --enable-debug. By default all assertions and tracing are disabled.
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
169 When debugging any of the generic host-side software these should
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
170 be enabled. Some package-specific code may not have any extra
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
171 debug support, in which case --enable-debug would be ignored.
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
172
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
173 $ <path>/configure --enable-debug
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
174
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
175 It is also possible to control most of the assertion and tracing
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
176 macros at a finer grain. This is intended mainly for use by the
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
177 developers.
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
178
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
179 --disable-asserts disable all assertions
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
180 --disable-preconditions disable a subset of the assertions
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
181 --disable-postconditions disable a subset of the assertions
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
182 --disable-invariants disable a subset of the assertions
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
183 --disable-loopinvariants disable a subset of the assertions
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
184 --disable-tracing disable tracing
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
185 --disable-fntracing disable function entry/exit tracing
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
186
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
187 3) --with-tcl=<path>
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
188 --with-tcl-header=<path>
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
189 --with-tcl-lib=<path>
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
190 --with-tcl-version=<number>
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
191
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
192 The host-side tools have a dependency on Tcl, which is not supplied
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
193 with the sources because many people will already have a suitable
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
194 installation. Specifically it is necessary to have the header file
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
195 tcl.h and appropriate libraries such that -ltcl will work - this
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
196 can involve either static or shared libraries.
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
197
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
198 By default the configure script will assume that there is a
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
199 suitable Tcl installation in the install location, so if there is
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
200 no --prefix argument then it will look for /usr/local/include/tcl.h
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
201 and it will add -L/usr/local/lib to the library search path. If
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
202 Tcl is installed elsewhere then this can be specified with a
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
203 --with-tcl option. For example, if the default installation in
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
204 /usr should be used then the following configure option is
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
205 appropriate:
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
206
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
207 $ <path>/configure --with-tcl=/usr <args>
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
208
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
209 If the Tcl libraries and Tcl headers are installed in different
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
210 locations, such as when a separate --prefix and --exec-prefix are
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
211 used, the --with-tcl-header and --with-tcl-lib options can be used
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
212 to specify both location. The configure script will expect to find
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
213 <tcl-header-dir>/include/tcl.h and <tcl-lib-dir>/lib/tclConfig.sh.
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
214 The --with-tcl option has precedence and if used will override the
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
215 --with-tcl-header and --with-tcl-lib options.
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
216
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
217 It is possible to have multiple versions of Tcl installed, for
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
218 example libtcl8.0.a, libtcl8.1.a, and so on. Typically linking with
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
219 -ltcl will result in the latest version being used. It is possible
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
220 to specify a different version using --with-tcl-version, e.g.:
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
221
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
222 $ <path>configure --with-tcl=/usr/local/scriptics --with-tcl-version=8.1 <args>
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
223
345
3f4258400ba5 Fix host-side configury problems which can occur if you are not using
bartv
parents: 290
diff changeset
224 It may be necessary to specify --with-tcl-version if there are
3f4258400ba5 Fix host-side configury problems which can occur if you are not using
bartv
parents: 290
diff changeset
225 multiple installs in different locations. For example the
3f4258400ba5 Fix host-side configury problems which can occur if you are not using
bartv
parents: 290
diff changeset
226 system may have a default install in /usr and a more up to date
3f4258400ba5 Fix host-side configury problems which can occur if you are not using
bartv
parents: 290
diff changeset
227 install in /usr/local/tcl8.4. To use the latter it will usually
3f4258400ba5 Fix host-side configury problems which can occur if you are not using
bartv
parents: 290
diff changeset
228 be necessary to specify both --with-tcl=/usr/local/tcl8.4 and
3f4258400ba5 Fix host-side configury problems which can occur if you are not using
bartv
parents: 290
diff changeset
229 --with-tcl-version=8.4.
3f4258400ba5 Fix host-side configury problems which can occur if you are not using
bartv
parents: 290
diff changeset
230
290
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
231 Following the configure step the build tree should be set up
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
232 correctly. All that remains is the actual build and install:
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
233
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
234 $ make
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
235 $ make install
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
236
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
237 This should result in an ecosconfig executable, plus appropriate
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
238 libraries and header files. If the install prefix is a system
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
239 location, for example /usr/local/, then "make install" will normally
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
240 require root privileges. Also some of the package-specific software
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
241 has special installation requirements, for example programs that need
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
242 to be installed suid root, and this will also need root privileges.
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
243
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
244
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
245 Installing under Cygwin
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
246 -----------------------
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
247
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
248 Installing under cygwin requires essentially the same steps as
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
249 under Linux. It is more likely that a suitable --prefix option will
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
250 have to be used, and that the location of the Tcl installation needs
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
251 to be specified with --with-tcl. However appropriate use of cygwin
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
252 mount points may avoid some of these problems. If the full path to
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
253 the configure script contains spaces, then the short form of the path
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
254 should be used when invoking configure.
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
255
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
256 One issue to be aware of is the naming convention for the Tcl library.
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
257 On a Unix system this will typically be called libtcl8.3.a (adjusted
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
258 according to the version number), with a symbolic link from libtcl.a
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
259 to the most recent version. Under cygwin the equivalent library is
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
260 called libtcl80.a, and symbolic links are not used. For a standard
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
261 cygwin installation the configure script knows how to pick up the
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
262 appropriate library, but if a more recent version of Tcl has been
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
263 installed then due care has to be taken with the --with-tcl-version
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
264 option.
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
265
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
266
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
267 Installing with Visual C++
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
268 --------------------------
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
269
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
270 Under Windows it is possible to build the generic host-side software
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
271 (infra, libcdl and ecosconfig) with Visual C++ but this is deprecated.
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
272 Building with g++ under cygwin is preferred.
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
273
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
274 It is still necessary to run the configure script and a suitable make
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
275 utility. That requires a shell and a Unix-like environment, as
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
276 provided by cygwin. The Visual C++ compiler cl.exe needs to be on the
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
277 shell's search path, and some environment variables such as INCLUDE
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
278 and LIB may need to be set to point at the Visual C++ installation -
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
279 the details may vary depending on the version of the compiler. Then
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
280 the configure command should be run like this:
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
281
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
282 $ CC=cl CXX=cl <path>/host/configure <args>
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
283
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
284 Note that the path should be a cygwin path: cygwin mount points are
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
285 accepted and forward slashes should be used. The various configure
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
286 scripts now detect that Visual C++ should be used, and adapt
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
287 accordingly.
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
288
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
289 Depending on what cygwin mount points are set up, /usr/local may or
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
290 may not be an appropriate install location for VC++ applications.
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
291 If not, the install location should be specified with --prefix:
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
292
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
293 $ CC=cl CXX=cl <path>/configure --prefix=<install-path> <args>
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
294
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
295 It is also necessary to use the right version of Tcl. For a VC++ build
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
296 the cygwin release of Tcl should not be used. Instead a suitable
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
297 prebuilt Tcl package can be obtained from http://www.scriptics.com/.
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
298 It is necessary to tell the configure script where this has been
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
299 installed, for example:
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
300
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
301 $ CC=cl CXX=cl <path>/configure --prefix=<install-path> \
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
302 --with-tcl=/cygdrive/d/local/scriptics/Tcl/tcl8.1 <args>
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
303
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
304 The library name will be of the form tcl81.lib, and there will not be
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
305 a symbolic link from tcl.lib to the appropriate version. It will be
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
306 necessary to specify the Tcl version explicitly since the default
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
307 version is currently 8.0.
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
308
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
309 $ CC=cl CXX=cl <path>/configure --prefix=<install-path> \
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
310 --with-tcl=/d/local/scriptics/Tcl/tcl8.1 --with-tcl-version=81 <args>
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
311
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
312 Following a successful configure, the tools can be built and installed
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
313 in the normal fashion:
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
314
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
315 $ make
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
316 $ make install
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
317
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
318
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
319 More Information
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
320 ================
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
321
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
322 Please see the eCos web site, http://sources.redhat.com/ecos/, for
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
323 further details. This includes the FAQ, a form for reporting problems,
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
324 and details of the various mailing lists
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
325 (http://sources.redhat.com/ecos/intouch.html) At the time of writing
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
326 there are no separate mailing lists for the eCos host-side sources,
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
327 the main mailing list ecos-discuss@sources.redhat.com should be used
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
328 instead.
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
329
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
330 //####COPYRIGHTBEGIN####
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
331 //
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
332 //----------------------------------------------------------------------------
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
333 // Copyright (C) 2002 Bart Veer
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
334 // Copyright (C) 2000, 2001 Red Hat, Inc.
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
335 //
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
336 // This file is part of the eCos host tools.
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
337 //
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
338 // This program is free software; you can redistribute it and/or modify it
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
339 // under the terms of the GNU General Public License as published by the Free
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
340 // Software Foundation; either version 2 of the License, or (at your option)
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
341 // any later version.
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
342 //
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
343 // This program is distributed in the hope that it will be useful, but WITHOUT
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
344 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
345 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
346 // more details.
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
347 //
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
348 // You should have received a copy of the GNU General Public License along with
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
349 // this program; if not, write to the Free Software Foundation, Inc.,
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
350 // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
351 //
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
352 // ----------------------------------------------------------------------------
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
353 //
3ecf91f6663a Update instructions for building the host-side software
bartv
parents:
diff changeset
354 //####COPYRIGHTEND####