On Time RTOS-32 Documentation
Welcome
RTTarget-32
RTTarget-32 Programming Manual
Introduction
Running Win32 Programs without Win32
The i386 Microprocessor
RTLoc: Locating a Program
Running a Program on the Target
Cross Debugging
Using an IDE
The RTTarget-32 API
Demo Programs
Advanced Topics
Choosing a Locate Method
Running with or without Paging
Running at CPL 0 or 3
Installing Hardware Interrupt Handlers
Catching NULL Pointer Assignments
Catching Stack Overflows
Running without Run-Time System
Avoid Repeated Downloads
Configuration for Debug and Release Builds
Using Data Compression
Using DLLs through RTLoc
Loading DLLs through a File System
RAM File System
Installable File System
Multithread Applications
Using the MetaWINDOW Graphics Library
Using the 387 Emulator
Using Non-Volatile Memory
APIC Mode
Multiprocessor Applications
Custom MP Floating Pointer Structure
RTVmf-32
RTRth-32
Device Management
Configuration Files
Compiling and Linking
Run-Time Requirements
Debugging
Performance Optimizations
Compiling and Linking with On Time RTOS-32
Redistributable Components of RTTarget-32
RTLoc Error Messages
RTTarget-32 Reference Manual
RTKernel-32
RTFiles-32
RTIP-32
RTPEG-32
RTUSB-32
|
Configuration Files
There are 3 configuration files to be considered.
The first (typically named Rtos-32.txt) is used by the Real-Time Hypervisor to configure the virtual machine to host On Time RTOS-32. Here is a simple example for the case On Time RTOS-32 runs stand alone:
# RTH CONFIG
[/OS/0]
"name" = "RTOS-32"
"boot_priority" = uint32: 1
"memory_size" = uint64: 0x2000000
"image_location" = uint32: 0x2000000
[/OS/0/RUNTIME/0]
"image_0" = "/rts/RTOS-32.BIN"
[/IRQ]
"default" = uint32: 0
[/PCI]
"default" = uint32: 0
The required entry in GRUB's menu.lst file would look like this:
title Real-Time Hypervisor - RTOS-32
root (hd0,0) # set root to first harddisk, first partition
kernel /rts/rthi386 # load and start Hypervisor
module /rts/rthCtrl.out # load control module
module /rts/license.txt # load license key supplied by Real-Time Systems
module /rts/RTOS-32.txt # load configuration file
module /rts/RTOS-32.BIN # RTOS-32 image
The second configuration file (called RthTarget.cfg in our demos) describes the properties of the virtual machine to the RTTarget-32 locator RTLoc. RthTarget.cfg and Rtos-32.txt must match. In particular, the following values are present in both files and must be identical in both:
- image_location. (default: 0x2000000, 32M). This value specifies the address in the physical address space where the VM will start. This value should usually not be changed. However, it must be changed if several instances of On Time RTOS-32 are to be executed simultaneously. Each instance needs its own unique image_location.
- memory_size. (default: 0x0800000, 8M). Number of bytes of physical RAM assigned to the VM, starting at address image_location. 8M is large enough to run all On Time RTOS-32 demo programs, but real applications may need more. In this case, please increase memory_size in both files Rtos-32.txt and RthTarget.cfg. This value does not need to be identical in Rtos-32.txt and RthTarget.cfg, but the value specified in RthTarget.cfg must not be larger than the corresponding value in Rtos-32.txt. Thus, it is possible to assign more RAM (and thus more heap space) to a VM without rebuilding the application program.
RthTarget.cfg also contains value MAX_BIN_FILE_SIZE (default: 4M) which defines the largest BIN file which can be loaded. Typically, this value should be about half of memory_size, though it does not have to. If memory_size is modified, it is recommended to also adjust MAX_BIN_FILE_SIZE.
The following requirements must be fulfilled when locating any On Time RTOS-32 program for the Real-Time Hypervisor:
- A ReadWrite Region named RTHPrivate with size RTHReserved (64k) must be present at address image_location.
- The Init directive must be used to define an Init function. The Init function is mandatory and must call at least function RTRthInit.
The following requirements must be fulfilled when locating a self-booting On Time RTOS-32 program for the Real-Time Hypervisor:
- At least the following BOOTFLAGS must be applied: BF_NO_A20, BF_NO_PCTIMER, BF_NO_SLAVE_PIC, BF_NO_MASTER_PIC. In addition, flags BF_NO_KEYBRD should be applied unless the PS/2 port keyboard has been assigned to On Time RTOS-32.
- The 16-byte file RthSig must be located at address image_location+RTHReserved.
- File RthSig must be followed by the BootVector.
- The Boot Vector must be followed by the BootCode PMBOOT.EXE.
- A BinFile must be created starting at the address of the RthSig file.
Config file RthTarget.cfg defines two regions for the application: RTOSImage and RTOSRAM. The third configuration file (which has the name of each respective demo plus ".cfg") then locates all program entities with an image into region RTOSImage and all others into region RTOSRAM. The created BIN file comprises region RTOSImage.
It is recommended to use the configuration files included with our examples as templates.
RTRth-32
Device Management
Compiling and Linking
|