Home |
RTTarget-32 Programming Manual Running Win32 Programs without Win32 Virtual Command Running a Program on the Target Compiling and Linking with On Time RTOS-32 |
Virtual CommandThe Virtual command defines a region of memory which does not exist physically, but will be created by remapping physical memory: Virtual = RegionName, Address ParametersRegionNameA string with a name you wish to assign to the virtual region. AddressA numeric value specifying the start address of the virtual region. It must be page (4096 byte) aligned. Since no two regions (either physical or virtual) may overlap, it is recommended to use an address higher than any physical memory on the target. Virtual regions initially have a size of zero and no physical memory is associated with them. As program entities are located to the region, some physical memory is remapped from a physical region to successively build the virtual region. Virtual regions can also acquire memory through the FillRAM command. The advantage of virtual regions is that they can consist of different physical memory portions (for example, a mixture of RAM and ROM). The address space created with a virtual region is independent of the underlying physical memory structure. Paging must be enabled using the Locate PageTable command to be able to use virtual regions (see section PageTable for details). All program entities to be allocated to a virtual region must be page-aligned. The only entities supported in virtual regions are Section, NTSection, Stack, Heap, File, and Nothing. Examples for the Virtual command:Region LowMem 4k 636k RAM Assign Region MyEPROM F0000h 64k ROM NoAccess Region HighMem 1M 3M RAM Assign Virtual VMem 4M FillRAM VMem Locate NTSection CODE VMem->MyEPROM Locate NTSection DATA VMem->HighMem Locate Stack Stack VMem->LowMem 16k Locate Heap Heap VMem Three physical and one virtual regions are defined. The first three Locate commands place entities in the virtual region and also specify the physical region the memory should be taken from. The heap does not specify a physical region, but since region VMem receives all unused RAM through the FillRAM command, all available memory will be allocated to the heap.
|