一、生成OS
1. 安装Windows CE 5.0(记得CPU类型里把ARMV4I选上)装完之后装DeviceEmulatorBSP.msi,这是ARMV4I模拟器的BSP。
2. 运行Platform Builder,新建一个Platform,给你的新Platform取一个名字,我这里取为MyCEEmu。BSP选择Microsoft DeviceEmulator:ARMV4I,Design Template选择Mobile Handheld,Application & Media随你选,Networking & Communications只选择Local Area Network(LAN)->Wired Local Area Network,其余都去掉。最后完成向导。
3. 添加网卡。在Catalog View的Device Drivers->Networking->Local Area Networking (LAN) devices目录下,把NE2000-compatible(PCMCIA car)添加进来。
4. 如果要开发托管程序,添加Catalog View的Core OS->Windows CE Devices->Applications – End User->CAB File Installer/Uninstaller。
5. 添加ActiveSync(可选),在Catalog View的Core OS->Windows CE Devices->Applications – End User目录下。
6. 添加闪存支持。有三个部件:SMFlash,Partition Driver和FAT。
先转到Catalog View:
SMFlash在BSP->Microsoft Device Emulator->Storage Drivers->MSFlash Drivers->SmartMedia NAND Flash Driver (SMFLASH),
Partition Driver在Core OS->Windows CE Devices->File Systems and Data Store-> Storage Manager->Partition Driver
FAT在Core OS->Windows CE Devices->File Systems and Data Store->Storage Manager->FAT File System。
7. 打开菜单Platform->Setting,这里有三个地方要设置:
1) Build Options选项卡下,去掉Enable CE Target Control Support和Enable KITL;
2) Environment选项卡,添加环境变量CE_MODULES_SERIAL=1,这是用来将DMA添加进来;
3) Locale选项卡,用来添加你想要的语言支持,可改可不改。我这里先Clear All然后选了中文(中国)和英语(美国)。Default Language选为中文。
8. 视情况添加其他所需的组件。我添加了MSXML的支持。
9. BuildOS->Sysgen。
二、生成SDK
1. 运行SDK Wizard(Platform->SDK->New SDK),填写必要的信息之后,把支持的开发工具都勾上,完成。下面是配置SDK(选择Platform->SDK->Configure SDK),要是觉得没有什么好配置的也可以跳过。
2. 打开ExportSdk.sdkcfg文件(先做好备份,这个文件一般在项目根目录下,就是在New Platform Wizard的第2步中所指定的目录,默认是%_WINCEROOT%\PBWorkspaces下)。这是一个XML格式的文本文件,找到这两行:
<PropertyBag NAME="DeviceEmulation">
</PropertyBag>
把这两行替换为如下的片断:
<PropertyBag NAME="DeviceEmulation">
<Property NAME="Default Image">1</Property>
<PropertyBag NAME="1">
<Property NAME="ImageName">MyCEEmu</Property>
<Property NAME="VMID"></Property>
<Property NAME="Default Skin"/>
<Property NAME="Height">240</Property>
<Property NAME="Width">320</Property>
<Property NAME="BitDepth">16</Property>
<Property NAME="Memory">128</Property>
<Property NAME="Bin Dest">Emulation\nk.bin</Property>
<Property NAME="Fixed Screen">1</Property>
<Property NAME="CpuName">ARMV4I</Property>
<Property NAME="DPIX">96</Property>
<Property NAME="DPIY">96</Property>
<Property NAME="SupportRotation">0</Property>
<Property NAME="Enabled">1</Property>
<Property NAME="Bin Path"></Property>
<Property NAME="Ethernet">1</Property>
<Property NAME="Ports">1</Property>
<Property NAME="AdditionalParameters"></Property>
<PropertyBag NAME="Skins"/></PropertyBag>
</PropertyBag>
<PropertyBag NAME="Added Files">
<PropertyBag NAME="{3B388597-0924-4102-ADFA-2519D2C3E11B}">
<Property NAME="Source">C:\WINCE500\MyCEEmu\ReleaseImage</Property>
<Property NAME="Destination">Emulation</Property>
<Property NAME="Subfolders">0</Property>
</PropertyBag>
</PropertyBag>
......
更多内容请点击查看全文:http://www.hzlitai.com.cn/article/ARM9-article/system/1696.html