us/library/aa924385.aspx.

Basically, you need to perform the following steps:

1. Copy the code of the desired Public component into a new directory.

2. Edit the sources file in the new directory and add the line RELEASETYPE=PLATFORM or change the value to PLATFORM if the line already exists so that the build engine places the output from this build into the %_TARGETPLATROOT% folder.

3. Add WINCEOEM=1 to the sources file and build the component in the new directory. This might require further modifications to resolve all build errors.

4. Use the Sysgen Capture tool to create modular sources and dirs files.

5. Rename and use the files created by the Sysgen Capture tool along with a makefile to rebuild the new cloned module.

Once you apply all required modifications to the cloned component, you can modify and redistribute it as easily as any other code.

Lesson Summary

Windows Embedded CE includes a Public directory tree with the source code for most of the CE components, but you should not modify the source code in the Public directory tree directly. Instead, you should clone the items either automatically or manually. Modifying the source code in the Public directory tree causes more trouble now as well as in the future unless you already know the build system very well, in which case you already know all the good reasons why you should use the cloning method.

Lesson 4: Managing Catalog Items

One of Windows Embedded CE's most useful features is its catalog system. By using the catalog, developers can quickly and conveniently customize the Windows Embedded CE firmware to suit their needs. If you create a custom catalog item for each of your components, you can facilitate the installation and configuration of your components. This is a differentiating factor between ad-hoc and professional Windows Embedded CE solutions. For ad-hoc solutions, it might be sufficient to provide basic installation notes and a list of required SYSGEN variables, but professional software should include catalog items with proper values for SYSGEN variables and configuration settings.

After this lesson, you will be able to:

¦ Customize the content of the catalog.

¦ Add a new component entry to a BSP catalog.

Estimated lesson time: 20 minutes.

Catalog Files Overview

The Windows Embedded CE catalog uses files in Extensible Markup Language (XML) format with a .pbcxml file-name extension. The catalog includes a large number of .pbcxml files, located inside the WINCEROOT directory. Platform Builder automatically enumerates these files to generate the Catalog Items View in Solution Explorer.

Platform Builder parses the following directories to enumerate catalog items:

¦ Public catalog files %_WINCEROOT%Public<any subdirectory>Catalog

¦ BSP catalog files %_WINCEROOT%Platform<any subdirectory>Catalog

¦ Third-party catalog files %_WINCEROOT%3rdParty<any subdirectory>Catalog

¦ Common system-on-chip (SOC) files %_WINCEROOT%PlatformCommonSrcsoc <any subdirectory>Catalog

NOTE 3rdParty folder

The 3rdParty folder usually contains standalone applications or source applications that can be included and distributed as part of an OS design. By enumerating the .pbcxml files in the 3rdParty folder, Platform Builder provides a way to add entries to the Catalog Items View for those components.

Creating and Modifying Catalog Entries

To add a new catalog item to the Windows Embedded CE catalog, you can create a copy of an existing catalog file (.pbcxml file) and then edit the file content by using the Catalog Editor provided with Platform Builder. You can also create a new catalog file in Platform Builder if you open the File menu in Visual Studio, point to New, and then select File. In the New File dialog box, under Platform Builder for CE 6.0 R2, select Platform Builder Catalog File, and then click Open.

NOTE Editing catalog files

Always edit catalog files by using the Catalog Editor provided with Platform Builder. There are no settings that require you to work with a text editor such as Notepad. Opening and editing cata­log files manually outside of Platform Builder is unnecessarily time-consuming.

Catalog Entry Properties

Each catalog entry has a number of properties that you can modify in Platform Builder, as illustrated in Figure 1-6. The most important properties include the following

¦ Unique Id A unique identifier string.

¦ Name The name of the catalog component as it appears in the Catalog Items View.

¦ Description An expanded description of the component, which appears when the user hovers the mouse pointer over the catalog item for several seconds.

¦ Modules A list of files that belong to this catalog component.

¦ Sysgen variable An environment variable for the catalog item. If your catalog

Добавить отзыв
ВСЕ ОТЗЫВЫ О КНИГЕ В ИЗБРАННОЕ

0

Вы можете отметить интересные вам фрагменты текста, которые будут доступны по уникальной ссылке в адресной строке браузера.

Отметить Добавить цитату
×