Did your OS size increase between Windows Embedded CE 6.0 and Windows Embedded Compact 7? If so, you are probably looking for answers. This article and two companion articles, How to Analyze OS ROM Size and Tips on Optimizing Your OS Footprint, are based on Johnson Shih’s video, Controlling ROM Size, which discusses how you can determine OS size and what you can do to reduce it.

First, note that simply comparing the sizes of two run-time images (nk.bin files) in the flat release directory provides very little information. You need to consider additional aspects such as:

  • CPU base of your OS. Different CPU bases produce different run-time image sizes.
  • Catalog item selections. When you select a catalog item in Platform Builder, you are pulling in the code for the associated Sysgen variable. Of course, as you add catalog items, you increase the OS size. Even if you just add one Sysgen, that Sysgen will pull in all other Sysgens that it depends on.
  • Build type. A debug build is usually double the size of a retail build.
  • BSP components. The BSP contributes to OS size. For example, your BSP might include just a couple of drivers, but the drivers might contain a lot of code.

Assuming that your CPU base, catalog item selections, build settings, and BSP haven’t changed, where is the OS size difference between Windows Embedded CE 6.0 and Windows Embedded Compact 7 coming from? Usually it is from one of these factors:

  • Sysgen configuration. In Windows Embedded Compact 7, a catalog item might have a greater number of Sysgen dependencies and is, therefore, pulling in more code.
  • Module size. A module might have been redesigned, and it grew in the process.

What can you do? First, you need to know the size of your OS, its modules, and files as they are in ROM. The OS size in ROM is not the same size as nk.bin, and the module and file sizes in ROM don’t necessarily match what you see in the flat release directory. The article How to Analyze OS ROM Size will help you find the exact sizes. After you have that information, you can use the ideas in the Tips on Optimizing Your OS ROM Footprint article to reduce your OS size.

Good luck!

Community Resources

See Also