On Time RTOS-32 Documentation
Welcome
RTTarget-32
RTKernel-32
RTKernel-32 Programming Manual
Introduction
Multitasking, Real-Time, and RTKernel-32
Module RTKernel-32
Alternate APIs for RTKernel-32
Supplemental Modules
RTKernel-32 Drivers
Demo Programs
Advanced Topics
RTKernel-32's Debug Version
How to Create Threads
Interrupt Handling
Avoid Polling
Preemptive or Cooperative Multitasking?
Waiting for Several Events
Avoid Large Message Types
Mutual Exclusion
Avoid Time Slicing
Cyclic Tasks (Timer)
Priorities
Starting Objects' Methods as Tasks
Performance and Interrupt Response Times
Multiprocessor Applications
OpenMP
Task Switches in Cooperative Scheduling
Writing Custom Kernel Drivers
Using the FPU in Interrupt Handlers
Typical Error Sources
Error and Information Messages
RTKernel-32 Reference Manual
RTFiles-32
RTIP-32
RTPEG-32
RTUSB-32
|
Writing Custom Kernel Drivers
RTKernel-32 is delivered with drivers suitable for PC compatible or similar systems running under RTTarget-32. Nevertheless, thanks to its driver structure, it is easily possible to run RTKernel-32 on other systems. However, modifications to the existing drivers or new drivers might be required.
The documentation for all drivers in section RTKernel-32 Drivers details each driver's hard- and software requirements. If you cannot meet the requirements for a complete set of drivers, one or more drivers must be replaced. To accomplish this, the recommended method is to copy the source files of the driver most closely matching the desired functionality and then modifying the copy as required. Each driver's interface is documented in the respective driver header file. For example, the system driver's functionality is detailed in file Rtksys.h.
The following table summarizes the source files required to build the drivers delivered with RTKernel-32. All driver source files are located in directory Driver\Rtk32:
Type |
Name |
Source Files |
Comments |
System |
SYSSTD |
SYSSTD.C
HALT386.ASM |
No TLS support.
Relies only on C/C++ RTL |
System |
SYSRT32 |
SYSRTT32.C
HALT386.ASM
FSSEG.ASM
HALT386.ASM
RTTDBG.ASM
SYSRTMP.C |
Requires RTTarget-32.
TLS, Win32, and MP support
limits number of tasks to 8192. |
Interrupt |
IRQRT32 |
IRQCALL.OBJ
IRQRTT.C
I8259.ASM
DUMISRS.ASM
IFLAG.ASM |
Support for Preemptions.
Requires RTTarget-32 and 8259A interrupt controller(s).
Supports 16 IRQs. |
Clock |
CLKPC |
CLKHRTPC.ASM |
Requires 8253 timer.
Incompatible with drivers CLKPC and HRTPC. |
Clock |
CLKHRTPC |
CLKHRTPC.ASM |
Requires 8253 timer.
Combined Clock and high-resolution timer driver.
Incompatible with drivers CLKPC and HRTPC. |
Clock |
CLKAPIC |
CLKAPIC.C |
Requires Pentium and APIC. |
Clock |
CLKVMF |
CLKVMF.C |
Requires RTVmf-32. |
Clock |
CLKRTH |
CLKRTH.C |
Requires RTRth-32. |
Highres. Timer |
HRTNULL |
HRTNULL.ASM |
Does not implement any timer services. |
Highres. Timer |
HRTPC |
CLKHRTPC.ASM |
Requires 8253 timer.
Incompatible with drivers CLKHRTPC and CLKPC. |
Highres. Timer |
CLKHRTPC |
CLKHRTPC.ASM |
Requires 8253 timer.
Combined Clock and high-resolution timer driver.
Incompatible with drivers CLKPC and HRTPC. |
Highres. Timer |
HRTPENT |
HRTPENT.ASM |
Requires Pentium or higher.
Must be calibrated at run-time. |
Highres. Timer |
HRTSC520 |
HRTSC20.ASM |
Requires AMD SC520 CPU. |
Highres. Timer |
HRTPM |
HRTPM.C
PMTASM.ASM |
Requires ACPI BIOS and Pentium or higher CPU. |
Highres. Timer |
HRTHPET |
HRTHPET.C
HPETASM.ASM |
Requires ACPI BIOS and Pentium or higher CPU. |
Highres. Timer |
HRTVMF |
HRTVMF.C |
Requires RTVmf-32 |
Floating Point |
FLTNULL |
FLTNULL.ASM |
Does not swap floating point context. |
Floating Point |
FLT387 |
FLT387.ASM |
Requires 387 or 100% compatible emulator. |
Floating Point |
FLTPII |
FLTPII.ASM |
Requires 387 or higher CPU. |
Floating Point |
FLTEMUMT |
FLTEMUMT.ASM |
Requires 387 or higher or reentrant emulator. |
Memory |
MEMCHEAP |
CHEAP.C |
Uses malloc/free.
Does not support RTKernel-32 calls before function main has been called. |
Memory |
MEMSTH |
STHEAP.C
STHDATA.C
STHCALL.C |
Static heap in data segment.
Supports additional function MEMSTHeapInfo. |
Memory |
MEMW32 |
MEMW32.C |
Uses Win32 Heaps. |
Memory |
MEMSTCH |
STHEAP.C
STHDATA.C
STCHEAP.C |
Combined MEMCHEAP and MEMSTH. |
Source Code |
SRCNULL |
SRCNULL.C |
Does not implement source code position information. |
Source Code |
SRCTDS |
READTDS.C
TDSGETP.C |
Requires read-only access to a file. |
Source Code |
SRCMAP |
READMAP.C
TDSGETP.C |
Requires read-only access to a file. |
Subsequently, the new driver should be linked after library Rtk32[s].lib or Rtk32mp[s].lib and before any driver libraries delivered with RTKernel-32.
Advanced Topics
Task Switches in Cooperative Scheduling
Using the FPU in Interrupt Handlers
|