Home |
RTTarget-32 Programming Manual Running Win32 Programs without Win32 Running a Program on the Target Choosing a Locate Method Running with or without Paging Installing Hardware Interrupt Handlers Catching NULL Pointer Assignments Running without Run-Time System Configuration for Debug and Release Builds Loading DLLs through a File System Using the MetaWINDOW Graphics Library Custom MP Floating Pointer Structure Compiling and Linking with On Time RTOS-32 |
Choosing a Locate MethodRTLoc offers a rich set of options to map your application to the target hardware. While these options provide a high degree of flexibility, you must decide how to map your program. Frequently, several different approaches are possible with varying advantages and disadvantages. Some of the required design decisions are discussed below. Locate Section or NTSectionThe only major disadvantage of Locate NTSection is that all sections must be placed in the same region. Thus, for ROMable applications, all sections having an image must be copied to RAM, which duplicates at least the code section, and possibly other read-only sections. Another problem could be that there is no region large enough to contain the whole program. However, both problems can be solved by using a virtual region. An advantage of this approach is the Win32 compatible fixup method. Locate NTSection is required if you want to debug your program. The disadvantage of Locate Section is the different mapping algorithm required for fixing-up. Since this fixup method can fail (though only in very rare circumstances), some programs cannot be mapped in this way. The advantage is its high degree of flexibility. Locate Section sections can be located in different regions, making ROMable applications possible without copying the code or other read-only sections. Paging is not required to fully exploit the mapping flexibility of Locate Section. NTSection should be used whenever possible. Not all programs can run with Locate Section, since the compiler or run-time system may rely on the way Win32 loads programs. If you want to use Locate Section anyway, make sure the program runs with Locate NTSection first. If it works with Locate NTSection but not with Locate Section, then you will probably not be able to use Locate Section. Physical or Virtual RegionsThe disadvantages of virtual regions are the requirement to use paging, a minimum alignment of 4096 bytes, and the possible need for the page table to be enlarged to accommodate a potentially larger linear address space. Virtual regions have no advantages if the program is mapped with Locate Section. However, if Locate NTSection is used, there are two circumstances that could make use of a virtual region necessary: if the program is to run completely in RAM and no physical RAM region is large enough to contain the program, or if parts of the program should reside in ROM. Running with or without Paging
|