How to Customize Memory on a CEPC (Windows CE 5.0)
For CEPCs, x86-based standard development boards (SDBs), and ARM-based SDBs, the OEM adaptation layer (OAL) statically maps physical memory addresses to virtual memory addresses. By default, the OEMAddressTable definition, which resides in the OAL, maps 64 MB of RAM.
If you want your run-time image to use the exact amount of RAM on your CEPC, update OEMAddressTable and the Config.bib file. For example, if your CEPC contains 96 MB of RAM, update OEMAddressTable and Config.bib accordingly. Additionally, you can use this procedure for simulating different amounts of RAM on your CEPC. For other microprocessors, the CPU and kernel define this mapping.
When the OAL starts, operating system (OS) memory allocation code is not initialized. OEMAddressTable provides an initial memory map so that initialization code in the OAL and interrupt service routines (ISRs) can access memory-mapped devices. You should edit OEMAddressTable as appropriate for your CEPC.
If you have unmapped RAM after boot time, applications can map the RAM by calling the CreateStaticMapping function.
You can extend this static mapping in the OAL after boot time by calling the NKCreateStaticMapping function.
Hardware and Software Assumptions
- You have set up a CEPC. For more information, see How to Set Up a CEPC.
- Your run-time image resides and executes from a continuous region of RAM.
To track your progress in the following table, select the check box next to each step.
Step | Topic | |
---|---|---|
1. Configure your run-time image.
|
How to Configure and Build a Run-Time Image for a CEPC | |
2. To edit OEMAddressTable, open the Oeminit.asm file.
|
Not applicable | |
3. Find the definition for OEMAddressTable, which begins near line 250.
The following code example shows the default OEMAddressTable definition for an x86 microprocessor.
The default RAM size in the example is 04000000h, which is 64 MB. |
OEMAddressTable | |
4. Adjust the size entry of OEMAddressTable to match the amount of RAM you intend to use on your target device.
The size entry must be 4 MB aligned and you cannot have overlapping addresses.
For example, if your CEPC has 128 MB of RAM, change the size entry from 04000000h to 08000000h. |
Not applicable | |
5. Verify that the last line in OEMAddressTable is all zeros.
This marks the end of OEMAddressTable. The following code example shows the default last line in the OEMAddressTable definition.
|
Not applicable | |
6. Save Oeminit.asm and build the CEPC OAL.
Because the CEPC OAL is in _PUBLICROOT, you must manually perform the build and Sysgen phases of the build process.
|
Not applicable | |
7. To take advantage of the new RAM mapping, update the Config.bib file for your run-time image. | Updating Config.bib with a New RAM Mapping | |
8. Build the run-time image.
|
Building a Run-Time Image | |
9. Download the run-time image to the CEPC. | Downloading a Run-Time Image | |
10. View the available memory on the CEPC with the Remote System Information tool. | Remote System Information |
See Also
Send Feedback on this topic to the authors