EBox4300 Dev Start

EBox4300 Dev Start

EBOx4300ICOP Technology Inc.出的一款针对WinCE学习的jumpstart kit, 同时也是imagine cup-embedded的指定硬件平台。下面简单介绍一下开发环境的安装和一个简单托管代码工程的调试。

一、开发环境安装和配置

1.      Visual Studio 2005

2.      Visual Studio 2005 SP1

3.      Visual Studio 2005 SP1 update for Vista(如果是XP系统,就可以跳过这步)

4.      Windows Embedded CE 6.0 Platform Builder

注意:由于EBox4300CPUx86结构的,所以安装Windows Embedded CE 6.0 Platform Builder时,必须选上x86

5.      Windows Embedded CE 6.0 SP1

6.      Windows Embedded CE 6.0 R2

7.      ICOP_eBox4300_60CS BSP

8.      eBox4300_WINCE600_SDK

9.      VS2005 CoreCon Component Installation

CoreConVS2005CE Devices建立连接的工具,用来下载程序进行调试,是非常重要的工具。

二、CE6.0 OS design

1.       新建一个platform builder for CE6.0类型的工程,在OS Design Wizard – Board Support Packages (BSPs) 中选择ICOP_eBox4300_60CS: x86

2.       Design template中选择Industrial device模板

3.       Design template Variant中选择internet application模板

4.       Applications & Media里选中以下选项

NET Compact Framework 2.0

Internet Explorer 6.0

Windows Media Audio/MP3

Windows Media Player Application

Windows Media Player OCX

Windows Media Video/MPEG-4 Video

 

5.       Networking & Communications 里使用默认设置

 

三、定制并且build OS

1.       VS2005IDE中的View | Other Windows | Catalog Items , 添加或者删除相应的模块来完成OS定制. 确保以下选项:

Third Party | BSP | ICOP_eBox4300_60CS: x86 |Device Drivers |VIA CN/CX Display Driver

Third Party |BSP | ICOP_eBox4300_60CS: x86 |Device Drivers | VIA HD Audio Driver

Third Party |BSP | ICOP_eBox4300_60CS: x86 |Device Drivers | VIA UAM3059 Audio Driver

Third Party | ConMan_x86 Files Component

Core OS | CEBASE | Applications-End User | CAB File Installer/Uninstaller

Core OS | CEBASE | Core OS Services | USB Host Support | USB Storage Class Driver

Core OS | CEBASE | Applications and Services Development | .NET Compact Framework 2.0

Core OS | CEBASE | Applications and Services Development | OS Dependencies for .NET Compact Framework 2.0

Core OS | CEBASE | File Systems and Data Store | File System – Internal | RAM and ROM File System

Core OS | CEBASE | File Systems and Data Store | Registry Storage | Hive-based Registry

 

2.       build配置. 打开Configuration Manager ,选择ICOP_eBox4300_60CS x86 Release (release版本占用比较小的空间).Configure OS Design Project Properties – Build Options ,确保选中Enable eboot space in memory Enable KITL. 由于开始我没有选择KTIL,结果在进行application写完,想要调试的时候,连接不上device.

3.       Configure OS Design Project Property – Environment Variables ,加入环境变量如下:

IMGRAM512 =1;

PRJ_ENABLE_FSREGHIVE = 1;

PRJ_BOOTDEVICE_ATAPI=1;

PRJ_ENABLE_FSMOUNTASROOT = 1

 

4.       如果想要配置静态的IP地址,可以通过写注册表来实现.

[HKEY_LOCAL_MACHINE"Comm"PCI"RTL81391"Parms"TcpIp]

"EnableDHCP"=dword:0

"DefaultGateway"=multi_sz:"192.168.2.1"

"UseZeroBroadcast"=dword:0

"IpAddress"=multi_sz:"192.168.2.232"

"Subnetmask"=multi_sz:"255.255.255.0"

OK,最后选择build solution.等待一段时间以后,可以在相应的路径下找到NK.bin的系统镜像文件.

 

四、连接EBox4300并运行OS

1.       Target | Connectivity Options | Target Device Connectivity Options , 添加新设备EBox4300, 并且选择Ethernet方式下载和调试.

 

2.       启动EBox4300,可以看到如下启动选项:

1. Load nk.bin OS image from local storage

2. Load OS image from development station with DHCP service

3. Load OS image from development station with Static IP 192.168.2.232

4. Clean Boot (no commands)

由于我的电脑和EBox4300都在DHCP服务的同一个网段内,于是选择第二项开始.

3.       点击Target | Attach Device. OS镜像下载到EBox4300RAM中运行.

 

4.       耐心等待一会儿, 就可以看到OS启动.

 

 

 

 

五、生成并安装Windows Embedded CE6.0 SDK

1.       VS2005, 选择Project | Add New SDK… ,输入SDK名字和生成路径, 例如eBox4300_WinCE600_SDK.msi.

 

2.       如果要用C#进行托管代码开发,就同时选中Development Languages 中的Native and Managed development support.

 

3.       Build SDK. 然后安装生成的SDK.

 

六、简单的C# hello world实例工程

1.       VS2005,创建一个新的基于WinCEDevice application工程, Form中添加一个textboxbutton控件.

2.       button的点击事件中添加代码,使得textbox显示”hello world”.

 

3.       Build solution.

 

七、连接EBox4300VS2005

1.       在第一个OSVS2005工程IDE,点击Target | Target Control,在弹出的命令行中输入”gi proc”来查看EBox4300中运行的process.

 

2.       然后再输入”s ConmanClient2.exe” ”s CMaccept.exe”来启动ConCore. 当然也可以在EBox4300中直接双击相应的.exe文件来启动这两个可执行程序.

3.       在第二个device applicationVS2005工程IDE,点击Tools | Options… ,Device Tools下的Devices,eBox4300_WinCE600_SDK x86 Device 进行配置.Configure TCP/IP Transport ,输入EBox4300IP地址.

 

查看IP可以用s ipconfig /d命令。

 

4.       点击Target | connect to device,选择eBox4300_WinCE600_SDK x86 Device,然后connect.如果配置没有问题的话,会提示连接成功.

 

 

八、Deploy application

VS2005,选择Debug | Start Debugging Deploy eBox2300_Demo.可以看到程序被下载到EBox2300,并显示在界面上.

 

 

同时,在shell中可以看到demo的进程。

 

另外,还有一些remote tools可用,具体如下:

Remote tools-File viewer

 

Remote tools-process viewer


Remote tools-registry editor

 

Remote kernel tracker

posted on 2008-09-26 23:54  施炯  阅读(1299)  评论(0编辑  收藏  举报