Compartilhar via


How to Customize Memory on a CEPC (Windows CE 5.0)

Send Feedback

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.
Note   It is not necessary to perform a run-time image build now. You will perform a run-time image build in step 8.
How to Configure and Build a Run-Time Image for a CEPC
2. To edit OEMAddressTable, open the Oeminit.asm file.
  • Navigate to %_WINCEROOT%\Public\Common\OAK\CSP\x86\OAL.
  • 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.

_OEMAddressTable:
  dd  80000000h,  0,  04000000h
; FLASH and other memory, if any
; dd  FlashVA,  FlashPA,  FlashSize
  dd  0,  0,  0

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.

  • In case you need to revert to the original line of code that contains the RAM size, copy the line of code you will edit, paste the line of code directly above or below the original line of code, and place the ';' delimiter at the beginning of the original line of code.

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.

  dd  0,  0,  0
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.

  • From the Build OS menu, choose Open Release Directory.
  • Navigate to %_WINCEROOT%\Public\Common\OAK\CSP\x86\OAL.
  • In the Build window, type build and press ENTER.
  • Type sysgen i486oal and press ENTER.
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.
  • From the Build OS menu, choose Build and Sysgen. Verify that Copy Files to Release Directory After Build and Make Run-Time Image After Build are selected.
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

How-to Topics

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.