Compartir a través de


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

Send Feedback

When you design and configure your run-time image, each module, component, or feature you add or remove affects the size of the run-time image. To meet the specific memory requirements of your target device, you can decrease your run-time image size by removing unneeded modules, compressing modules, and moving modules to different parts of the file system.

Hardware and Software Assumptions

  • You have set up a CEPC.

    For more information, see How to Set Up a CEPC.

  • You are familiar with using the IDE to modify your OS design.

    For more information, see Catalog Overview.

  • You are familiar with using the IDE to modify run-time image settings.

    For more information, see Platform Settings: Build Options Tab.

  • You are familiar with setting and clearing environment variables.

    For more information, see Setting or Clearing an Environment Variable.

  • You are familiar with editing, commenting, and correctly backing up the batch (.bat) files that determine what is included in your run-time image.

    For more information about commenting .bat files, see REM.

  • You are familiar with editing, commenting, and correctly backing up binary image builder (.bib) files.

    To comment a .bib file, use the ';' delimiter.

To track your progress in the following table, select the check box next to each step.

  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 methods for configuring your initial run-time image:

  • If your target device has strict memory requirements, select an OS design with a minimal amount of features, such as a Tiny Kernel, then add or remove parts of the run-time image as appropriate.
  • If your target device does not have strict memory requirements, select an OS design with more features, such as a Set-Top Box, and then add or remove parts of the run-time image as appropriate.
How to Configure and Build a Run-Time Image for a CEPC
2. After the build finishes, view your run-time image and note its size. Typically, the name of the run-time image is Nk.bin.
  • View the size of your run-time image in the _FLATRELEASEDIR.

    - or -

    Use the Viewbin tool to view the size of your run-time image. For more information, see Viewbin Tool.

Not applicable
3. Create a new configuration.
  • Microsoft recommends copying the Release configuration, and then modifying it to create your configuration.
Note   Creating a new configuration does not automatically change the active configuration to the new configuration.

For information on build configurations you can select, see Build Configurations.

Creating a Custom Ship Configuration
4. Set the configuration created in step 3 as the active configuration.
  • From the Build menu, choose the Set Active Configuration dialog box, and then select your configuration.
  • Verify that WINCESHIP is equal to 1 in your configuration.
Setting the Active Configuration for a Project
5. Remove unnecessary features, modules, and components from your OS design by selecting the feature, module, or component in the Workspace window, and then pressing DELETE.
Note   You might not be able to remove certain features, modules, or components due to dependencies.
  • To view dependencies, from the Workspace window in the integrated development environment (IDE), choose the FeatureView tab. Select a feature for which you want to check the dependencies, right-click it, and then choose Dependencies for Selected Item.
Not applicable
6. If you do not need the VMINI Ethernet sharing library, remove support for it by setting the KERNELNOSHAREETH and the BSP_NOSHAREETH environment variables.

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

Setting or Clearing an Environment Variable
7. If appropriate for your target device, do not localize the run-time image.

Not localizing your run-time image decreases the run-time image size.

  • From the Platform menu, choose Settings and then the Locale tab. On the tab, clear the Localize the Build check box.
Not applicable
8. Move the entries for seldom-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 might affect RAM usage and performance. Executable (.exe) files in the FILES section might take longer to load and might run slower.

  • To move a module to the FILES section, in the Workspace window choose the ParameterView tab. Copy and paste the module to the FILES section of the .bib file, and then in the MODULES section, comment out the module you moved to the FILES section.

    - or -

    On the ParameterView tab, in the Project Specific Files folder, create a Project.bib file. Copy and paste any modules into the FILES section, and comment out the modules in the .bib file from which the module was copied.

Binary Image Builder File
9. Configure the Premakeimg.bat and MyPlatform_bib.cfg files to compress specified modules. Configuring a Premakeimg.bat File
10. Rebuild the run-time image to bring it up-to-date and save the changes you made. Building a Run-Time Image
11. After the build finishes, view the run-time image size again and compare it to the original run-time image to verify that the size decreased.
  • View the size of your run-time image in the _FLATRELEASEDIR.

    - or -

    Use the Viewbin tool to view 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 9 persisted through the run-time image build and download, use the Remote File Viewer.

Not applicable

See Also

How-to Topics

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.