(CLR) must convert the Microsoft Intermediate Language (MSIL) content into native machine code at run time.

¦ FILES References executables and other files that the operation system should load into RAM for execution. You should specify managed code modules in this section.

.BIB File MEMORY Section The MEMORY section in the Config.bib file defines reserved memory regions, assigning each region a name, address, size, and type. A good example is the MEMORY section that you can find in the Config.bib file in the Device Emulator BSP. This Device Emulator BSP is available with Platform Builder for CE 6.0 R2 out-of-the-box. You can find Config.bib in the PLATFORM<BSP Name>FILES directory. Figure 2-4 shows this MEMORY section in Visual Studio 2005.

Figure 2-4 MEMORY section from a .bib file

The fields in the MEMORY section define the following parameters:

¦ Name This is the name of the MEMORY section. The name must be unique.

¦ Address This hexadecimal number represents the starting address of the memory section.

¦ Size This hexadecimal number defines the total length of the memory section in bytes.

¦ Type This field can have one of the following values:

 ¦ RESERVED Indicates that this area is reserved. Romimage.exe skips these sections during image creation. For example, the Ce.bib file shown in Figure 2-4 includes several RESERVED sections, such as an ARGS section to provide a shared memory area for the boot loader (EBOOT) to pass data to the system after startup (ARGS) and a DISPLAY section for a display buffer. The Ce.bib file of other OS designs might include different RESERVED sections for memory areas that the kernel is not supposed to use as system memory.

 ¦ RAMIMAGE Defines the memory area that the system can use to load the kernel image and any modules you specified in the MODULES and FILES sections of .bib files. A run-time image can only have one RAMIMAGE section and the address range must be contiguous.

 ¦ RAM Defines a memory area for the RAM file system and for running applications. This memory section must be contiguous. If you need a noncontiguous memory section, such as for extension dynamic RAM (DRAM) present on the device, you can allocate noncontiguous memory by implementing the OEMGetExtensionDRAM function in the OAL of the BSP. Windows Embedded CE supports up to two sections of physical noncontiguous memory.

.BIB File CONFIG Section The CONFIG section defines additional parameters for the run-time image, including the following options:

¦ AUTOSIZE Automatically combines RAMIMAGE and RAM sections and allocates any unused memory in the RAMIMAGE section to RAM, or if necessary takes memory from the RAM section and provides it to the RAMIMAGE.

¦ BOOTJUMP If specified, moves the boot jump page to a specific area within the RAMIMAGE section, rather than by using the default area.

¦ COMPRESSION Automatically compresses writable memory sections in the image. The default value for this option is ON.

¦ FIXUPVAR Initializes a kernel global variable during the Make Binary Image phase.

¦ FSRAMPERCENT Sets the percentage of RAM used for the RAM file system.

¦ KERNELFIXUPS Instructs Romimage.exe to relocate memory writable by the kernel. This option is generally enabled (ON).

¦ OUTPUT Changes the directory that Romimage.exe uses as the output directory for the Nk.bin file.

¦ PROFILE Specifies whether the image includes the profiler.

¦ RAM_AUTOSIZE Expands the size of RAM to the end of the last XIP section.

¦ RESETVECTOR Relocates the jump page to a specified location. This is required for MIPS processors to boot from 9FC00000.

¦ ROM_AUTOSIZE Resizes XIP regions, taking into account the ROMSIZE_AUTOGAP setting.

¦ ROMFLAGS Configures the following options for the kernel:

 ¦ Demand paging Fully copying a file into RAM before executing it or paging in parts of it.

 ¦ Full kernel mode Run every OS thread in kernel mode, which leaves the sys­tem vulnerable to attack but improves performance.

 ¦ Trust only ROM modules Marks only files in ROM as trusted.

 ¦ Flush the X86 TLB onX86 systems Improves performance but adds a security risk.

 ¦ Honor the /base linker setting Defines whether or not to use the /base linker setting in DLLs.

¦ ROMOFFSET Enables you to run the run-time image in a memory location that is different from the storage location. For example, you can store the run-time image in FLASH memory, and then copy and run it from RAM.

¦ ROMSIZE Specifies the size of the ROM in bytes.

¦ ROMSTART Specifies the ROM's starting address.

¦ ROMWIDTH Specifies the number of data bits and how Romimage.exe splits the run-time image. Romimage.exe can put the entire run-time image into one file, split the run-time image into two files of even and odd 16-bit words, or create four files of even and odd 8-bit bytes.

¦ SRE Determines whether Romimage.exe generates a .sre file. Motorola S-record (SRE) is a file format recognized by most ROM burners.

¦ X86BOOT Specifies whether or not to add a JUMP instruction at the x86 reset vector address.

¦ XIPSCHAIN Enables the creation of Chain.bin and Chain.lst files to set up an XIP chain, so that you can split an image into multiple files.

.BIB File MODULES and FILES Sections BSP and OS design developers must frequently edit the MODULES and FILES sections of a .bib file to add new components to a run-time image. The format for the MODULES and FILES section is practically identical, although the MODULES section supports more configuration options. The key difference is that the MODULES section lists files not compressed in memory to support XIP, while the FILES section lists files that are compressed. The operating system must decompress the data when accessing the files.

The following listing shows two small MODULES and FILES sections from a Platform.bib file. For a complete example, check out the Platform.bib file of the Device Emulator BSP.

MODULES

; Name                  Path                                Memory Type

; --------------        ----------------------------        -----------

; @CESYSGEN IF CE_MODULES_DISPLAY

IF BSP_NODISPLAY !

DeviceEmulator_lcd.dll $(_FLATRELEASEDIR)DeviceEmulator_lcd.dll NK SHK

IF BSP_NOBACKLIGHT !

backlight.dll          $(_FLATRELEASEDIR)acklight.dll          NK SHK

ENDIF BSP_NOBACKLIGHT !

ENDIF BSP_NODISPLAY !

; @CESYSGEN ENDIF CE_MODULES_DISPLAY

FILES

Добавить отзыв
ВСЕ ОТЗЫВЫ О КНИГЕ В ИЗБРАННОЕ

0

Вы можете отметить интересные вам фрагменты текста, которые будут доступны по уникальной ссылке в адресной строке браузера.

Отметить Добавить цитату