节点文献

51系列微处理器上操作系统和网络协议栈移植的研究

Study on the Transplantation of Operating System and Network Protocol Stack on 51 Serial Microcontrollers

【作者】 黄琛

【导师】 陈长清;

【作者基本信息】 华中科技大学 , 软件工程, 2004, 硕士

【摘要】 当前,8051系列微处理器被广泛用在各种嵌入式系统中。一般情况下,在8051系列微处理器平台上开发的应用均是单任务执行,不能满足同时执行多个任务和要求较好的响应速度的场合。该问题的一种解决方法是在硬件系统和应用程序之间引入一个操作系统,通过操作系统的多任务调度,使得运行的每个任务都有机会占用CPU时间,从而获得良好的响应速度。而且在目前的市场环境下,如果产品拥有网络方面的功能,那么该产品将更有市场和吸引力。因此,将网络协议栈移植到配有操作系统的微处理器上,并以此为基础开发具有网络功能的应用是十分必要的。移植对象是μC/OS-II操作系统和uIP网络协议栈。μC/OS-II是一个开放源码的小型操作系统,它的特点是代码量小、结构简单和功能齐全。uIP是一个TCP/IP协议栈的轻量级实现,保有了TCP/IP协议栈的主要功能,代码尺寸小,内存占用少,非常适合于8051系列微处理器这样资源有限的硬件平台。移植过程中涉及到操作系统以及TCP/IP协议实现的各种细节,特别是μC/OS-II和uIP的相关代码。通过修改μC/OS-II和uIP代码中与硬件系统相关的代码,并完整实现链路层的点对点协议,使得相关代码可以在8051系列微处理器上正常运行。移植开发使用了Keil uVision作为开发环境,使用Keil C作为开发语言。51系列微处理器装配了μC/OS-II操作系统和uIP网络协议栈后成为了一个开发平台。开发人员可以使用μC/OS-II提供的API和各种服务,并在此平台上进行各种基于网络的应用开发。另外,基于此平台的开发也将使软件缺陷大幅度减少,从而为程序员开发更为健壮的程序提供便利。

【Abstract】 Currently, 8051 serial microcontroller is broadly used in a variety of embedded systems. In general case, the application based on 8051 serial micro controller is in a single task execution mode. However, this working mode cannot deal with the situation that multiple tasks must be executed simultaneously. The solution is to add an OS layer between hardware and application. Depending on the scheduling ability of operating system, all tasks can get the time slice of CPU fairly, so every task will has acceptable speed of response. In the present business environment, a product with network functionality is more attractive. So an OS embedded with network protocol stack will be very useful.The target of transplantation is μC/OS-II and uIP. Both of them are open source.μC/OS-II is a small scale operating system. It has small code size, simple structure and sufficient functionalities. uIP stack is a lightweight implementation of TCP/IP stack. It has most of functionalities of TCP/IP and its occupation of memory is very small. All of these features are very fit for the 8051 platform which has just small amount of resource. During the process of the transplantation, the details of TCP/IP protocol and operating system were involved, especially the code of μC/OS-II and uIP. Through the modification of some code related to hardware in μC/OS-II and uIP, both of them run smoothly in 8051 environment. The development of transplantation uses Keil as IDE.The platform equipped with μC/OS-II and uIP stack becomes a developing platform. Programmers can use APIs and services of μC/OS-II. They can also use network functionalities for their application. By this way, it will decrease the occurrence of bugs in applications.

  • 【分类号】TP316
  • 【被引频次】3
  • 【下载频次】369
节点文献中: 

本文链接的文献网络图示:

本文的引文网络