10.2. Configuring the Windows Host

In order to develop eCos applications using the Windows operating system, tools must be installed to build the eCos cross compilers and other development tools. The tools that run under the Windows operating system are called Cygwin. Cygwin, an acronym for GNU Cygnus Windows, is a UNIX environment for Windows consisting of a Dynamic Link Library (DLL) that acts as a UNIX emulation layer and a collection of UNIX tools ported to Windows. The Cygwin site is located at:

http://cygwin.com

The Cygwin tools are capable of running on Windows 95/98/ME/NT/2000/XP operating systems, but not on Windows CE. The basic steps involved in setting up the eCos development system on a Windows NT host are:

1.
Install Cygwin, the GNU native development tools for Windows— The native host tools allow us to build the eCos toolset. This information is covered in this chapter.

2.
Build the platform-specific cross-development tools— The Cygwin tools allow us to build the development tools we need to construct the eCos RTOS and applications for a specific processor. We cover this process for the x86 specific tools in this chapter. The details for building the tools for other processors are also described in this chapter.

3.
Install the eCos development kit— The eCos development kit contains a release of the eCos source code repository and configuration tools for building the eCos kernel. The development kit installation is covered in this chapter.

4.
Set up and configure the eCos Configuration Tool— The Configuration Tool is used, among other things, to assist in creating the application-specific eCos library files. This final procedure is detailed in Chapter 11.

NOTE

It is a good idea when using the Windows operating system for your host development computer to use the NTFS or FAT32 file systems on the drive on which the tools are installed. The tools contain numerous small files, which can waste more disk space if the hard drive is not formatted with NTFS or FAT32.


Table 10.1 lists the disk space used by each of the different host development modules for the Windows platform.

We are going to be building the x86 platform cross-development tools. This allows us to develop and debug applications using a second PC as our target hardware. We cover examples using the target PC hardware in Chapter 12.

And away we go...

Table 10.1. Windows Host Disk Space Requirements
ModuleDisk Space Required
Cygwin374.2 Mbytes[a]
x86 Cross-Development Tools74.1 Mbytes
eCos Development Kit81.8 Mbytes
TOTAL530.1 Mbytes

[a] Includes source code. Without source code, the Cygwin tools require 202.2 Mbytes of disk space.

10.2.1. Installing the Cygwin Native Tools

The Cygwin files needed to install the tools are included on the CD-ROM under the cygwin directory. This directory includes the setup program, setup.exe, and the subdirectories contrib and latest, which contain the Cygwin executable tools and the source code files as well. The tool files have names such as cygwin-1.3.3-2.tar.bz2, while the source code files contain src in the filename; for example, cygwin-1.3.3-2-src.tar.bz2. All of the files necessary for installing the Cygwin tools can also be found online at:

http://cygwin.com/download.html

If traffic is busy on the main Cygwin site, it might be necessary to use one of the mirror sites. A list of Cygwin mirror sites can be found online at:

http://cygwin.com/mirrors.html

The Cygwin readme file, readme.txt, is also contained on the CD-ROM in the cygwin directory. It is a good idea to read this file prior to beginning the Cygwin tools installation. The readme file can also be found online at any of the Cygwin distribution sites. For any additional information or specific problems installing or using the Cygwin tools, you can look at the Cygwin discussion mailing list located online at:

http://cygwin.com/ml/cygwin

Posts to this discussion list should be sent to [email protected]. Additional discussion Cygwin discussion mailing lists can be found online at:

http://cygwin.com/lists.html

Manuals for the different Cygwin development tools can be found online at:

www.gnu.org/manual

NOTE

Before proceeding with the installation it is important to ensure that all Cygwin applications, if any, running on your system are shut down. If you have never installed any Cygwin tools on your system, you do not have to worry about this.

It is also a good idea to disable any anti-virus software you have running. Occasionally conflicts occur, such as system hangs, between the Cygwin files and certain anti-virus software.

Having a space in your Windows logon name might also cause a problem using the Cygwin tools. To avoid any problems, it is best to install using a Windows logon name without spaces.


If you are upgrading a previous version of the Cygwin tools, you should refer to the readme.txt file in the cygwin directory on the CD-ROM to guarantee that the proper steps are performed prior to installation.

STEP 1

The first step for installing Cygwin is to create a directory for the tools on the hard drive. It is preferable to create this directory off one of the root drives in order to keep path names short. We are going to use the directory name cygwin off the root D: drive.

STEP 2

Next, we copy the contents of the cygwin directory from the CD-ROM to the directory we just created. This takes up approximately 178.4 Mbytes of disk drive space, which includes the source code for the tools.

NOTE

The Cygwin setup program can be pointed to the cygwin directory on the CD-ROM (E:cygwin, where E: is your CD-ROM drive) in STEP 5 for installation to eliminate copying the files on the hard drive. However, having the files on the hard drive can be helpful when you decide to upgrade the Cygwin tools.


STEP 3

Run setup.exe from the directory we just created on the hard disk. Next, we go through the procedure for configuring the setup program to install the proper Cygwin packages. Illustrations of the dialog boxes and selection of the options for this installation process are provided.

To get started, we run setup.exe from the D:cygwin directory.

The first dialog box after running the Cygwin setup is shown in Figure 10.1. This dialog shows us the version information for the setup program. We are using setup version 2.78.2.15. It is important to note the version in case you need to get help from a discussion list or you need to upgrade to a newer version in the future.

Figure 10.1. Cygwin setup version dialog box.


Click the Next button to proceed with installation. The latest version of the setup.exe program can be found online at:

http://sources.redhat.com/cygwin/setup.exe

Click the Next button to proceed with installation.

STEP 4

The next step in the Cygwin installation is to select the location we want to install from. The options are shown in the dialog box in Figure 10.2. We select Install from Local Directory and click the Next button.

Figure 10.2. Cygwin setup file location dialog box.


We can use the Install from Internet option, as shown in the Upgrading the Cygwin Tools section of this chapter, if we need to upgrade the Cygwin tools in order to download and install the latest versions of the tools available online. The Download from Internet option allows us to download the latest version of the tools, both executable and source code, without performing the install.

STEP 5

Now we want to select the location of the Cygwin packages we want to install, Local Package Directory. The dialog box for this option is shown in Figure 10.3. We set this Local Package Directory option to D:cygwin by either typing it in directly or clicking the Browse button to find the proper directory. Then, click Next.

Figure 10.3. Cygwin local package directory selection dialog box.


NOTE

If you did not copy the Cygwin tools to the hard drive, enter E:cygwin to install from the CD-ROM drive, where E: is your CD-ROM drive letter.


As we can see in Figure 10.3, the setup allows us to go back to a previous dialog box by using the Back button.

STEP 6

Next, we set up the location where we want the tools installed, Select Install Root Directory. This dialog box is shown in Figure 10.4. We set this option to D:cygwin by either typing it in directly or clicking the Browse button to find the proper directory.

Figure 10.4. Cygwin install root directory selection dialog box.


We also need to select the Default Text File Type and Install For options. The Default Text File Type allows us to choose DOS, in which case text files will end with , or Unix, meaning text files will end with . Select DOS for this option.

The Install For option allows us to select All, which allows anyone that logs on to the host PC to have access to the Cygwin mount table, or Just Me, if you are the only one needing access. Select Just Me for this option. We can now click the Next button.

STEP 7

The next step is to select the packages we want to install. The packages contained on the CD-ROM might not be the latest versions available because changes to the Cygwin tools are continuously occurring. However, the CD-ROM files have been installed and configured into a working eCos development system.

The CD-ROM contains the Cygwin DLL version 1.3.3-2. We are using version 1.3.3-2 because it has been verified to work with the eCos development tools. If you look back at some of the posts on the eCos discussion list, you can see the issues that have come up using new versions of the Cygwin DLL. To avoid this, it is best to get a known working development environment up and running before upgrading to any new versions. Then, if problems occur, you can always restore your previous working environment.

The dialog box for selecting specific Cygwin packages is shown in Figure 10.5. The radio buttons at the top—Prev, Curr, and Exp—allow us to select the previous, current, or experimental versions, respectively, for each Cygwin package. We want to ensure that Curr is selected, which is the default option. Selection of individual versions for a specific package is described later.

Figure 10.5. Cygwin package selection dialog box.


The Full/Part button allows us to display the full list of packages or only a partial list. This is typically used for package upgrades.

The columns in the dialog box display information about the package. The first column, Current, shows the current release for a particular package. This column is used for package upgrades. Since this is a new install, all package version details are contained in the column New. The New column shows the version that is going to be installed. The Src? column allows us to select whether we want source code installed for the particular package. The last column, Package, shows the name of the package.

As described previously, the Prev, Curr, and Exp radio buttons allow us to select particular versions for all packages. In order to select specific versions of a single package, we must click on the icon in the New column. This toggles the action or version for a specific package to one of the following:

  • Skip— skip installation of the package.

  • Source— install source code only for the package.

  • Uninstall— remove the package.

  • Keep— leaves the current version of the package.

  • Version— install the selected version for the package.

For certain actions, the Src? column is not relevant, in which case n/a is displayed in this column. The cygwin package is highlighted in gray in Figure 10.5 to help shown the proper version of the package we want to use for our installation.

We are now ready to begin the installation, which happens by clicking the Next button. As installation progresses, a dialog box similar to the one shown in Figure 10.6 is displayed. This shows the current package being installed, the location for installation, and progress indicators for the package and total installation procedure.

Figure 10.6. Cygwin package installation progress dialog box.


STEP 8

The final step in the Cygwin tools installation is to select whether desktop and Start menu shortcuts should be added to run the Cygwin environment shell program. The dialog box for these options is shown in Figure 10.7. Clicking Next creates the shortcuts according to the options selected.

Figure 10.7. Cygwin shortcut setup dialog box.


After successful installation of the Cygwin tools, the dialog box shown in Figure 10.8 is displayed. Clicking OK completes the Cygwin tools installation.

Figure 10.8. Cygwin tools installation complete dialog box.


To ensure proper installation of the Cygwin tools, we can run the bash program by double-clicking on the desktop shortcut created in . This brings up a UNIX bash shell environment similar to the one shown in Figure 10.9. To close the bash shell, type exit (or the shortcut Ctrl+D) at the bash shell prompt ($).

Figure 10.9. Cygwin bash shell program.


STEP 9

We now need to add the cygwinin directory to the Windows environment path. The path is altered by right-clicking on the My Computer icon on the desktop. This brings up a drop-down list of options. Select Properties from the drop-down list.

The System Properties dialog box is displayed. Select the Environment tab. Under the User Variables, select path. In the Value edit box, to the front of the path, add:

D:cygwinin;

Then, click the Set button. Finally, click the OK button.

10.2.1.1. Cygwin Tools Directory Structure

Now that we have successfully completed the installation of the Cygwin tools, we can take a look at the directory structure created, which is shown in Figure 10.10. If disk space is a concern the contrib and latest subdirectories can be deleted, since these are on the CD-ROM anyway.

Figure 10.10. Cygwin installation directory structure.


We can now take a quick look at some of the subdirectories in the Cygwin tools directory structure. The root cygwin directory includes the file cygwin.bat, which is the batch file that is run when clicking on the Cygwin shortcut created on the desktop or clicking on Cygwin Bash Shell under Start> Programs –> Cygnus Solutions (provided these were created in Step 8 of the Cygwin tools installation). The bash program is the UNIX environment shell that we use to create the eCos development tools, which is described later in this chapter.

One note: After running the bash program for the first time, the home subdirectory is created under the cygwin root. The homexxx, where xxx is your username, subdirectory includes a file that contains the history of commands run in the bash shell environment.

The bin subdirectory contains all of the executable files for the Cygwin tools. Included in this subdirectory is the Cygwin DLL, cygwin1.dll, which we are using version 1.3.3. The etc subdirectory contains standard UNIX configuration files. The lib subdirectory contains all of the library files used when developing under Cygwin. The tmp subdirectory is the temporary scratch directory for the Cygwin tools. Finally, the usr subdirectory contains the miscellaneous files stored by the different Cygwin packages.

The root directory also contains two log files, setup.log and setup.log.full. An example of some of the information contained in the setup.log file is shown in Code Listing 10.1. Line 1 gives the starting date and time of the installation and the version (2.78.2.15) of the setup.exe file used. Lines 2 through 5 contain the option information, such as the location of the installation files, we selected during the Cygwin tools installation. Information about the installation for each package is shown on lines 6 through 21. These lines display the subdirectory, either contrib or latest, of the package for installation. Lines 22, 23, and 24 simply show the place that the setup.log file information was cut out. Lines 25 and 26 are the last two lines of the file that show the completion message and the end date and time of the install. We can see comparing the start and end message that the complete Cygwin tools install took approximately 16 minutes.

The file setup.log.full is similar to setup.log; however, additional detailed information about the setup for each package is contained in the full log file. Any time the setup.exe program is run, the operations performed are logged into these two log files. This is helpful to keep track of package upgrades for the different Cygwin tools.

Code Listing 10.1. Cygwin installation example log file contents.
 1  2001/09/27 12:12:12 Starting cygwin install, version 2.78.2.15
 2  Current Directory: D:cygwin
 3  source: from cwd
 4  Selected local directory: D:cygwin
 5  root: D:cygwin text user
 6  Installing test version...latest/ash/ash-20011018-1.tar.bz2
 7  Installing...latest/autoconf/autoconf-2.52-1.tar.bz2
 8  Installing...latest/automake/automake-1.5-1.tar.bz2
 9  Installing...latest/bash/bash-2.05-8.tar.bz2
10  Installing test version...latest/binutils/binutils-20011002-1.tar.bz2
11  Installing...latest/bison/bison-1.28-1.tar.gz
12  Installing...latest/byacc/byacc.tar.gz
13  Installing...latest/bzip2/bzip2-1.0.1-6.tar.gz
14  Installing...latest/clear/clear-1.0.tar.gz
15  Installing...latest/cpio/cpio-2.4.2.tar.gz
16  Installing...contrib/cron/cron-3.0.1-5.tar.bz2
17  Installing...latest/crypt/crypt-1.0-1.tar.gz
18  Installing...latest/ctags/ctags-5.0.1-1.tar.gz
19  Installing...contrib/cvs/cvs-1.11.0-1.tar.gz
20  Installing...latest/cygrunsrv/cygrunsrv-0.94-2.tar.bz2
21  Installing previous version...latest/cygwin/cygwin-1.3.3-2.tar.bz2
22  .
23  .
24  .
25  mbox note: Installation Complete
26  2001/09/27 12:18:34 Ending cygwin install

10.2.1.2. Upgrading the Cygwin Tools

The Cygwin tools upgrade procedure is detailed in Appendix C, in case you need bug fixes or enhancements offered in the latest versions of the Cygwin tools.

NOTE

Do not go through the Cygwin tools upgrade procedure on your development platform at this point. If you do, your platform will have different Cygwin tools than those tested in this book. This section is for future reference when you need, or want, to upgrade the Cygwin tools.


10.2.2. Installing the Platform-Specific Cross-Development Tools

Next, we install the tools that allow us to build eCos and our applications for our specific processor; in our case, the Intel x86. The cross-development tools are used to build the eCos library for our specific platform; in our case, the Intel x86. We also use these same tools when building applications, as we see in Chapter 12.

Rather than go through the procedure of configuring and building the i386 GNU cross-development tools, pre-built versions are supplied on the CD-ROM. This eliminates the possibility of generating incorrect GNU tools, which is very easy considering the command strings that need to be entered. These tools are used in the examples included with this book. The procedure used to configure and build the GNU cross-development tools is contained in Appendix D, Building the GNU Cross-Development Tools.

NOTE

Pre-built binary versions of the PowerPC GNU cross-development tools are also included on the CD-ROM in the file ppcgnutools.tar.bz2 under the gnuppctools directory. These tools are used in Chapter 13.


The platform-specific cross-development tools can be broken down into three different groups:

  • GNU Binary Utilities (commonly called binutils)

  • GNU C/C++ Compiler

  • GNU Insight Debugger with Insight Interface

The file needed to install the GNU cross-development tools is located on the CD-ROM under the gnu subdirectory and is called i386gnutools.tar.bz2. The versions we are using of the GNU cross-development tools are shown in Table 10.2.

Table 10.2. GNU Cross-Development Tools Versions
ToolVersion
GNU Binary Utilities2.11.2
GNU C/C++ Compiler2.95.2
GNU Debugger with Insight Interface5.1

Although the GNU Binary Utilities and GNU C/C++ Compiler versions are not the latest available, they have been confirmed to work in the development environment used in this book for the i386 PC target platform. It might be necessary for you to upgrade to newer tool versions if different processor architectures are used. Prior to upgrading, it is a good idea to search the eCos discussion list to see if there have been any posts describing problems with a newer version.

NOTE

The GNU C/C++ Compiler version 2.95.2 that we use in our setup is not capable of supporting all processors shown in Appendix A, Supported Processors and Evaluation Platforms. The ARM Thumb, Hitachi SH, MN10300/AM33, NEC MIPS VR4300, and NEC V850 processors require installation of a snapshot of the GNU C/C++ Compiler. The snapshots can be found online at ftp://gcc.gnu.org/pub/gcc/snapshots


The latest versions of the GNU cross-development tools, as well as additional documentation for each group of tools, can be found on their respective home sites:

When installation is complete, the cross-development tools are found in the D:cygwin toolsH-i686-pc-cygwinin subdirectory.

The discussion mailing list and address for posting for the GNU Binary Utilities can be found online:

The discussion mailing list and address for posting for the GNU C/C++ Compiler can be found online:

The discussion mailing lists and addresses for posting for the GNU Insight Debugger (and GDB) can be found online:

STEP 1

Open the bash command shell. This can be done by clicking on the Cygwin shortcut on the desktop, if created in the Cygwin native tools installation, or through the menu Start –> Programs –> Cygnus Solutions –> Cygwin Bash Shell.

When the shell is opened, the present working directory is D:cygwinhomexxx, where xxx is your username. We want to change to the root Cygwin directory by entering the following command at the bash prompt:

$ cd /

STEP 2

Unzip the i386 GNU cross-development tools into our Cygwin directory structure. The command for this is:

$ tar xjvf /cygdrive/e/gnu/i386gnutools.tar.bz2

NOTE

The CD-ROM drive is mounted as /cygdrive/e/ by default when Cygwin is installed. The drive letter for your CD-ROM should be substituted in place of /e/ in the preceding command. If you are uncertain of the drive mountings for your system, enter the command mount at the bash shell prompt to get a listing of the current system mounts.


After executing this command, the i386 GNU cross-development tools are located under the D:cygwin ools directory. The binary executables are under the D:cygwin toolsH-i686-pc-cygwinin directory.

STEP 3

We need to ensure that the Cygwin temporary directory is mounted. The command to do this is:

$ mount –f –b d:/cygwin/tmp /tmp

STEP 4

Next, we set the path for our new GNU cross-development tools. The bash shell command for this is:

$ PATH=/tools/H-i686-pc-cygwin/bin:$PATH ; export PATH

We also add the GNU cross-development tools directory to the Windows environment path. The path is altered by right-clicking on the My Computer icon on the desktop. This brings up a drop-down list of options. Select Properties from the drop-down list.

The System Properties dialog box is displayed. Select the Environment tab. Under the User Variables, select path. In the Value edit box, to the front of the path, add:

D:cygwin	oolsH-i686-pc-cygwinin;

Then, click the Set button. Finally, click the OK button.

STEP 5

We can verify that the i386 GNU cross-development tools were installed properly by entering the command:

$ i386-elf-gcc –-version

The following message is output if everything is set up properly:

2.95.2

If the message is incorrect, you need to verify that the tools were unzipped correctly and located in the correct directory.

10.2.3. Installing the eCos Development Kit

There are multiple phases for the eCos development kit installation. The files needed for this installation are located under the ecos directory on the CD-ROM. We are going to install the eCos development kit into the D:ecos directory.

The file ecos-v2a-snap.tar.bz2 contains the source code files from a snapshot of the version 2 release of the eCos source repository. Also included in this file are the eCos configuration tools.

During this installation procedure, we install the version 2 Configuration Tool and the version 1.3.net version as well. To build our RedBoot and eCos images, as we will in Chapter 12, we use the version 2 Configuration Tool. The version 1.3.net Configuration Tool is installed for using the Memory Layout Tool (MLT), which is described in Chapter 11.

Also included in this installation is the Package Administration tool and the eCos command-line configuration tool.

The Linux installation files are located on the CD-ROM under the ecoslinux directory. Additional information about installing eCos on a Linux host platform can be found online at:

http://sources.redhat.com/ecos/getstart.html

STEP 1

Open a bash shell and change to the root D: drive by entering the command:

$ cd d:

Now we unzip the source code files by entering the command:

$ tar xjvf /cygdrive/e/ecos/ecos-v2a-snap.tar.bz2

After the files have been unzipped, we have a new directory, ecos, containing the source code repository and other eCos development kit files.

NOTE

The CD-ROM drive is mounted as /cygdrive/e/ by default when Cygwin is installed. The drive letter for your CD-ROM should be substituted in place of /e/ in the preceding command. If you are uncertain of the drive mountings for your system, enter the command mount at the bash shell prompt to get a listing of the current system mounts.


STEP 2

Next, we need to install the eCos toolset. The eCos toolset is installed individually. The eCos toolset files are contained under the D:ecosin directory, which we just unzipped. First, we install version 2.11 of the eCos Configuration Tool.

It is a good idea to read the two text files that accompany the Configuration Tool version 2.11, which are readme_cfg_v211.txt and changes_cfg_v211.txt. The file readme_cfg_v211.txt contains information about the version 2 release of the Configuration Tool. The file changes_cfg_v211.txt includes the modifications for each version, up to the present release, of the Configuration Tool version 2.

To install version 2.11 of the Configuration Tool we run the setup file configtool-2.11-setup.exe, located under the D:ecosin directory.

The first dialog box asks if we want to install the eCos Configuration Tool 2.11. Click Yes to continue with the install.

STEP 3

Next, the welcome dialog box for installing the eCos Configuration Tool version 2.11 is displayed. Click the Next button to continue with the installation.

STEP 4

Now the eCos license agreement dialog box is displayed, as shown in Figure 10.11.

Figure 10.11. eCos Configuration Tool license agreement dialog box.


Use the scroll bar on the right side of the dialog box to view the entire license agreement. Click Yes to accept the license agreement and continue with the installation.

STEP 5

Next, the Configuration Tool version 2 readme file is displayed in a dialog box. The readme file is also included in the D:ecosin directory in the file readme_cfg_v211.txt. Use the scroll on the right side of the dialog box to view the entire readme file. Click the Next button to continue.

STEP 6

Now we need to select a location for the destination of the Configuration Tool files. The destination selection dialog box is shown in Figure 10.12.

Figure 10.12. Configuration Tool destination directory selection dialog box.


Select D:ecosineCos Configuration Tool for the destination directory. Use the Browse button to select the D:ecosin directory and the setup file appends the eCos Configuration Tool portion of the directory. Then, click the Next button to continue.

STEP 7

Next, we select the program group to install the Configuration Tool start menu shortcuts, as we see in Figure 10.13.

Figure 10.13. Configuration Tool program group selection dialog box.


We enter eCos Configuration Tool into the edit box, as shown in Figure 10.13. Then, click the Next button to continue.

STEP 8

A dialog box showing that setup is ready to begin the installation of files is now displayed. Click the Install button to start the installation.

A progress bar is displayed during the installation procedure. When the installation is complete, a dialog box asking to reboot the computer is displayed. Select Yes, restart the computer now, and click the Finish button to complete the Configuration Tool installation. After the computer reboots, we see the Configuration Tool icon on our desktop.

STEP 9

Double-click on the Configuration Tool icon on the desktop to run the eCos Configuration Tool. We could also select Configuration Tool from the Start –> Programs –> eCos Configuration Tool menu.

The Configuration Tool version 2.11 splash screen is displayed, as shown in Figure 10.14. The version of the Configuration Tool is located on the splash screen.

Figure 10.14. Configuration Tool version 2.11 splash screen.


The program displays a dialog box asking for the location of the eCos repository tree. We click the Browse button and select the D:ecos directory. Then click OK. The eCos repository tree location can be changed later by selecting Build –> Repository from the menu.

The Configuration Tool then searches through the ecos.db file under the D:ecospackages directory to display the appropriate package information. You can find additional details about the ecos.db file in Chapter 11.

STEP 10

Next, we set up the build and user tools that the Configuration Tool uses to build eCos and RedBoot images. Select Tools –> Paths –> Build Tools from the menu. We want to browse to the D:cygwin oolsH-i686-pc-cygwinin directory and click the OK button.

Now we set the user tools by selecting Tools –> Paths –> Build Tools from the menu. We browse to the D:cygwinin directory and click OK.

We now close down the Configuration Tool version 2.11 and finish installing the other eCos development tools.

STEP 11

Continuing with the eCos development kit installation, we install a registry file to enable us to run the eCos Configuration Tool version 1.3.net. We only need to use version 1.3.net of the Configuration Tool when we need to use the MLT. Otherwise, we must hand edit the memory files associated with our configuration.

To update the registry, double-click on the file eCos-011025.reg, which is located in the D:ecosin directory. A dialog box notifying that the registry has been updated is displayed. Click OK to close the dialog box.

We can now run the Configuration Tool version 1.3.net by running the file Configtool13net.exe, which is also located in the D:ecosin directory. The version 1.3.net splash screen is displayed, as shown in Figure 10.15. Notice the version of the Configuration Tool located in the upper right-hand corner of the splash screen.

Figure 10.15. Configuration Tool version 1.3.net splash screen.


The readme file for version 1.3.net of the Configuration Tool is located in the D:ecosin directory in the file readme_cfg_13net.txt.

STEP 12

Finally, let's ensure that we can run the Package Administration tool and the eCos command-line configuration tool.

First, run the Package Administration tool by running the file PkgAdmin.exe under the D:ecosin directory.

NOTE

The Package Administration tool requires certain DLLs to run properly. These DLLs are contained in the directory D:ecosindll. They need to be copied into the C:windowssystem directory to run the Package Administration tool. However, they should only be copied to this directory if they do not exist or if older versions exist in this Windows system directory. It is a good idea to make a backup copy of the DLL files being replaced prior to replacing these files.


Click the Close button to exit the Package Administration tool. Additional information about the eCos Package Administration tool is provided in Chapter 11.

Next, open a bash shell, if one is not open. To see if the eCos command-line tool runs properly, enter the command:

$ d:/ecos/bin/ecosconfig.exe

The command line configuration tool usage output should be displayed in the bash shell. This information can also be displayed by entering ecosconfig –-help. Additional details about the command-line configuration tool are included in Chapter 11. If you plan to use the command-line configuration tool often, it is a good idea to add D:ecosin to the path.

10.2.3.1. eCos Development Kit Directory Structure

Let's take a look at the eCos development kit directory structure. The first directory is bin, which contains the eCos toolset executable files.

The CVS directory is set up when we access the eCos online source code repository. We go through this process in the following section.

Next is the doc directory. This contains Standard Generalized Markup Language (SGML) files of the most recent eCos documentation. These files are contained in the eCos online repository.

The examples directory includes several basic eCos sample applications. We get into example applications later in Chapter 12.

The host directory includes the source code for all of the tools in the eCos toolset, including the Configuration Tool and Package Administrator.

The packages directory contains the version 2 snapshot of the eCos online source code repository.

10.2.4. Accessing the Online eCos Source Code Repository

Due to the constant changes, contributions, and bug fixes made to the eCos source code, it will quickly become necessary to take advantage of these modifications and update your local source code repository. It is very important to keep up to date with the latest bug fixes and enhancements to the eCos, and RedBoot, source code. In order to do this, we must configure our system to access the remote eCos repository.

The eCos source code repository, which includes RedBoot, is managed by CVS, and can be accessed publicly without requiring an account on the remote machine, which is termed anonymous CVS access. Additional information about CVS can be found online at:

www.cvshome.org

Additional information about eCos access to the source code repository using anonymous CVS can be found online at:

http://sources.redhat.com/ecos/anoncvs.html

A popular Linux CVS client called TkCVS is also included on the CD-ROM under the tkcvs directory. Information about TkCVS as well as installation instructions can be found online at:

www.twobarleycorns.net/tkcvs.html

10.2.4.1. Installing WinCVS

To access the eCos source code repository we use one of the open-source CVS software packages called WinCVS (version 1.2). The files needed for installing WinCVS are located on the CD-ROM under the wincvs directory. There is one basic setup executable to run that guides us through the installation procedure.

The source code files, WinCvs120_src_app.zip and WinCvs120_src_ shared.zip, for the WinCVS version used in this installation are also contained in the wincvs directory in Windows zip file format. The WinCVS home site is located at:

www.cvsgui.org

STEP 1

Run the WinCVS setup file Setup.exe. The first dialog box displayed is the welcome dialog box. Click the Next button to proceed with the installation.

STEP 2

Next, the software license agreement dialog box is displayed, as shown in Figure 10.16.

Figure 10.16. WinCVS Software License Agreement dialog box.


WinCVS is also licensed under the GPL version 2, as we see in Figure 10.16. Click the Yes button to accept the license agreement and continue.

STEP 3

The next dialog box is the information dialog box, as shown in Figure 10.17.

Figure 10.17. WinCVS information dialog box.


The information dialog box displays the WinCVS home site, the CVS home site, and additional information about the DLL files needed to run WinCVS. Click the Next button to continue.

STEP 4

Next, we select the destination location to install WinCVS. The dialog box for this step is shown in Figure 10.18.

Figure 10.18. WinCVS destination location dialog box.


The destination selected is D:Program FilesGNUWinCVS. Click the Browse button to enter this directory. Click the Next button to continue.

STEP 5

Now we select the type of installation. The possible choices are shown in Figure 10.19.

Figure 10.19. WinCVS Installation Type dialog box.


The installation type we want is Typical, which is the default. Click the Next button to continue.

STEP 6

Next, we select the program folder for the WinCVS icons. This dialog box is shown in Figure 10.20.

Figure 10.20. WinCVS Program Folder dialog box.


The program folder entered is WinCVS. Click the Next button to continue. Then, the setup program is ready to begin the installation by displaying the Start Copying Files dialog box. Click Next to start the installation.

As the setup continues, icons similar to the ones shown in Figure 10.21 display the progress of the installation.

Figure 10.21. WinCVS progress icons.


After the installation is complete, the computer needs to be rebooted. Select Yes, I want to restart my computer now, which is the default, and click the Finish button in the Setup Complete dialog box.

10.2.4.2. Setting WinCVS Preferences

After the computer reboots, we can launch WinCVS using the shortcut for the WinCVS executable located under Start –> Programs –> WinCVS. Before we can use WinCVS, we must configure it for the eCos source code repository. The dialog box shown in Figure 10.22 is displayed the first time we launch WinCVS.

Figure 10.22. WinCVS preferences dialog box.


In the preferences dialog box, under the Enter the CVSROOT edit box we want to type in:


Then we select Local mounted directory from the Authentication drop-down list.

Next, cvs 1.10 (Standard) is selected from the Use version drop-down list.

Then we click on the Globals tab. Since we want the capability to modify the eCos source files after we download them from the online repository, we want to uncheck the Checkout read-only checkbox.

Now we click on the WinCvs tab and enter the HOME folder. To enter this, we browse to the D:ecos directory.

Then, click the OK button to set the preferences.

The preferences can be modified at anytime by selecting Admin –> Preferences.

10.2.4.3. WinCVS Update Commands

In this section, we take a brief look at some of the common commands used to update the eCos source code repository. After setting the preferences, the main WinCVS program screen is shown, similar to the one shown in Figure 10.23.

Figure 10.23. WinCVS main program screen.


As we see in Figure 10.23, there are three main windows in WinCVS. On the left is the workspace window. This displays the current home directory, and the directories below, which contain the CVS source code. To the right of the workspace window is the file window, which shows the files and directories located within the home directory. At the bottom is the output window. The output window shows output generated when running WinCVS commands. The output window can also be used to enter commands, as we do next.

In the output window, we enter the command:

cvs -d :pserver:[email protected]:/cvs/ecos login

This command allows us to log in to the online eCos repository. When the password dialog box comes up, enter:

anoncvs

The password is stored in the file .cvspass under the WinCVS home directory, which we selected during the preferences setup as D:ecos. We are now ready to enter commands to update our local eCos source code repository.

NOTE

Updating your local eCos source code repository should not be done at this point. The examples we go through in Chapter 12 have been developed using the source code repository from the eCos development kit installation procedure. It is a good idea to run through the examples prior to updating to the latest eCos repository source code.


It is a good idea to use different directory trees when checking out snapshots of the eCos source code rather than using a directory containing a full release. To check out the latest snapshot of the eCos repository, create a new directory for checkout. Then, change to that directory. Next, enter the following command in the WinCVS output window:

cvs -d :pserver:[email protected]:/cvs/ecos -z 6 co -P ecos

This is a checkout (co) command. The –d option specifies the CVS root directory. The –z 6 option sets the compression level. co is a synonym for the checkout command. The option –P notifies WinCVS to prune any empty directories. Finally, ecos is the module to checkout.

NOTE

The entire eCos repository, including the source code for the eCos host tools and RedBoot binary images, can be downloaded using ecos-full as the module name; for example, cvs –d :pserver:[email protected]:/cvs/ecos -z 6 co -P ecos-full. However, be cautious using this because all RedBoot images will be downloaded, which totals about 12 Mbytes.


This initiates a connection to the CVS server and checks out the latest version of eCos, which includes all packages and RedBoot as well.

After a local repository has been created, different commands are entered to update the repository. For example,

cvs -z 6 update -d -P

The preceding command updates any files that have been modified since the last time the files were checked out.

Other commands are available to check out repository files from specific dates or with specific labels. Additional information about commands is located in the WinCVS help. Select Help –> Help on cvs-1.10. Select the Index button and type in command reference. This gives a listing of the CVS commands and optional switches. There is also information on the eCos site at:

http://sources.redhat.com/ecos/anoncvs.html

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.2.184