节点文献

嵌入式实时操作系统μC/OS在C51平台上的移植及应用

The Transplantation and Application on μC/OS-II Based on C51 Microcontroller

【作者】 娄小平

【导师】 陈志刚;

【作者基本信息】 中南大学 , 计算机技术, 2009, 硕士

【摘要】 随着现代计算机技术的迅速发展,嵌入式操作系统以其简洁、高效等优点扮演了越来越重要的角色。嵌入式产品已经成为信息产业的主流,被广泛应用于移动计算设备、网络设备、工控设备、信息家电、汽车电子、娱乐设备、仪器仪表等领域。依据经济成本考虑,本项目没有去购买昂贵的商业RTOS(实时操作系统),而是选择了源代码公开、体积小且可裁剪移植性好的μC/OS-Ⅱ,选择C51微处理器为应用平台,根据实际项目要求把μC/OS-Ⅱ移植到C51单片机上。移植的过程主要集中在三个文件的重新编写上:一个头文件OS_CPU.H、一个C代码文件OS_CPU_C.C和一个汇编文件OS_CPU_A.ASM文件。还针对C51的小内存所做的优化,对可重入问题的进行了分析与解决,基本达到应用的需要。最后以μC/OS-Ⅱ实时内核为基础,把它应用于智能验钞机系统,运用了三大检伪手段(磁性检测、荧光检测和宽度检测),实现了智能验钞机启停监测、按键监控、信息处理、数据输出和参数设置等多任务的设计目的。基于μC/OS-Ⅱ内核的程序,进行多任务的分配和调用,构建智能验钞机的软件构架,结合外部中断服务程序,具体的完成项目中软件应用的部分,形成了一个具有实际意义的嵌入式系统应用软件。嵌入式实时操作系统μC/OS-Ⅱ具有多任务处理等特点,将其应用到实际项目智能验钞机上,使用可剥夺性的实时内核,对验钞时所有时间要求苛刻的事件都得到了尽可能快捷、有效的处理。且移植过程使用C语言开发,简化了程序的设计过程,降低了开发难度,提高了开发效率、可维护性和可移植性。但还存在一些不足和需要改进和地方。文章最后对这些方面做了阐述,提出了改进思路和方法,为下一步的工作提供了有意义的参考。

【Abstract】 With modern computer technology to the rapid development of embedded operating system for its simplicity, efficiency, etc. played an increasingly important role. Embedded products have become the mainstream of the information industry, are widely used in mobile computing devices, network equipment, industrial equipment, information appliances, automotive electronics, entertainment equipment, instrumentation and other fields.Basis for considering the economic costs, the project did not go to buy expensive commercial RTOS (real-time operating system), but opted for the open source code, small size and portability can be a good cutμC / OS-II, to choose for the application of microprocessor C51 platform, based on actual project requirements of theμC / OS-II ported to the C51 single-chip microcomputer. Transplantation mainly concentrated in the process of re-preparation of three documents: one header file OS_CPU.H, a C code file OS_CPU_C.C and a compilation of documents OS_CPU_A.ASM documents. C51 also made a small memory optimization, re-entrant to the problem are analyzed and resolved to meet the basic needs of the application. Finally,μC / OS-II real-time kernel-based, it applies to smart Detector systems, the use of three pseudo-seizure means (magnetic detection, fluorescence detection and the width of detection), the realization of a smart start and stop monitoring Detector , keystroke monitoring, information processing, data output and parameter settings are designed to multi-task. Based onμC / OS-II kernel procedures, conduct multi-task allocation and call to build the framework of Intelligent Detector software, combined with the external interrupt service routine, the specific software applications to complete the project in part, to form a meaningful embedded system applications.Embedded real-time operating systemμC / OS-II has features such as multi-tasking to deal with its application to the actual project on Intelligent Detector, can be deprived of the use of real-time kernel, the task demanding all the time when the events have been as far as possible, fast, effective treatment. Transplantation and the use of C language development process and simplifies the process of the design process and reduce the development of the difficulty of the development of improved efficiency, maintainability and portability. However, there are still some shortcomings and need to be improved and local. Finally, the article done on these areas and put forward ideas and methods to improve for the next step to provide a meaningful work of reference.

【关键词】 嵌入式系统μC/OS-II移植
【Key words】 embedded systemμC /OS-IItransplantation
  • 【网络出版投稿人】 中南大学
  • 【网络出版年期】2010年 04期
节点文献中: