Share via


How to Decrease Run-Time Image Size on a CEPC

When you design and configure your run-time image, each module, component, or feature you add or remove affects the overall 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 platform. For more information, see Platform Modification.
  • You are familiar with using the IDE to modify platform settings. For more information, see 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 properly 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 properly 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 two methods for configuring your initial run-time image:

  • If your target device has strict memory requirements, select a minimal configuration, 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 a full-featured configuration, such as a Set-Top Box, then add or remove parts of the run-time image as appropriate.
How to Configure and Build an OS Image for a CEPC
2. After the build finishes, view and make note of the size of your run-time image. 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 custom ship run-time image configuration.
  • You must copy the release configuration and modify it to create a custom ship configuration.
Note   Creating a custom ship run-time image does not automatically change the active configuration to the ship run-time image.
Creating a Custom Ship Configuration
4. Set the ship run-time image to the active configuration.
  • From the Build menu, choose the Set Active Configuration dialog box, and then select your ship configuration.
Setting the Active Configuration for a Project
5. Remove unnecessary modules and components from your platform by selecting the module or component in the Workspace window, and then pressing DELETE.
Note   You may not be able to remove certain modules or components due to dependencies.
  • To view dependencies, from the Workspace window in the integrated development environment (IDE), choose the FeatureView tab. Select and then right-click on a feature that you want to check dependencies on in your platform, and then choose Feature Dependencies.
Not applicable
6. Remove support for the VMINI Ethernet sharing library 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. If you are no longer concerned about KITL and debug Ethernet, you can remove the VMINI Ethernet sharing library.

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, the Locale tab, and then 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 Project.bib file for your platform.

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 may affect RAM usage and performance. Executable (.exe) files in the FILES section may take longer to load and may run slower.

  • To move a module to the FILES section, copy the entry for the module from the Common.bib file for your platform to the Project.bib file, and comment out the module entry in the Common.bib file.
Binary Image Builder File
9. Configure the Preromimage.bat and MyPlatform_bib.cfg files to compress specified modules. Configuring the Preromimage.bat File
10. Rebuild the platform to bring it up-to-date and save the changes you made. Building a Platform
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.
Not applicable

See Also

CEPC How-to Topics

Last updated on Wednesday, April 13, 2005

© 2005 Microsoft Corporation. All rights reserved.