1 / 34

C.core & µC/OS-II in Education

C.core & µC/OS-II in Education. Let more people know c.core Beibei Shao Tsinghua University. 9,000. 8,000. 7,000. 6,000. 5,000. M units. 4,000. 3,000. 2,000. 1,000. 0. 1997. 1998. 1999. 2000. 2001. 2002. 2003. 2004. 2005. 2006. 4-Bit. 8-Bit. 16-Bit. 32-bit+.

mickey
Download Presentation

C.core & µC/OS-II in Education

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. C.core & µC/OS-IIin Education Let more people know c.core Beibei Shao Tsinghua University

  2. 9,000 8,000 7,000 6,000 5,000 M units 4,000 3,000 2,000 1,000 0 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 4-Bit 8-Bit 16-Bit 32-bit+ History and Future of MCU (1) Over 60亿片in 2003 By SEMICO In last 20 years, 8 bits MCU were domestic Application of Embedded 32Bits MCU grosses Rapidly

  3. $20,000 $15,000 $M $10,000 $5,000 $0 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 4-Bit 8-Bit 16-Bit 32-bit+ History and Future of MCU (2) Total MCU Market (to 200 亿$) By SEMICO Conclusion: for 8/16/32 bits MCU, 1/3 + 1/3 + 1/3

  4. Start from Z-80 An 8051 for everything (should be CSIC) Use Simulators Education switches to 8/16/32 bits in parallel JTAG ONCE BDM replaces the simulator RTOS should be introduced Need renew platforms for Education Problems on MCU Education

  5. C.core, Chinese Own Products C*CORE C210/C310是苏州国芯公司受让MOTOROLA公司先进的32 位RISC CPU - M*CORE而来,具有优越的性能和成熟的应用开发环境。高性能、低功耗、小体积高性价比的产品。 CC3118是针对商业机和手持设备专门开发的高性价比的通用MCU,温度范围从-40OC 到85OC,最大工作频率 60MHz。 是我国自主设计的具有自主知识产权的MCU CC3118 把一个功能强大的RISC C310CPU、功能强大的外围模块以及接口逻辑整合在一起,从而提高了整个系统的性能,同时减少了系统组件的数量,简化了系统开发难度,提高了应用系统的性价比。

  6. C.core CC3318 C.core 310 CPU 60MHz 144pins JTAG 64K RAM SPI,3xSCI PWM 2 x IC Reader Real Time Clock LCD Driver (640 x 512)

  7. POWER KEYPAD LCD DISPLAYER MAGCARD READER IC CARD READER Memory & Decoder Real Timer C·CORE 3118 GSM MODULER IrDA Interface RS232 Interface Thermal Printer POS an Application Example This is also a good platform for education

  8. allows you to divide an application to multi-tasks SimplifytheApplication Programming: Easier to modify, extend, maintenance Guarantee the system latencyreach or close to the theoretical limits Higher the reliability and system performance Fill the gap between Application engineer & expert of Computer Why RTOS?

  9. Races in tasks Died lock priority inversion Reentrancy Communications between tasks …… RTOStakes care of all above problems for you! RTOS is a Nice Tool for Embedded System You have to LEARNHow to Use It! Multi-Tasks Bring Problems !

  10. Commercial RTOS Products VxWorks Wind RiverSystem $40k/s & royalty wrs.com pSOS Wind RiverSystem wrs.com VRTX Microtec $20K/seat LynxOS $10K/s, Bulue Cat Linux$2.5k/seatlynuxworks.com QNX QNX qnx.com OS-9 Microware Microware.com Nucleus Accelerated Tech. $20K/s with source code CMX 8051Tools Tasking$1.29k Tasking.com RT/Studio IDE Precise $30K psti.com Embedded LinuxGreen Hill$7.9KRoyalty free ghs.com Embedex LinuxLineo $5k/seat lineo.com Redice Linux Redsonic redsonic.com Yellow Dog linux, Hard Hat Linux, Turb LinuxMontavista.com Other: Linuxnews.com LinuxDevices.com Embed.com

  11. The μC/OS Book1992 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 must obtain a license. 

  12. The µC/OS-II Book1998 License policy changed since µC/OS 1.0: 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 No licensing is required if µC/OS-II is used for education

  13. The 2nd edition of µC/OS-II June 2002 From 498 pages to 606 pages Delete 150 pages source code list 250 new pages more From 12 Chapters to 18 Chapters Meet Requirement for Safety-Critical System June2003 584 pages

  14. Embedded System on the World • The 1st International Embedded RTOS Application in Physics was in 1990 • The 1st National Embedded Conference was 2000 in China • The 1st Email (www) in IHEP is in 1986, widely used 10 years later. To sorter the distance: • In last 2 years, µC/OS-II was studied, ported, used widely. • In coming 2 years, µC/OS-II based middleware should be discussed and published.

  15. µC/OS, µC/OS –IIthe RT Kernel • Dedicated Designed for Embedded System • Priority based preemptive kernel (simple algorithm) • Above 90% is written in C, easy for porting • Scalable and ROM able • Source code for PC environment attached with a CD • Very detail explanation in excellent programming style So good for education!

  16. RTOS Kernel RTOS Kernel Source Code µC/OS-II Service Enter_Critical() Exit_Critical() Schedule_lock() ScheduleUnlock() TaskChangePrio() …... OSSemPost() OSMBoxPost() OSQpost() OSTimetick() OSTaskCreat() OSTaskDell() Dormant Waiting OS_Task_SW() OSInit() OSStart() Running Pending ISR OSSemPend() OSMBoxPend() OSQPend() OSTimeDly() IntEnter() IntExit()

  17. Basic knowledge on embedded system and MCU for mamagers To be a project manager, select right MCU direct in the right way An useful tech. For Application Engineers Use right MCU to develop products The way to an expert on embedded system Please go ahead (to Linux…) Spend a lot of time! Study Motivation

  18. µC/OS Already 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. • WorldFip and radiation tolerance test DAQ system at CERN • Beam Lose Monitoring System • ATP System for Beijing light Railroad • MCU based TCP/IP stack • network adapter • highway telephone call box • ATM machine • industrial robots……

  19. µC/OS (V1.08) vs. µC/OS-II(V2.00)266 page to 498 pages • Add more important functions: • Memory manager • stack usage check • CPU load check

  20. µ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 System Certified by FAA • Add more important functions: • Mutax Semaphore, Event Flag , Debug…… • Add more explanations • Add Porting and Testing

  21. Available Compilers • Diab data (now part of Windriver) • ANSI-c / c++ • Platforms: windows 95, windows NT, OS/2, Solaris, SunOS, HP/UX, IRIX, aix, • Http://www.WindRiver.Com/products/html/dcc_compiler.Html • Green hills • Standard C++, extended embedded C++ • Host platforms: windows 95, 98, NT and sparc/solaris • Http://www.Ghs.Com/products/mcore_development.Html • Hiware • ANSI-C / C++ / EC++ / cc++ compilers • Host platforms: windows 95, 98, NT • Http://www.Hiware.Com/p_mcore.Html • Metrowerks • ANSI C compliant, ANSI/ISO C++ compliant and EC+ compilers • Host platforms: windows 95, 98 and NT • Http://www.Metrowerks.Com/embedded/mcore/ • Motorola GNU toolkit • GNU C and C++ compilers • Http://sarl.Corp.Mot.Com/mcore/gnu/

  22. Free C Compile: GNU gcc Tolls • GNU gcc Tools • Cross C Compiler for: • M68K, CPU32, Coldfire, M.Core, PowerPC, 68HC11/12,SPARC,PA,RISC,VAX,AMD29K, ARM,Thumb,MN10xxx, M32, SR6000,MIPS, • RT, i386, Inter960,TMS32, DEC alpha, V850,NS32K • Cross assembler : AS • Disassemble: Objdump • Liker: Ld • C support lib: Libc & Libm • Gcc Debug options • You knowGCC , You will get also EmbeddeducLinux

  23. uCLinux in Linux • Take off the Memory Management • Good for the non-mmu CPU in Embedded • Free OS for Embedded • Many 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

  24. Porting µC/OS –II • Compiler with Hiware • Down loaded with Picobug Or: • Compiler with CodeWarrior • Down loaded with EDBI tool

  25. Picobug Debug Command

  26. Select S19 file to down load

  27. Downloaded

  28. Running µC/OS –II

  29. Enhanced Background Debug Interface • Features • Win NT 4.0, win 95 and UNIX compatible • Serial port based once debugger solution • Low cost • EIA-232 host interface at 115K baud • Supports ESL protocol • Low power consumption • Manual reset button • Status indication using multi-color LED's • Supports M·CORE target systems that have a once debug connector • User-upgradable firmware 17 Apr 00

  30. CodeWarrior Development Tool

  31. CodeWarrior Debug

  32. CodeWarrior IDE

More Related