Modifying the Binary Image Builder Files (Windows CE 5.0)

Send Feedback

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

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

  1. In Platform Builder, from the Workspace window, choose the ParameterView tab at the bottom of the window. In the project tree, under the CEPC node, expand the Hardware Specific Files node, and double-click the Config.bib file.

    Note   It is recommended that you 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 CE OS installation for your BSP.

  2. In config.bin, 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 #elifdefined statements for IMGRAM variables of different sizes. 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 will 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        
        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 good practice, add the sizes of all files for a given region, and then add an extra 32K 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 behind all other regions. The location where you define the CHAIN region in config.bib depends on your bootloader. For example, a CEPC requires that the CHAIN region is defined after the NK region.

    The above example 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.

  3. After defining the multiple XIP regions in the MEMORY section, you must add a set of values to the CONFIG section of config.bin to provide Romimage.exe with the address of where the chain file needs to be placed. These values also configure Romimage.exe to automatically size the module images. In config.bib, in the CONFIG section, set the following values:

    **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.
    Note   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 will have to update this variable to match your settings.
  4. To save your changes to the Config.bib file, from the File menu, choose Save.

  5. In the project tree, under the CEPC node, expand the Hardware Specific Files node, and double-click the platform.bin file.

  6. 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 will tell romimage.exe to place the Shell and File System in the SHELL region, and to load these applications from this region in memory.

  1. To save your changes to platform.bib, from the File menu, choose Save.
  2. To add the IMG environment variable for multiple XIP support, from the Platform menu, choose Settings.
  3. Choose the Environment tab, and then choose New.
  4. In the Variable name box, type IMGMULTIBIN.
  5. In the Variable value box, type 1, and then choose OK.
  6. To close the Platform Settings dialog box and save your changes, choose OK.

See Also

How to Create a Run-Time Image with Multiple XIP Regions | Config.bib Customization | Config.bib Checklist | Binary Image Builder File | MODULES Section | XIP Chain

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.