Partager via


How to Decrease Run-Time Image Size on a CEPC (Windows Embedded CE 6.0)

1/5/2010

When you design and configure your run-time image, each module, component, and feature that you add or remove affects the size of the run-time image.

To meet the specific memory requirements of the target device, you can decrease the run-time image size by removing nonessential modules, by compressing modules, and by moving modules to different parts of the file system.

Hardware and Software Assumptions

Steps

Step Topic

1. Configure and build your run-time image.

The method for configuring your initial run-time image varies depending on the memory requirements of your target device. The following list shows different methods for configuring your initial run-time image:

  • If your target device has strict memory requirements, select an OS design that has minimal features, such as the Small Footprint Device Design Template. Then add or remove Catalog items as appropriate for your target device category.
  • If your target device does not have strict memory requirements, select an OS design that has more features, such as the Set-Top Box Design Template. Then add or remove Catalog items as appropriate for your target device category.

How to Configure and Build a Run-Time Image for a CEPC

2. After the build is complete, view your run-time image and check its size. Typically, the run-time image is named Nk.bin.

You can check the run-time image size by doing one of the following:

  • Open Windows Explorer and then browse to _FLATRELEASEDIR. You can see the size of your run-time image in the Size column.
  • Use the Viewbin tool to view the size of your run-time image. For more information, see Viewbin Tool.

None

3. Create a new configuration and set it to the active configuration.

  • As a best practice, first copy the Release configuration and then modify it to create your Ship configuration.
Ee479365.note(en-US,WinEmbedded.60).gifNote:
Creating a new configuration does not automatically change the active configuration to the new configuration.

Creating a Custom Ship Configuration

Build Configurations

4. Remove nonessential features, modules, and components from your OS design by clearing the check box next to each nonessential feature, module, or component in the Catalog Items View.

Ee479365.note(en-US,WinEmbedded.60).gifNote:
If your OS design is dependent on other features, you cannot remove those features, modules, or components. To view dependencies, in the Solution Explorer window in the IDE, choose Catalog Items View. Right-click on a feature for which you want to check the dependencies and then choose Show Dependencies.

None

5. The VMINI Ethernet sharing library enables the OS, KITL, and debug Ethernet to run over a single Ethernet connection.

If you do not need the VMINI Ethernet sharing library, remove support for it by setting the environment variables KERNELNOSHAREETH and BSP_NOSHAREETH to 1.

Setting or Clearing an Environment Variable (Visual Studio)

6. If it is suitable for your target device, do not localize the run-time image.

By not localizing your run-time image, you can decrease the run-time image size.

  1. From the Project menu, choose <OS Design> Properties.
  2. Expand Configuration Properties and then choose Locale.
  3. Clear the Localize the build check box and then choose OK.

None

7. Modify the .bib files for the run-time image by moving the entries for infrequently used end-user modules to the FILES section of the .bib files.

The module entries listed in the FILES section of a .bib file are compressed and take longer to load. This decreases your run-time image size, but affects RAM usage and performance. Executable (.exe) files in the FILES section take longer to load and run more slowly.

  • To move a module to the FILES section, in Solution Explorer, expand Parameter Files, and then double-click project.bib.
  • Copy and paste the selected module from the MODULES section to the FILES section of the .bib file and then in the MODULES section, comment out the module you moved to the FILES section by using the semicolon (;) character.

Binary Image Builder File

8. Configure the Premakeimg.bat and MyPlatform_bib.cfg files to compress specified modules.

Configuring a Premakeimg.bat File

9. Rebuild the run-time image to bring it up to date and save the changes that you made.

Building a Run-Time Image

10. After the build is complete, view the run-time image size again and compare it to the original run-time image to verify that the size decreased.

You can check the run-time image size by doing one of the following:

  • Open Windows Explorer, browse to the _FLATRELEASEDIR. You can see the size of your run-time image in the Size column.
  • Use the Viewbin tool to see the size of your run-time image. For more information, see Viewbin Tool.

If you want to verify that any file attributes that were assigned in step 8 persist through the run-time image build and download, use the File Viewer.

None

See Also

Concepts

CEPC-based SDBs

Other Resources