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
- You have set up a Windows Embedded CE PC-based platform (CEPC).
For more information, see How to Set Up a CEPC. - You know how to use the IDE to modify your OS design.
For more information, see Catalog Overview. - You know how to use the IDE to modify run-time image settings.
For more information, see OS Design Property Pages Dialog Box. - You know how to set and clear environment variables.
For more information, see Setting or Clearing an Environment Variable (Visual Studio). - You know how to edit, make comments in, and correctly back up the batch (.bat) files that determine what is included in your run-time image.
For more information about how to edit and make comments in .bat files, see Command Processor Commands and REM (Command Processor). - You know how to edit, make comments in, and correctly back up binary image builder (.bib) files.
To add a comment to a .bib file, use the semicolon (;) character. For more information, see Binary Image Builder File.
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:
|
|
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:
|
None |
3. Create a new configuration and set it to the active configuration.
Note:
Creating a new configuration does not automatically change the active configuration to the new configuration.
|
|
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.
Note:
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. |
|
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.
|
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.
|
|
8. Configure the Premakeimg.bat and MyPlatform_bib.cfg files to compress specified modules. |
|
9. Rebuild the run-time image to bring it up to date and save the changes that you made. |
|
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:
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 |