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
Device Management
Configuration Files
Compiling and Linking
Run-Time Requirements
Debugging
Release Notes
RTRth-32
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 (named Rtos-32.config in all of our demo programs) is passed as a parameter to RTOS32Win command line program UploadRtos.exe. It describes the properties of the virtual machine to host the On Time RTOS-32 programs.
The second configuration file (called VmfTarget.cfg in our demos) describes the properties of the virtual machine to the RTTarget-32 locator RTLoc. These two files must match. In particular, the following values are present in both files and must be identical in both:
- MemoryStartAddress. (default: 4000000 hex, 64M). This value specifies the address in the physical address space where the VM will start. This value should usually not be changed.
- MemorySize. (default: 800000 hex, 8M). Number of bytes of physical RAM assigned to the VM, starting at address MemoryStartAddress. 8M is large enough to run all On Time RTOS-32 demo programs, but real applications may need more. In this case, please increase MemorySize in both files Rtos-32.config and VmfTarget.cfg. This value does not need to be identical in Rtos-32.config and VmfTarget.cfg, but the value specified in VmfTarget.cfg must not be larger than the corresponding value in Rtos-32.config. Thus, it is possible to assign more RAM (and thus more heap space) to a VM without rebuilding the application program.
- VmfAnchorOffset. (default: 8000 hex, 32k). Offset within the VM where On Time RTOS-32 will find data about the RTOS32Win run-time system. This value should usually not be changed.
- ImageOffset. (default: 10000 hex, 64k). Offset within the VM where the On Time RTOS-32 program image (BIN file) will be loaded. This value should usually not be changed.
- EntryPointOffset. (default: 10000 hex, 64k). Address within the VM where execution will start. This address must hold the RTOS32WinSig file followed by the BootVector. This value must be identical with ImageOffset and should usually not be changed.
In addition, VmfTarget.cfg contains two values (VMF_FMWK_DATADESC_SIZE and VMF_ANCHOR_DESC_SIZE) which must match the corresponding values in header file VmfInterface.h (low level API of the RTOS32Win run-time system).
VmfTarget.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 MemorySize, though it does not have to. If MemorySize 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 RTOS32Win:
- A ReadWrite Region named VmfFmwData with size VMF_FMWK_DATADESC_SIZE must be present at address MemoryStartAddress.
- A ReadWrite Region named VmfAnchorDesc with size VMF_ANCHOR_DESC_SIZE must be present at address VmfFmwkData.End.
- The Init directive must be used to define an Init function. The Init function is mandatory and must call at least function RTVmfInit.
The following requirements must be fulfilled when locating a self-booting On Time RTOS-32 program for RTOS32Win:
- At least the following BOOTFLAGS must be applied: BF_NO_A20, BF_NO_PCTIMER, BF_NO_SLAVE_PIC, BF_NO_MASTER_PIC, BF_NO_PCI_BIOS. 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 Rtos32WinSig must be located at address MemoryStartAddress+EntryPointOffset.
- File Rtos32WinSig 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 Rtos32WinSig file.
Config file VfmTarget.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.
File Rtos-32.config contains value ProcessorMask in section [Rtos]. It specifies which CPUs are available for On Time RTOS-32. At least one bit of an existing CPU core must be set. By default, this value is 1 (bit zero set) which executes On Time RTOS-32 program in shared core mode. If your target has more than one core, it is recommended to change this configuration for exclusive core operation (i.e., run Windows and On Time RTOS-32 on disjoint sets of CPU cores).
It is recommended to use the configuration files included with our examples as templates.
RTVmf-32
Device Management
Compiling and Linking
|