[Previous] [Contents] [Next]

romqnx

Convert a buildqnx image to a ROM image (QNX)

Syntax:

romqnx [options] buildqnx_image rom_image

Targets:

QNX 4

Options:

-c
Compress the RAM portion.
-d module#
Force this entire module into RAM. A value of 0 means all modules.
-R addr
The EPROM/Flash/SRAM address (the default is 15M).
-r addr
The RAM address (the default is 4K).
-v
Be verbose.

Description:

The romqnx utility takes an OS image produced by buildqnx and modifies it to make it suitable for placing in ROM or Flash. The resulting image consists of code and data for each module in the original buildfile. You must always copy the data portion of each module to RAM. You may execute the code portion in place (XIP) out of ROM or Flash, or you may copy it to RAM with the data.


Note: If your ROM or Flash is bank-switched, you must copy all code to RAM. You can execute only out of linearly mapped ROM or Flash.

Since you'll always be copying the data, it's advantageous to compress it in ROM or Flash and expand it into RAM. To do this, use the -c option. This approach typically results in significant Flash/EPROM savings.

Systems that can execute out of ROM or Flash often pay a performance penalty. It's not uncommon for ROM or Flash to have extra wait states or a narrow bus interface (8 or 16 bit). By default, romqnx sets up the image to execute out of ROM or Flash; by using the -d option, you can force any module to be copied to RAM. If your ROM or Flash is bank-switched, you must specify -d 0 to force all modules into RAM. If you build the system debugger (/boot/sys/Debugger) into the image, the debugger is always copied to RAM.

The romqnx utility needs to know the address of the ROM where the image will be placed and the address of the RAM where data (or code) will be copied. The default is 15M (0xF00000) for ROM and 4K (0x1000) for RAM.


Note: These addresses must be multiples of 4096 (0x1000), which is the page size of the processor.

If you specify -d 0 to copy all modules into RAM, the -R addr option is ignored.

Examples:

Build a ROM image for an embedded system in which the code runs out of ROM and the data is decompressed from ROM into RAM. The ROM is at 63M and the OS RAM data starts at the default address of 4K:

cd /boot
buildqnx build/386ex images/386ex
romqnx -c -R 0x3f00000 images/386ex images/386ex.rom

The same as above except that the Process Manager and Kernel are copied into RAM, which may be faster that the ROM:

cd /boot
buildqnx build/386ex images/386ex
romqnx -c -R 0x3f00000 -d 1 images/386ex images/386ex.rom

See also:

buildqnx


[Previous] [Contents] [Next]