Chapter 12. Configuring and building eCos from source

Table of Contents
Using the Configuration Tool on Windows
Using pkgconf.tcl on UNIX

Using the Configuration Tool on Windows

To run the Configuration Tool and build a sample configuration of the kernel library and its tests, invoke eCos by selecting Start -> Programs -> Cygnus eCos -> Configuration Tool.

The Configuration Tool (see Figure 12-1) has five main elements: the configuration pane (top left), the documentation pane (top right), the properties table (middle-right), the short description pane (middle-right, below the properties table), and the output pane (bottom). These are described in detail in the eCos User’s Guide.

In this example you will make a small modification to the default configuration (selecting ROM start-up instead of RAM start-up) making it easier to run with the simulator (see Chapter 7).

From the configuration pane, select the eCos HAL package, then select your architecture component, followed by your board, and for the Startup type option select rom. An example of this for the MN10300 is shown in Figure 12-2.

Select Build -> Library, as shown in Figure 12-3.

The Save As dialog box will appear, asking you to specify a directory in which to place your build tree. You can use the default, but it is a good idea to make a subdirectory, called ecos-work for example.

The first time you build an eCos library for a specific architecture, the Configuration Tool will prompt you for the location of the appropriate build tools (including make and gcc) using a Build Tools dialog box (as shown in Figure 12-5). You can select a location from the drop down list, browse to the directory using the Browse button, or type in the location of the build tools manually.

The Configuration Tool will also prompt you for the location of the user tools (including cat and ls) using a User Tools dialog box (as shown in Figure 12-6). As with the Build Tools dialog, you can select a location from the drop down list, browse to the directory using the Browse button, or type in the location of the user tools manually.

When the tool locations have been entered, the Configuration Tool will configure the sources, prepare a build tree, and build the libtarget.a library, which contains the eCos kernel and other packages.

The output from the configuration process and the building of libtarget.a will be shown in the output pane.

Once the build process has finished you will have a kernel with other packages in libtarget.a. You should now build the eCos tests for your particular configuration.

You can do this by selecting Build -> Tests. Notice that you could have selected Tests instead of Library in the earlier step and it would have built both the library and the tests, but this would increase the build time substantially, and if you do not need to build the tests it is unnecessary.

Chapter 13 will guide you through running one of the test cases you just built using GDB and the simulator for your architecture.