How to Decrease Run-Time Image Size on a CEPC (Windows CE 5.0)
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.
|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:
|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.
|3. Create a 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.
||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.
|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.
|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.
|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.
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.
Send Feedback on this topic to the authors