; Name           Path                         Memory Type

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

; @CESYSGEN IF CE_MODULES_PPP

dmacnect.lnk     $(_FLATRELEASEDIR)dmacnect.lnk    NK SH

; @CESYSGEN ENDIF CE_MODULES_PPP

You can define the following options for file references in MODULES and FILES sections:

¦ Name The name of the module or file as it appears in the memory table. This name is usually the same as the file name in the run-time image.

¦ Path The complete path to the file that Romimage.exe incorporates into the run- time image.

¦ Memory References the name of a memory area in the MEMORY section of the Config.bib file into which Romimage.exe loads the module or file. It is usually set to NK to integrate the file in the NK area defined in the MEMORY section.

¦ Section Override Enables you to specify modules in a FILES section and files in a MODULES section. Essentially, Romimage.exe ignores the section in which the entry resides, and treats the entry as a member of the specified section. This parameter is optional.

¦ Type Specifies the file type and can be a combination of flags, as shown in Table 2- 3.

Table 2-3 File type definitions for MODULES and FILES sections

MODULES and FILES Sections MODULES Section Only
¦ S The file is a system file. ¦ K Instructs Romimage.exe to assign a fixed virtual address to the DLL's public exports and runs the module in kernel mode rather than user mode. Drivers must run in kernel mode to have direct access to the underlying hardware.
¦ H The file is hidden. ¦ R Compress resource files.
¦ U The file is uncompressed. (The default setting for files is compressed.) ¦ C Compress all data in the file. If the file is already in RAM, it will be decompressed again into a new section of RAM, which results in higher RAM consumption.
¦ N The module is not trusted. ¦ P Do not check the CPU type on a per-module basis.
¦ D The module cannot be debugged. ¦ X Sign the module and include the signature in the ROM.
¦ M Signals that the kernel must not page the module on demand. (See Chapter 3 for more information on the effects of demand paging.)
¦ L Instructs Romimage.exe not to split the ROM DLL.

Conditional .bib File Processing It is important to note that .bib files support conditional statements based on environment variables and SYSGEN variables. You can set environment variables through catalog items, and then check these variables in IF statements in a .bib file to include or exclude certain modules or other files. For SYSGEN variables, use @CESYSGEN IF statements instead.

The MODULES and FILES listing in the previous section illustrates the use of @CESYSGEN IF and IF statements for processing conditions based on SYSGEN and environment variables. For example, the @CESYSGEN IF CE_MODULES_DISPLAY statement in the MODULES sections specifies that the BSP should automatically include the display driver if the OS design includes a display component. You can verify that Platform Builder adds the display component to the BSP automatically if you display the Catalog Items View in Visual Studio for an OS design that uses a display, as illustrated in Figure 2-5.

Figure 2-5 Core OS components that depend on the display item

Registry Files

Registry (.reg) files are used to initialize the system registry on the remote device. These files are almost identical to registry files of Windows desktop operating systems, except that the CE .reg files do not start with a header and version information. If you accidentally double-click a CE .reg file on your development computer and confirm that you want to add the settings to the desktop registry, a dialog box appears to inform you that the .reg file is not a valid registry script. Another difference is that CE .reg files can include conditional statements similar to .bib files, so that you can import registry settings according to the selected catalog items. The following snippet from the Platform.reg file of the Device Emulator BSP illustrates the use of preprocessing conditions.

; Our variables

#define BUILTIN_ROOT HKEY_LOCAL_MACHINEDriversBuiltIn

;#define PCI_BUS_ROOT $(BUILTIN_ROOT)PCI

#define DRIVERS_DIR $(_PUBLICROOT)commonoakdrivers

; @CESYSGEN IF CE_MODULES_RAMFMD

; @CESYSGEN IF FILESYS_FSREGHIVE

; HIVE BOOT SECTION

[HKEY_LOCAL_MACHINEinitBootVars]

'Flags'=dword:1 ; see comment in common.reg

; END HIVE BOOT SECTION

; @CESYSGEN ENDIF FILESYS_FSREGHIVE

; @CESYSGEN IF CE_MODULES_PCCARD

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

0

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

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