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
Invoking RTLoc
RTLoc Options
Configuration Files
Defining Target Hardware
Region Command
Virtual Command
FillRAM Command
Defining Program Location
Defining Program Options
Defining Boot Code Options
Creating Output Files
Initializing Target Hardware
The .LOC File
The Locate Process in Detail
Running a Program on the Target
Cross Debugging
Using an IDE
The RTTarget-32 API
Demo Programs
Advanced Topics
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
|
Region Command
The Region command defines the properties of a region of consecutive physical address space. The syntax is
Region = RegionName, Address, Size, MemType [,Access]
ParametersRegionNameA string with a name you wish to assign to this region. The only restriction on name usage is that no two regions can have the same name.
AddressA numeric value specifying the start address of the region.
SizeThe number of bytes the region occupies.
MemTypeCan have any one of the following values:
Value |
Meaning |
RAM |
The region contains RAM. RTLoc assumes that this region can be used for any part of a program requiring read only or read/write access. |
ROM |
The region contains ROM. RTLoc assumes that this region can only be used for read only data such as code. |
Device |
The region contains a device. RTLoc makes no assumptions about such regions. Use this memory type for video RAM, memory-mapped devices, etc. |
AccessCan be used to specify the type of access your program needs for the region. If not specified, RTLoc will assume Assign access:
Value |
Meaning |
NoAccess |
The region is inaccessible. RTLoc will issue a warning if you attempt to locate parts of your program in this region. |
SysRead |
The region cannot be accessed by the application, but the RTTarget-32 Boot Code has read only access. This access is useful for protected data such as the boot code itself. |
System |
The region cannot be accessed by the application, but the RTTarget-32 Boot Code has read and write access. This access should be used for protected data managed by the boot code (e.g., the boot data or the page table). |
ReadOnly |
The application will have read only access to this region. |
ReadWrite |
The application will have read/write access to this region. |
Assign |
RTLoc will assign appropriate access rights to parts of the region as they are allocated to program entities. For example, if a code section is located into this region, that part will be assigned read only access. If a data section is also located here, only the data section will be assigned read/write access. Unused parts of the region get NoAccess and - if the region consists of RAM - can be remapped using the FillRAM command. It is recommended to use Assign for all RAM and ROM regions. |
Access rights are checked statically by RTLoc and at run time by the CPU if paging is enabled (see section PageTable for details). RTLoc will make sure any access rights you have assigned are compatible with the respective memory type.
Examples for the Region command:
Region RealModeVectors 0 1k RAM NoAccess
Region BIOSDataArea 1k 3k RAM NoAccess
Region LowMem 4k 636k RAM Assign
Region ColorGraphic A0000h 64k Device NoAccess
Region MonoText B0000h 4k Device NoAccess
Region ColorText B8000h 4k Device ReadWrite
Region Ethernet D8000h 16k Device ReadWrite
Region BIOS F0000h 64k ROM NoAccess
Region HighMem 1M 3M RAM Assign
The above Region commands are typical for an AT class PC with 4 megabytes of memory. It assumes that no monochrome video hardware is installed (or shouldn't be used) and that the application will not use graphics mode.
Defining Target Hardware
Virtual Command
|