Chapter 14. Configure and build 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 from the Start menu, as was shown earlier in Figure 11-1.

The Configuration Tool (see Figure 14-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.

Figure 14-1. Configuration Tool — initial screen

In this example you will make a small modification to the default configuration (select ROM startup instead of RAM startup) 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 14-2, and an example for the TX39 is shown in Figure 14-3.

Figure 14-2. Configuration Tool — selecting MN10300 ROM startup

Figure 14-3. Configuration Tool — selecting TX39 ROM startup

Select the Build menu and the Library menu item, as shown in Figure 14-4.

Figure 14-4. Configuration Tool — selecting the build library menu item

The Configuration Tool then prompts you with a dialog box allowing 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.

Figure 14-5. Configuration Tool — build dialog

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 14-6). You can select a location from the drop down list, browse to the directory using the Browse button, or type the location of the build tools directly.

Figure 14-6. Configuration Tool — build tools dialog

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 14-7). 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 the location of the user tools directly.

Figure 14-7. Configuration Tool — user tools dialog

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 going to the Build menu and selecting the Tests item. 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.

Figure 14-8. Configuration Tool — selecting the build tests menu item

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