When you update either Platform.bib or Project.bib to include a file, specify the following items:
- Name: The source file name to add to the run-time image
- Path: The location of the file after the build process copies it to the flat release directory
- Memory: The region listed in the MEMORY section that is defined as RAMIMAGE type
Note: |
|---|
| Each run-time image has only one RAMIMAGE region. |
- Type: The file attributes to set for the file in the run-time image
In the MEMORY section of the .bib file, use the Address and Size parameters to define the section of memory devoted to RAM and also ROM. The Address parameter specifies the address where the RAM section starts. Together, the Address and the Size parameters indicate the address where the RAM section ends.
In the MEMORY section, the run-time image must be defined as RAMIMAGE type by using the Type parameter. The RAM memory region must be defined as RAM type.
For more information, see MEMORY Section.
To configure the .bib files, you must specify a data format for the run-time image. After you decide on a data format for your run-time image, define this format in the CONFIG section of the Config.bib file by setting values for ROMSIZE, ROMSTART, and ROMWIDTH. For more information about data formats, see Run-Time Image Files and CONFIG Section.
The following illustration shows the relationships among the ROMSTART value, the ROMSIZE value, and the memory table parameters for the run-time image memory sections.
Romimage.exe outputs a binary image (.bin) file. The .bin files contain information about the run-time image that the boot loader uses to start the run-time image. The .bin files are organized into logical units, which are known as records, and exist only in the RAMIMAGE section of memory.
BIB Entry Example #1
The following code example shows an entry in Project.bib.
MODULES
; Name Path Memory Type
; -------------- --------------------------------------
IF IMGINCLUDEAPPS
myapp.exe $(_FLATRELEASEDIR)\myapp1.exe NK SH
ENDIF
In this example, if you set a user-defined environment variable, IMGINCLUDEAPPS, before you run Makeimg.exe, Makeimg.exe processes this entry by including the MyApp1.exe input file as the MyApp.exe output file. Then it loads the MyApp.exe output file into a MEMORY region named NK as a file. The S and H flags are set to indicate that myapp.exe is both a system file and a hidden file.
BIB Entry Example #2
The following code example shows an entry in Project.bib.
MODULES
; Name Path Memory Type
; -------------- --------------------------------------
IF IMGNODEBUGGER !
myproj.exe $(_FLATRELEASEDIR)\myproj.exe NK S
ENDIF
In this example, if you did not define IMGNODEBUGGER, Makeimg.exe processes this entry by including the Myproj.exe file and loading it into the NK MEMORY region. The "S" flag is set to indicate that myproj.exe is a system file.
For more information on the syntax of the IF statements in the previous examples, see Preprocessing Using Romimage Conditionals.
The remainder of this topic describes the flags that you can use in the MODULES and FILES sections.