During actual development, it is found that Windows CE. Net supports a maximum of 64 MB memory by default. The default value is 32 m, and the maximum value is 64 M. You can set it in the setting of Pb:
However, in actual applications, the demand for memory often exceeds 64 MB, and the current Memory price is already very cheap. It is very common to use large memory, after checking the Pb help and a burst of exploration, I found the Windows CE modification. net, you can use the method of memory larger than 64 m, this article takes m as an example. The main method is as follows:
Part 1: % _ winceroot % \ public \ common \ oak \ CSP \ i486 \ Inc \ PC in the installation directory of Pb. h, modify PC. in H, the cepc_extra_ram_size macro is the total memory size minus config. the memory size listed in bib. 04000000 M memory is based on the original 0x02400000 plus 0 x.
Modify the configuration in config. bib as follows:
Step 2: Go to % _ winceroot % \ public \ common \ oak \ CSP \ i486 \ oal \ oeminit in the installation directory of Pb. in ASM, open oeminit. ASM file, modify "_ oemaddresstable :". _ Oemaddresstable is a key memory ing description table that mainly describes the ing between physical memory and virtual memory. Each table entry has three Dwords, which are (va, Pa, cbsize), where va is the starting address of the virtual memory, usually 80000000 H, PA is the starting address of the physical memory, generally 0, cbsize is the size of the physical memory supported by the CE kernel, this DWORD is our most important concern, and its unit is byte. It should be noted that the cbsize must be a multiple of 4 M bytes, because the memory size detected in the Windows CE. Net kernel is measured in 4 M bytes. By default, the cbsize system is 04000000 H and its size is 64 m. We can change it to 8000000 h to support m of memory.
Step 3: Re-buildi486oal. Lib. Access the CMD command line from the Pb menu (Windows command line does not work, you must go to the build menu in Pb) enter the % _ winceroot % \ public \ common \ oak \ CSP \ i486 \ oal directory in the installation directory of Pb.
Run the build-C and sysgen i486oal commands. Run the following commands in the % _ targetplatroot % \ kernel \ buildexe Directory: Set wincerel = 1; Build-C; makeimg.
Step 4: re-build platform in the build menu of Pb, and make image to re-generate NK. Bin.
The above four windows MB memory is supported. You can use this method to modify other larger memory.