定制带有模拟器且支持ActiveSync调试的WINCE5.0 SDK

目的:生成供Visual Studio和EVC开发WINCE5.0应用程序的SDK,且带有模拟器和直接连接设备的两种调试功能。

软件环境:WINCE5.0 Platform Builder

以下内容针对CPU为ARMV4I,其它CPU过程相似

 

一、除给自己设备build OS的BSP之后还需要另外一个BSP:“DeviceEmulatorBSP.msi”,这是微软提供的ARMV4I模拟器BSP,可以到官方网站上去下载。

 

二、 build一个模拟器镜像:

1、安装DeviceEmulatorBSP,安装完成后WINCE500/PLATFORM/Deviceemulator目录下会有一个Using the CE DeviceEmulator.rtf文件,其中详细介绍了如何创建带模拟器的SDK。

2、运行Platform Builder,新建一个Platform,我用的名字是Emulator。BSP选择Microsoft DeviceEmulator:ARMV4I,Design Template选择Mobile Handheld,Application & Media随意,Networking & Communications只选择Local Area Network(LAN)->Wired Local Area Network,其余都去掉。最后完成向导。

3. 如果要开发托管程序,添加Catalog View的Core OS->Windows CE Devices->Applications – End User->CAB File Installer/Uninstaller。

4. 添加ActiveSync(可选),在Catalog View的Core OS->Windows CE Devices->Applications – End User目录下。

5. 添加存储支持支持。Partition Driver和FAT。

  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。

6. 打开菜单Platform->Setting,这里有三个地方要设置:

  1) Build Options选项卡下,去掉Enable CE Target Control Support和Enable KITL;(如果不去掉可能会导致模拟器黑屏)

  2) Environment选项卡,添加环境变量CE_MODULES_SERIAL=1,这是用来将DMA添加进来;(这十分重要)

  3) Locale选项卡,用来添加你想要的语言支持,可改可不改。

7. 视情况添加其他所需的组件。

9. BuildOS->Sysgen。

最终生成nk.bin

三、build自己的BSP下的OS镜像,步骤基本同(二)(假定为MyPlatform)

四、生成SDK(参考Using the CE DeviceEmulator.rtf)

1. 运行SDK Wizard(Platform->SDK->New SDK),填写必要的信息之后,把支持的开发工具都勾上,完成。

2. 用记事本等工具打开/WINCE500/PBWorkspaces/MyPlatform/ExportSDK.sdkcfg

3.找到<PropertyBag NAME="DeviceEmulation">一段,添加如下信息:

<PropertyBag NAME="DeviceEmulation">
  <Property NAME="Default Image">1</Property>
  <PropertyBag NAME="1">
   <Property NAME="ImageName">My Emulator</Property> 
;(在VS上显示的模拟器的名字)
   <Property NAME="VMID">{6CB9C6E3-E576-4580-BC1E-ADED62B97FFB}</Property>
   <Property NAME="Default Skin"/>
   <Property NAME="Height">400</Property>
   <Property NAME="Width">240</Property>
   <Property NAME="BitDepth">16</Property>
   <Property NAME="Memory">128</Property>
   <Property NAME="Bin Dest">Emulator/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/PBWorkspaces/Emulator/Addfile</Property>

            <Property NAME="Destination">Emulation</Property>

            <Property NAME="Subfolders">0</Property>

        </PropertyBag>

    </PropertyBag>

C:/WINCE500/PBWorkspaces/Emulator/Addfile此路径是自己建立的,其中存放Emulator的nk.bin(此处仅放这一文件,否则生成SDK时会将这一目录下的内容全部压缩进去)

完成后保存文件。

4.Platform->SDK->Build SDK 等待完成。

五、安装SDK及配置模拟器(此部分参考Using the CE DeviceEmulator.rtf即可)

六、假设无法连接模拟器,关掉VS,删除C:/Documents and Settings/xxxxxx/Local Settings/Application Data/Microsoft/CoreCon/1.0下的文件(建议先备份一下)再打开VS并重新配置模拟器就可以连接。

 

文中提到的ExportSDK.sdkcfg可以到我的资源中下载,资源名:WINCE5.0 带模拟器且可以连接硬件设备调试的SDK配置文件,地址:http://download.csdn.net/source/1633048

 

 

  • 0
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 22
    评论
1、把下载后的DeviceEmulator模拟器文件夹放入D盘根目录。 2、安装DeviceEmulator中文版.exe 3、存储卡目录(自定),例:在C盘建一个文件夹SDMMC,这个文件夹相当于一体机的存储卡。 4、执行DE.exe,选择执行DE主程序:C:\Program Files\Microsoft Device Emulator\1.0\DeviceEmulator.exe 5、选择映像文件(CE50_ARM_CHS.bin) 或 4、把3.5/4.3/7寸模拟器.bat拷到桌面,双击运行即可。 ================================================================== 解压后操作步骤: 1、安装DeviceEmulator中文版.exe 2、执行DE.exe,选择执行DE主程序:C:\Program Files\Microsoft Device Emulator\1.0\DeviceEmulator.exe 3、选择映像文件(CE50_ARM_CHS.bin) 4、存储卡目录(自定) 我这里设置的是SDMMC 5、真正的WINCE系统出现了~~~ 市场上的导航仪都是WINCE系统哦,呵呵。。。 WINCE5.0模拟器调节分辨率方法: WINCE5.0模拟器可以改成任意尺寸和分辨率的。只是你不能用DE.exe来启动它。那个“启动助手”中缺少video参数的选项,如果想改变分辨率应该自已做一个批处理文件方更启动。 按装完“DeviceEmulator中文版.exe”后,将解压后的CE50_ARM_CHS.bin文件复制到C:\Program Files\Microsoft Device Emulator\1.0\里面。再将启动wince5模拟器.bat复制到同样的目录下。在该目录下运行“启动wince5模拟器.bat”。 320×240屏的(是3.5寸屏的),我设的是800*600,大点好,呵呵。。。自已修改“启动wince5模拟器.bat”中的相关数字就行了。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 22
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值