eCos Repository Database The Configuration Tool

265 Figure 11.9 eCos repository database, ecos.db, and Configuration Tool relationship. 1 package CYGPKG_HAL { 2 alias { eCos common HAL hal hal_common } 3 directory halcommon 4 script hal.cdl 5 description 6 The eCos HAL package provide a porting layer for 7 higher-level parts of the system such as the kernel 8 and the C library. Each installation should have 9 HAL packages for one or more architectures, and 10 for each architecture there may be one or more 11 supported platforms. It is necessary to select one 12 target architecture and one platform for that 13 architecture. There are also a number of configuration 14 options that are common to all HAL packages. 15 } 266 Chapter 11 • The eCos Toolset 1 target pc { 2 alias { i386 PC target } 3 packages { CYGPKG_HAL_I386 4 CYGPKG_HAL_I386_GENERIC 5 CYGPKG_HAL_I386_PC 6 CYGPKG_HAL_I386_PCMB 7 CYGPKG_IO_PCI 8 CYGPKG_IO_SERIAL_GENERIC_16X5X 9 CYGPKG_IO_SERIAL_I386_PC 10 CYGPKG_DEVS_ETH_INTEL_I82559 11 CYGPKG_DEVS_ETH_I386_PC_I82559 12 CYGPKG_DEVICES_WALLCLOCK_DALLAS_DS12887 13 CYGPKG_DEVICES_WALLCLOCK_I386_PC 14 } 15 description 16 The pc target provides the 17 packages needed to run eCos 18 binaries on a standard i386 19 PC motherboard. 20 } Code Listing 11.9 i386 PC target template description from eCos database file ecos.db. Figure 11.10 shows the template dialog box displaying the i386 PC target from Code Listing 11.9. The template dialog box is displayed when Build – Templates is selected from the menu bar. We can see in Figure 11.10 that the alias description, from line 2, is displayed in the Hardware drop-down list. Below the target alias is the description for the template, from lines 15 through 19. In this case, the default packages are included, which are described in the Packages in Selected Tem- plates description box. These packages are listed on lines 3 through 13 in Code Listing 11.9. The different options in the package drop-down list are described in the Using Templates section of this chapter. In certain circumstances, it might be necessary to edit the ecos.db file in order to have the Configuration Tool recognize a package you added. We look at editing the ecos.db file in Chapter 13, Porting eCos. A file named ChangeLog is also located in the same subdirectory as the ecos.db file. This log file tracks the changes made to the ecos.db file. Entries to this log file are similar to the entries in the other ChangeLog files described in the Package Directory Structure section in this chapter.

11.2.3 Graphical Representation of CDL Script Files

Now that we have looked at the relationship between the repository database file and the Config- uration Tool, let’s go a step further and examine the relationship between the CDL script files and their graphical representation in the Configuration Tool. The Configuration Tool 267 This section gives us a basic understanding for how the Configuration Tool interprets the commands in the CDL script files and uses this information in its different display windows. All CDL commands and properties are not described in this section; however, you should be able to see the basic relationship between the CDL scripts and the Configuration Tool allowing you to investigate other script details on your own. As we know from the Packages section in this chapter, every package must have at least one CDL script file to define the package. The Configuration Tool uses the CDL script files to display the necessary configuration and description information so that you can set up the package accord- ing to your needs. We use the same CDL script file from the i386 PC HAL package described in Code Listing 11.3, which you can look at to get an overview of where each portion of the CDL script commands are located. The line numbers from Code Listing 11.3 are used in the code frag- ments located in the figures. Figures 11.11, 11.12, and 11.13 show three different portions of the CDL script file and how the Configuration Tool displays this information. Each figure shows a por- tion of the Configuration window, the Properties window, and the Short Description window. First, in Figure 11.11, is the CDL package command. Line 1 gives the macro name of the package CYGPKG_HAL_I386_PC, which can also be seen next to the Macro property in the Properties window. Line 2 uses the display command to give a description of the package, which we can see is used in the Configuration window. The i386 PC Target is part of the i386 Architecture. In order to locate the i386 PC Target package under the i386 Architecture, the parent command shown on line 3 is used. Figure 11.10 Configuration Tool template selection dialog box.