收藏 分享(赏)

【最新】邵贝贝RTOS讲座ppt模版课件.ppt

上传人:微传9988 文档编号:3433985 上传时间:2018-10-28 格式:PPT 页数:56 大小:3.02MB
下载 相关 举报
【最新】邵贝贝RTOS讲座ppt模版课件.ppt_第1页
第1页 / 共56页
【最新】邵贝贝RTOS讲座ppt模版课件.ppt_第2页
第2页 / 共56页
【最新】邵贝贝RTOS讲座ppt模版课件.ppt_第3页
第3页 / 共56页
【最新】邵贝贝RTOS讲座ppt模版课件.ppt_第4页
第4页 / 共56页
【最新】邵贝贝RTOS讲座ppt模版课件.ppt_第5页
第5页 / 共56页
点击查看更多>>
资源描述

1、Open Resources of RTOS for Embedded Systems Beibei Shao Tsinghua University Conference on Nuclear Electronics & Detection Dec. 2/4, 2002 in XiaMen,Why RTOS?,Learn RTOS: Fill the gap between Computer Science Experts and Application Engineers Understanding Computer more theoretically Using RTOS: Simpl

2、ify the Application Programming Higher the Real Time Performance and Reliability,Real Time Kernel,Pending,Dormant,Waiting,ISR,RTOS Kernel,Running,Commercial RTOS Products,VxWorks Wind RiverSystem $40k/s & royalty pSOS Wind RiverSystem VRTX Microtec $20K/seat LynxOS $10K/s, Bulue Cat Linux $2.5k/se

3、at QNX QNX OS-9 Microware M Nucleus Accelerated Tech. $20K/s with source code CMX 8051Tools Tasking $1.29k T RT/Studio IDE Precise $30K Embedded Linux Green Hill $7.9K Royalty free Embedex Linux Lineo $5k/seat Redice Linux Redsonic Yellow Dog linux, Hard Hat Linux, Turb Linux M Other: L LinuxD

4、 E,Why Open Source?,Good for Learning and training Easy to Get Support from Web Easy Common Language & Standard Good Performances and reliabilities Lower the System Cost,Free RTOS Kernel Source Code,“C/OS The Real Time Kernel” (1992) “MicroC/OS-II The Real-time Kernel” (1998) “MicroC/OS-II The Real-

5、time Kernel” 2nd Edit (2002) Jean J.LabrosseR & D Publications, Inc Priority based preemptive kernel (looking up table algorithm) Up to 60 tasks Above 90% is written in C easy for porting Scalable and ROM able Source code for PC environment attached with a floppy or CD Very detail explanation in exc

6、ellent programming style,Licensing: You do not need a license to use this code in your application, if your application is distributed in object format. You should however, indicate in your product literature that you are using C/OS, the Real Time Kernel. If you distribute C/OS in source code, you m

7、ust obtain a license.,The C/OS Book 1992,The C/OS-II Book 1998,LicensingNo licensing is required if C/OS-II is used for education You must obtain an Object Code Distribution License to embedded C/OS-II in commercial product hat is sold with the intent to make profit,The C/OS-II Book in Chinese 2001.

8、7.,The 2nd edit ofC/OS-II From 498 pages to 606 pages Delete 150 pages source code list 250 new pages moreFrom 12 Chapters to 18 ChaptersMeet Requirement for Safety-Critical System,C/OS (V1.08) vs. C/OS-II(V2.00) 266 page to 498 pages,Add more important functions: Memory manager stack usage check CP

9、U load check,C/OS-II (V2.00 1998) vs. C/OS-II(V2.52 2002),“MicroC/OS-II The Real-time Kernel”,The Second Edit (2002) Add 250 pages more,Meet Requirement for Safety-Critical SystemCertified by FAA Add more important functions:Mutax Semaphore, Event Flag Add more explanations Add price from $69.95 to

10、$74.95 ,Embedded Real Time System Concept,Foreground/background system (super loop+events) Non-preemptive kernel (Multi Tasks latency=longest ) Preemptive Kernel Races in tasks Died lock, priority inversion Reentrancy Task scheduling algorithm Task priority based Round robin scheduling Inter tasks c

11、ommunication, synchronization Semaphore Mail box message queue ,Priority based (Real Time scheduling) Priority scheduling like C/OS-II and most commercial RTOS Time slot based (Unix, Linux) Round robin scheduling Guaranteed Scheduling Shortest job first Lottery Scheduling Multiple queues Two levels

12、scheduling Scheduling mechanism and Scheduling policy Refer to Minix, Linux,Real Time System Concept Task Scheduling Algorithm,Pending,Dormant,Waiting,ISR,RTOS Kernel,Running,OSSemPend() OSMBoxPend() OSQPend() OSTimeDly(),OSSemPost() OSMBoxPost() OSQpost() OSTimetick(),OS_Task_SW(),IntEnter() IntExi

13、t(),OSTaskCreat() OSTaskDell(),OSInit() OSStart(),Enter_Critical() Exit_Critical() Schedule_lock() ScheduleUnlock() TaskChangePrio() .,RTOS Kernel Source Code C/OS-II Service,Advantage/Disadvantage of Using RTOS,Advantage Split application to multi tasks, simplify the design,easy to be understand, e

14、xpend and maintenance Time latency is guaranteed Higher system reliability Disadvantage More RAM/ROM usage 25% CPU overhead Adding additional cost, if commercial TROS is used About 80 RTOS vendors, cost from $70 to $30,000 some are royalty free, some need $5 to $250 /MCU, MCU dependent,C/OS Already

15、Widely Used in Many Fields,Already used in the field since 1992 such as: cameras medical instruments musical instruments engine control Since 1995, our lab. ported it to MC68HC11, M68000, CPU32,M.core,HC08 and used it in several projects: Digital Data Log in National Synchrotron Radiation Lab. World

16、Fip and radiation tolerance test DAQ system at CERN Beam Lose Monitoring System ATP System for Beijing light Railroad MCU based TCP/IP stack,network adapterhighway telephone call boxATM machine industrial robots,Free RTOS Kernel Source Code Ported Examples down load able from web,Manufacture MCU AMD

17、 80x86 Analog Device SHARC (AD21065L) ARM ARM7 Atmel AVR, AT103 Fujitsu SPARC Hitachi 64180, H8-300H H8S,SH2,SH3 Infineon Tri.Core, 80C166/167 Intel Strong ARM110, 80C251,XC52,80x86 ,196K Motorola M68HC08, M68HC11, M68HC12, M68HC16M68000, CPU32, DSP568xxCold.Fire, M.Core, PowerPC 8xx,MPC555 Philips

18、XA ST 80C166/167 TI TMS320-C40, TMS320-C6201 Automation V8 Zilog Z-80, Z-180,http:/WWW.uCOS-II.com/,Learn RTOS with C/OS-II,Read the book and the C/OS-II source code Understanding RTOS concepts Compiler the C/OS-II with examples and run on a PC Add some codes to the examples Porting the C/OS-II to a

19、 MCU, which you are familiar with Write the CPU.c and the CPU.a files Do a project with a MCU board Learn how to divide an application to several tasks Communication and synchronization within tasks,Porting & Using C/OS-II,Porting Most problems in porting are related to cross C compiler tools Most M

20、CU dependent Cross C are commercial Please use GNU gcc in Free Software Linux Using How to develop applications program based on C/OS-II ?,GNU gcc in Linux,GNU gcc Tools Cross C Compiler for: M68K, CPU32, Coldfire, PowerPC,68HC11/12 SPARC,PA-RISC,VAX,AMD29K,ARM,Thumb, MN10xxx, M32, SR6000,MIPS, RT,

21、i386, Inter960, TMS32, DEC alpha, V850, NS32K Cross assembler : AS Disassemble: Objump Liker: Ld C support lib: Libc & Libm Gcc Debug options You know GCC , You will get also Embedded ucLinux,uCLinux in Linux,Take off the Memory Management Good for the non-mmu CPU in Embedded Free OS for Embedded Ma

22、ny application program in Linux available Not a Real Time OS Download RTLinux3.1 from:www.rtlinux.org Much smaller than Linux, sometimes still too large for Embedded system typical RAM usage 512K Down load from: www.uclinux.org,Free RTOS: RTEMS,RTEMS (Real-Time Executive for Missile Systems) POSIX A

23、PI standard based Real-Time Executive for Multiprocessor Systems (C Version) Real-Time Executive for Military Systems(ada Version) See: (On-Line Applications Research Corporation ),How to Develop an Application Program Base on a RTOS? TCP/IP Developing Examples,Hardware platform design and test Buil

24、dup free software base developing environment GNU gcc Porting an RTOS Find out free resources Protocols form the www.rfc-editor.org Source code from books and www Develop your own application,Open Resources Example,TCP/IP Lean: Web Servers for Embedded Systems is a hands-on guide to TCP/IP networkin

25、g that includes source code to a simple TCP/IP stack for use in embedded applications.,68HC08GP32 Based Lean Server,68HC08GP32 Based Lean Server,8bits MCU 512bytes RAM 32K Fash Run C/OS-II for learning Ethernet interface: RTL8019 Total code for TCP/IP is around 7K,68F375,MC 68332,MC68332 CPU32,ColdF

26、ire Platform for RTOS Learning,32 bits MCU ColdFire 5307:68K in RISK , non MMU for Embedded 90MHz 75MIPs Interface with: Ethernet RTL8019 2M Flash, 16M SDRAM Developed with GNU gcc in Linux Boot uClinux or C/OS-II from Flash to RAM TCP/IP stack available,Embedded Control Systems Project for Ph.D. St

27、udent,实时操作系统VxWorks,VxWorks操作系统是美国WindRiver公司于1983年设计开发的一种嵌入式实时操作系统(RTOS),是Tornado 嵌入式开发环境的关键组成部分。良好的持续发展能力、高性能的内核以及友好的用户开发环境,在嵌入式实时操作系统领域逐渐占据一席之地。首先,它十分灵活,具有多达1800个功能强大的应用程序接口(API);其次,它适用方面广,可以适用于从最简单到最复杂的产品设计;再次,它可靠性高,可以用于从防抱死刹车系统到星际探索的关键任务;最后,适用性强,可以用于所有的流行的CPU平台。 Vxworks是一个高性能的,支持广泛的网络通信协议的, 并可根

28、据用户需求进行组合的实时操作系统, 它的开放式结构和对工业标准的支持使开发者只需要做最少的工作即可设计有效的符合用户要求的实时操作系统.,实时操作系统VxWorks,Provides VxWorks with primary interface to hardware environment.BSP Responsibilities: Hardware initialization on power-up. Support for VxWorks access to hardware drivers. Integration of hardware-dependent and hardware

29、-independent software in VxWorks.,BSP & Black Box,实时操作系统 Nucleus,Nucleus是美国著名厂商ATI公司的RTOS产品。它提供实时内核(Nucleus PLUS),网络模块(Nucleus NET、Nucleus EPILOGUE和Nucleus POSE),开发工具模块(NucleusMNT/UDB/EDE/DLL)以及Web(Nucleus Java/webserve)产品等。Nucleus最大的特点是全部提供源代码,免去用户购买License和付Royalties。用户只需通过DLL动态连接库便可进行任务级调试,无需编写BS

30、P。 提供源代码 NUCLEUS提供注释严格的C源级代码给每一个用户。这样,用户能够深入地了解底层内核的运作方式,并可根据自己的特殊要求删减或改动系统软件,这对软件的规范化管理及系统软件的测试都有极大的帮助。另外,由于提供了RTOS的源级代码,用户不但可以进行RTOS 的学习和研究,而且产品在量产时也不必支付License,可以省去大量的费用。 易学易用 NUCLEUS+能够结合Paradigm,SDS以及ATI自己的多任务调试器组成功能强大的集成开发环境,配合相应的编译器和动态联结库以及各类底层驱动软件,用户可以轻松地进行RTOS的开发和调试。另外,由于这些集成开发环境 ( IDE ) 为所

31、有的开发工程师所熟悉,因而,容易学习和使用。 功能模块丰富,3种嵌入式操作系统比较,操作系统购买价格VxWorks: 价格40万元人民币以上 Nucleus: 价格15万元人民币以上Linux & RTEMS: 免费,3种嵌入式操作系统比较,操作系统学习周期VxWorks: 一个人约4个月时间 Nucleus: 一个人约1个月时间Linux or RTEMS: 一个人约2个月时间,3种嵌入式操作系统比较,操作系统可靠性稳定性VxWorks: 好 Nucleus: 较好,有bug,特别在图形包,和网络包.Linux & RTEMS: 较好,在高性能系统中仍需改进,3种嵌入式操作系统比较,操作系统

32、版权费用VxWorks: 每生产一件产品需交纳一份版权费Nucleus: 免费Linux & RTEMS: 免费,3种嵌入式操作系统比较,操作系统技术支持VxWorks: 较好,由开发商独家提供有限的技术支持Nucleus: 较好,由开发商独家提供有限的技术支持Linux & RTEMS: 好,全世界的自由软件开发者提供支持,3种嵌入式操作系统比较,操作系统网络特性VxWorks: 另加费用购买Nucleus: 另加费用购买Linux & RTEMS: 免费,3种嵌入式操作系统比较,操作系统软件移植VxWorks: 较难,是封闭系统Nucleus: 容易,代码开放Linux & RTEMS:

33、较易,有许多应用软件支持,3种嵌入式操作系统比较,操作系统实时性能VxWorks: 好,Nucleus: 较好,Linux: 非实时, (RTEMS 是实时的,基于Llinux).,3种嵌入式操作系统比较,操作系统应用产品开发周期VxWorks: 较慢,可参考的代码有限Nucleus: 快,新产品上市迅速Linux & RTEMS: 较快,许多公开的代码可以参考和移植,3种嵌入式操作系统比较,操作系统对内存占用VxWorks: 较少Nucleus: 少Linux & RTEMS: 多, 而且无法用虚拟内存改进,3种嵌入式操作系统比较,操作系统对新技术支持VxWorks: 较慢Nucleus:

34、慢,Linux: 快,甚至支持蓝牙技术,Future of Embedded RTOS & Summery,Embedded RTOS is going to be Open and Open C/OS-II is good for learning and using More and more RTOS source codes available include many applications such as TCP/IP RTOS vendors focus to the service more and more (Do apply for good service when you buy commercial RTOS!),Thanks,

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 实用文档 > 教育范文

本站链接:文库   一言   我酷   合作


客服QQ:2549714901微博号:道客多多官方知乎号:道客多多

经营许可证编号: 粤ICP备2021046453号世界地图

道客多多©版权所有2020-2025营业执照举报