Presentation is loading. Please wait.

Presentation is loading. Please wait.

一个小时成为Windows Embedded CE 6.0开发者

Similar presentations


Presentation on theme: "一个小时成为Windows Embedded CE 6.0开发者"— Presentation transcript:

1

2 一个小时成为Windows Embedded CE 6.0开发者
9/13/2017 1:58 AM 一个小时成为Windows Embedded CE 6.0开发者 凌宁 资深技术推广经理 微软(中国)有限公司 © 2006 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

3 议程 Windows CE背景知识 Windows Embedded CE的体系结构 Windows CE的实时性 工具和应用程序开发
疑问和解答

4 创建CE 6.0操作系统映像 配置操作系统映像,然后构建… 稍后我们会再回过头来看构建结果
9/13/2017 1:58 AM 演示 创建CE 6.0操作系统映像 配置操作系统映像,然后构建… 稍后我们会再回过头来看构建结果 © 2006 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

5 Talisker Windows CE .NET 4.0
Alder Windows CE 1.0 11/1996 Cedar Windows CE 3.0 4/2000 Macallan Windows CE 5.0 8/2004 Tomatin NMD FP CE 6.0 R2 SP1 2.11 SP2 2.12 Jameson 4.1 McKendric 4.2 Birch Windows CE 2.0 11/1997 Talisker Windows CE .NET 4.0 1/2002 Yamazaki Windows CE 6 H2/2006

6 什么是CE 6.0? Windows Embedded CE 6.0不是 Windows Embedded CE 6.0是…
Windows Mobile 6.0 (基于CE 5.0) Windows Embedded CE 6.0是… 32位、实时、多任务操作系统 组件化设计(CE 6.0中大约有700个组件) 作为一系列组件发布 使用Platform Builder 6.0配置映像 体积灵活 体积大小与选择的组件多少相关 广泛的CPU支持 可以支持x86、ARM、MIPS和SH4

7 Windows CE 5.0的内存模型 Active Process Active Process Active Process
内核 大内存区 供内存映射文件使用 进程的地址空间被限制为32MB 保留区域 Active Process` Active Process Active Process 应用程序空间 Active Process

8 Windows CE 5.0的内存模型 2 GB 内核空间 对所有进程单一的2GB用户地址空间 为其它进程准备的31个Slot 内核
大内存区 对所有进程单一的2GB用户地址空间 Slot 32 Slot 31 : : Slot 7 为其它进程准备的31个Slot Slot 6 Slot 5 Slot 4 Slot 3 Slot 2 Slot 1 – ROM DLLs 当前进程的Slot Slot 0 – 当前进程

9 Windows CE 6.0的内存模型 . . . . . . 2 GB 内核空间 每个进程2 GB 用户空间 32 K 个进程 内核
文件系统 GWES 驱动程序 2 GB 内核空间 进程代码 用户虚拟空间 每个进程2 GB 用户空间 32 K 个进程

10 CE 6.0内核简介 每个进程2GB虚拟内存空间 32K个进程 统一的内核 系统效率提高 安全性和稳定性增强 应用程序高度兼容
操作系统关键组件移到了内核中 系统效率提高 安全性和稳定性增强 应用程序高度兼容

11 应用程序虚拟地址空间 进程的空间 每个进程1 GB 共享的系统堆 255 MB 用户空间 2 GB 每个进程有自己独立的地址空间映射
0x 共享的系统堆 255 MB 被用作OS/应用程序的交互 用户空间 2 GB 每个进程有自己独立的地址空间映射 基于RAM的映射文件 256 MB RAM Backed Mapfiles 共享的用户DLL 512 MB 所有DLL的代码和数据 0x 进程的空间 每个进程1 GB 可执行的代码和数据 虚拟内存申请 0x

12 OS DLLs (Coredll, Winsock, CommCtrl, …)
CE 6的体系结构 Applications Applications Shell 应 用 程 序 Applications 服务管理器 用户态驱动 管理器 用户态 服务 用户态驱动 OS DLLs (Coredll, Winsock, CommCtrl, …) Kernel.DLL KCoredll.DLL FileSys.DLL GWES.DLL Device.DLL 内核态 NK.EXE 内核态驱动 引导程序 硬 件

13 驱动程序 支持两种类型的驱动 移植现有的CE 5.0驱动易如反掌 驱动的总体架构与以前一致 内核模式驱动有更高的效率
用户模式驱动有更好的稳定性 移植现有的CE 5.0驱动易如反掌 每个驱动程序大约需要1~3天 驱动的总体架构与以前一致 主要的改动是驱动如何访问客户内存 不再支持SetKMode和SetProcPermissions 提供CEAppCompat工具检查现有驱动的兼容性

14 实时性:Win CE的测试结果 使用如下配置测试响应时间 Windows CE实时性测试结果 三星SMDK2410开发板
200 MHZ的ARM,16 x 16的Cache Windows CE 5.0并带有图形界面 播放WMV视频 Windows CE实时性测试结果 ISR启动 IST启动 最 小 1.2 µs 31.7 µs 平 均 3.3 µs 67.2 µs 最 大 13.3 µs 103.0 µs 时间单位是微秒(µs)

15 实时性测试工具—ILTiming与OSBench
基于软件的实时性测试工具 测试ISR和IST延迟 ISR延迟:从IRQ到ISR开始的时间 IST延迟:从ISR结束到IST开始的时间 OSBench 内核调度性能测试 可以测试完成某些内核任务的时间,例如— 得到或释放临界区 创建Semaphone或Mutex 调用系统API

16 线程优先级分类 Windows CE 6有256个级别的优先级 优先级0最高,优先级255最低
旧的8个优先级(3.0以前)被映射到新优先级的最低的8个级别上 默认的优先级是252 SetThreadPriority = 251 OEM可以保留优先级0到248 优先级 描述 0 ~ 96 高于驱动程序的实时优先级 97 ~ 152 默认被CE的驱动程序使用 153 ~ 247 低于驱动程序的实时优先级 248 ~ 255 非实时优先级

17 中断处理的体系结构 IST延迟 ID 线程 IST ISR1 ISRN OAL ISR 延迟 ISR 内核 ISR 设置事件 硬件
允许优先级更高的中断 除了ID都允许 所有

18 中断初始化(驱动/IST) // Create the Event
OAL ISR1 ISRN ISR ID Kernel Set Event // Create the Event gIntEvent = CreateEvent( NULL, // Security FALSE, // Manual reset FALSE, // Init as not signaled NULL // No Named Events ); // Create a thread that waits for signaling gThreadInt = CreateThread( NULL, // Security 0, // Default ThreadInt,// Interrupt Thread NULL, // No Parameters CREATE_SUSPENDED,// Suspended &dwThreadID // Thread Id); // Initilialize the Interrupt gSysInterruptNum = KernelIoControl( IOCTL_HAL_TRANSLATE_IRQ, &gIRQNum, sizeof(DWORD), &gSysIntNum, sizeof(DWORD), NULL ); InterruptInitialize( gSysIntNum, // From Map gIntEvent, // Global Event NULL, // Not Used (DWORD)NULL // Not Used ) ) // Get the thread going ResumeThread( gThreadInt ); ISR HW All Higher Enabled All Except ID All

19 中断服务线程IST DWORD WINAPI ThreadInt( LPVOID lpvParam ) {
OAL ISR1 ISRN ISR ID Kernel ISR Set Event DWORD WINAPI ThreadInt( LPVOID lpvParam ) { // The magic thread waits for the event. while( gRun ) // Wait until we have been signaled interrupt WaitForSingleObject( gIntEvent, INFINITE ); // Increment the counter gInterruptCount ++; // Run your logic here // Reset the interrupt InterruptDone( gSysIntNum ); } return 0; HW All Higher Enabled All Except ID All

20 Kernel Tracker 查看进程、线程与中断之间的交互 跟踪中断 优先级反转 线程状态,例如:运行、阻塞、睡眠等

21 CE 6.0的开发工具 应用程序开发 操作系统开发 VS 2005/2008 VS 2005 + PB 配置 构建 下载 调试(源代码)
测试(CETK) 应用集成 远程工具: Call Profiler, Performance Monitor, Registry Editor, CeDebugX Zoomin, Remote Kernel Tracker

22 创建CE 6.0操作系统映像 部署和运行构建的操作系统映像
9/13/2017 1:58 AM 演示 创建CE 6.0操作系统映像 部署和运行构建的操作系统映像 © 2006 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

23 总 结 应用于大量有趣的设备 实时、体积小、模块化的嵌入式操作系统 支持多种处理器体系结构 应用程序开发简易(框架、编程语言)
GPS导航、机器人、手机、生产控制、医疗等等 实时、体积小、模块化的嵌入式操作系统 支持多种处理器体系结构 应用程序开发简易(框架、编程语言) 非常好用的开发工具!

24 疑问和解答

25 参考资源 Windows Embedded MSDN Windows Embedded Windows Mobile
Windows Embedded Windows Mobile 微软Windows Embedded CE中文论坛:

26 © 2008 Microsoft Corporation. All rights reserved
© 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.


Download ppt "一个小时成为Windows Embedded CE 6.0开发者"

Similar presentations


Ads by Google