Please note as of Wednesday, August 15th, 2018 this wiki has been set to read only. If you are a TI Employee and require Edit ability please contact x0211426 from the company directory.
Supporting Multiple XIP Regions in WinCE BSP
- 1 Overview
- 2 Multi-XIP support implementation
- 2.1 Environment Variables
- 2.2 Build Procedure and Generated File
- 2.3 NAND partitions
- 2.4 Loading procedure
- 2.5 Registry and BIB file settings
- 3 Known Issues
XIP(Execute-in-place) regions are areas where an application can run code directly from ROM rather than having to load it from RAM. Some of the benefits of WinCE multiple XIP support are:
- Save image loading time when using a much smaller Kernel image
- Applications can be broken into functional subsets, and can be updated separately from other XIP region.
- Save RAM memory
Multiple XIP regions divide the ROM image into discrete, individually upgradable units.
For more information about multiple XIP support, please refer to this link
In TI ARM-A8 WinCE 6.0 BSP, Multiple XIP support is added as two regions – XIPKernel and extended region(EXT), more XIP regions can be added based on Users’ requirements.
Note: This document highlight steps that are needed to support Multiple XIP in WinCE 6.0 BSP. For similar support in WEC 7 BSP, the user can follow the general guidelines here but will have to do WEC 7 specific modifications on their own.
Multi-XIP support implementation
Multiple XIP needs BINFS support to save some regions in Flash memory. Eboot should provide the capability to partition and flash XIP regions in Flash memory.
In TI ARM_A8 BSP, multiple XIP regions support is not the default build option. To enable multiple XIP support, please set IMGMULTIXIP=1.
To make a build that can be flashed in NAND, please set IMGNAND=1.
Build Procedure and Generated File
TI ARM_A8 BSP Multi-Bin image build procedure:
- Enable BINFS from catalog Items View
Core OS ->CEBASE -> File systems and Data Store ->Storage Manageer->Binary Rom Image File System
It is enabled by default in WINCE_ARM_A8 BSP’s OSdesign.
- Enable BSP with Multi XIP support
Enable IMGMULTIXIP from environment variables window , as shown in the following picture.
- Build Solution
The generated binary files can be found from flat release folder:
Chain.lst – file used by platform builder to download the BinFS image.
Chain.bin - A .bin file for the XIP chain.
Xipkern.bin - binary image for XIP Mini Kernel, it should be flashed in OS partition of the NAND device.
NK.bin - binary image for XIP modules, it should be flashed in EXT partition of the NAND device.
XIP.bin – A single .bin file containing all XIP regions.
NAND device is partitioned into following partitions with Multiple XIP support:
- OS Partition – OS Kernel image
- EXT partition – NANDIMAGE for multi-bin
- File system
Update Eboot in SD card or NAND, Then format NAND device, EXT partition should be created after format.
Flashing XIP regions in NAND flash
EXT region should be flashed before loading the Kernel image. There are two ways to flash EXT region:
- Through platform builder
- Make BSP images with variable imgnand=1. After the image are downloaded from Platform builder, it will be flashed in NAND by Eboot
- Through SD card
- Make BSP images without variable imgnand=1.
- Copy nk.bin to SD card
- Set eboot to load nk.bin from SD card (this step is only needed once), the image will be flashed in NAND after downloading from SD card
Loading from platform builder
Multiple Bin files can be downloaded from platform builder and flashed by Eboot. To download multiple bin files, change the target file name to chain.lst from BSP Property pages(see picture below). To have binary files flashed after downloading, please build the image with "imgnand" set to 1.
Loading from SD card
The procedure is:
- Copy xipkern.bin to SD card
- set the filename for SDCard boot to xipkern.bin, then boot up the system (Assume nk.bin has already been flashed in NAND)
Registry and BIB file settings
The registry changes for BINFS are as follows:
Please refers to the MSDN link for more information about BINFS registry settings.
Config.bib change for memory layout
The changes in config.bib includes memory layout for mulit-bin system. The following is the example used in TI ARM_A8 BSP. More XIP sections can be defined and added into this table.
Please note that in the above table, XIPKERN section is added for OS Kernel and it is set to RAMIMAGE, the original NK section is changed to NANDIMAGE and will be placed in NAND flash.
Bib changes to place modules in desired Region
In TI WINCE_ARM_A8 BSP, scripts are added to handle placing modules in different regions. In EVM_OMAP3530 BSP, evm_omap3530_multibin_filelist.txt gives the file list that needs to be put in the XIP Kernel (RAMIMAGE region), this region is where files that must be loaded prior to mounting BINFS. The files loaded into this region include everything needed for the Kernel. All other files are currently put into EXT partition.
Please refer to the MSDN link on how to modify .bib file to support BINF.
IR (SDOCM00080827): AM35x Board crashes randomly during Boot up with multibin supported image
IR (SDOCM00080828): Suspend and Resume makes the system hang for MultiBin image