EDA驿站

去浮躁,求真知;重实干,勤与研

  博客园  :: 首页  :: 新随笔  ::  ::  :: 管理

本文来自CSDN博客,http://blog.csdn.net/Veabol/archive/2009/09/04/4520154.aspx

 

目的:生成供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并重新配置模拟器就可以连接。

posted on 2009-10-31 21:58  易学  阅读(762)  评论(0编辑  收藏  举报