Modifying the Binary Image Builder Files (Windows Embedded CE 6.0)

1/6/2010

After you have created your OS design, you must modify the config.bib and platform.bib files to specify files and settings that are required to build a run-time image with multiple execute-in-place (XIP) regions.

To modify the .bib files for your run-time image with multiple XIP regions

  1. In Platform Builder, on the File menu, chose Open, and then choose File.

  2. In the Open File dialog box, navigate to %_WINCEROOT%\PLATFORM\CEPC\FILES.

  3. In Files of type, choose All Files.

  4. Choose the Config.bib file, and choose Open.

    Note

    Create a backup copy of config.bib so that, if config.bib becomes corrupted by the changes you make to the file, you do not need to repair the Windows Embedded CE OS installation for your BSP.

  5. In config.bib, navigate to the MEMORY section, and define the multiple XIP regions for your run-time image.

    By default, the MEMORY section includes a list of #elif defined statements for IMGRAM variables of different sizes.

  6. In the MEMORY section of config.bib, paste the following code example after the #elif defined statements, right before the #else statement.

    The multiple XIP regions defined in the following example work for a CEPC BSP:

    #elif defined IMGMULTIBIN;
    ; NAME START ADDR SIZE TYPE;
    NK 80220000 007DE000 RAMIMAGE
    SHELL 809FE000 00100000 RAMIMAGE
    APPS 80AFE000 00100000 RAMIMAGE
    CHAIN 80BFE000 00002000 RESERVED; XIP chain info
    RAM 80C00000 01000000 RAM 
    nk.exe:pdwXIPLoc 00000000 80BFE000 FIXUPVAR; XIP pTOC
    

    In the above example, the NK region has been divided so that the image includes three new regions: SHELL, APPS, and CHAIN. All regions are contiguous, and there are no address gaps between any of the regions. The values listed above are examples that can be used for the purpose of this procedure. However, you can also choose a custom size for each region. The size that you define for each region is arbitrary and depends on the files you are planning to add to each region and whether any of these will be compressed by Romimage.exe. As a best practice, add the sizes of all files for a given region, and then add an extra 32 KB as a buffer. Adding this extra amount provides room for the files to reduce and expand as they change between each successive build.

    In the above example, the CHAIN region has been placed last. The location at which you define the CHAIN region in config.bib depends on your bootloader. For example, a CEPC requires that the CHAIN region be defined after the NK region. It also shows that pdwXIPLoc has been declared as the fixup variable and that its location has been set to the same address as the start of the CHAIN region.

  7. After defining the multiple XIP regions in the MEMORY section, add a set of values to the CONFIG section of config.bib to provide Romimage.exe with the address at which the chain file must be placed. These values also configure Romimage.exe to automatically size the module images. In the CONFIG section of config.bib, set the values in the following table.

    Note

    Some of these values may already be set by default.

    Value Description

    AUTOSIZE=ON

    Adjusts the start address of RAM to the end of the last XIP region.

    ROM_AUTOSIZE=ON

    Automatically sizes each separate XIP region.

    DLLADDR_AUTOSIZE=ON

    Automatically sizes the DLL address space across multiple XIP regions.

    XIPSCHAIN=80bfe000

    Points to the start of the CHAIN region defined in the MEMORY section.

    Ee482800.note(en-US,WinEmbedded.60).gifNote:
    This address is applicable for the example provided in the previous step of this procedure. If you use a customized address for the CHAIN region or a different BSP, you must update this variable to match your settings.
  8. On the File menu, choose Save config.bib.

  9. On the File menu, choose Open, and then choose File.

  10. In the Open File dialog box, navigate to %_WINCEROOT%\PLATFORM\CEPC\FILES.

  11. In Files of type, choose All Files.

  12. Choose the platform.bib file, and then choose Open.

  13. In platform.bib, locate the Files section at the end of platform.bib, and add the following entries at the end of the Files section:

    if IMGMULTIBIN
       shell.exe $(_FLATRELEASEDIR)\shell.exe SHELL SH
       filesys.exe $(_FLATRELEASEDIR)\filesys.exe SHELL SH
    #else
       shell.exe $(_FLATRELEASEDIR)\shell.exe NK SH
       filesys.exe $(_FLATRELEASEDIR)\filesys.exe NK SH
    #endif
    

    These entries tell romimage.exe to place the Shell and File System in the SHELL region and to load these applications from this region in memory.

  14. On the File menu, choose Save project.bib.

  15. To add the IMG environment variable for multiple XIP support, on the Project menu, choose <SolutionName>Properties.

  16. In the Property Pages dialog box, expand Configuration Properties, choose Environment, and then choose New.

  17. In the Variable name box, type IMGMULTIBIN.

  18. In the Variable value box, type 1, and then choose OK.

  19. To close the Property Pages dialog box and save your changes, choose OK.

See Also

Tasks

How to Create a Run-Time Image with Multiple XIP Regions

Concepts

Config.bib Checklist
XIP Chain

Other Resources

Config.bib Customization
Binary Image Builder File
MODULES Section