扬州大学硕士学位论文
Embedded System Architecture Reseach and Development
Abstract:
This thesis discusses the Embedded System Architecture Reseach and Development, especially about the principle and method of developing RTOS-based Embedded System. It is easy to understand the concept of embedded system, but difficult to develop an embedded system successfully. The development is a complicated project.
The development involves both hardware and software development tasks.
The hardware of an embedded system includes the microprocessor (or microcontroller), memory and peripherals (AD/DA, clock, USB, network interface etc.). The hardware design includes the schematics, PCB layout design and hardware debugging. The result of hardware design is to have the particular function of, stable electric circuit.
The software design is the major part of system development. And the software engineering crisis found in the software world will also appear in the embedded system world.
In this thesis, the embedded system is based on RTOS. So, the point of the thesis is about operate system, especially the RTOS theories studies, answering to how to apply the RTOS into embedded system.
By researching different operating systems such as μC/OS-II, Windows, Windows CE, FreeBSD, Minix, Linux, Lineo, Windriver, QNX, Mach, OSE, L4 etc., this thesis makes out the the development trend of the current operating system. These basic methods have the very important value to builid our own operating system.
This thesis takes μC/OS-II v2.51 as example, porting it to ARM7TDMI processor and makes an sample app on Evaluator-7T board shipped from ARM Ltd.
Also a μC/OS-II v2.51 8051 port is done and tested on the EasyPack.
The above porting work can illustrate the process to develop a RTOS-based embedded system. And it is a good reference for embedded system developers to use this port in their project.
Key word: Embedded System, RTOS, μC/OS-II, Linux, microkernel
6
周全 ES体系结构的研究及其应用
7
扬州大学硕士学位论文
目 录
摘要 ??????????????????????????????????5 Abstract?????????????????????????????????7
目录 ??????????????????????????????????9 引言 ??????????????????????????????????13
第一章 嵌入式系统概述??????????????????????????15 1.1 什么是嵌入式系统??????????????????????????15 1.2 历史回顾 ??????????????????????????????15 1.3 应用前景 ??????????????????????????????15 1.4 主要技术支撑 ????????????????????????????16
1.4.1 嵌入式系统中的主要硬件技术 ??????????????????16 1.4.2 嵌入式系统中的主要软件技术 ??????????????????17 1.5 研究前沿 ??????????????????????????????17
第二章 嵌入式系统硬件??????????????????????????19 2.1 嵌入式系统处理器的发展 ???????????????????????19
2.1.1 嵌入式系统的核心器件类型 ???????????????????19 2.1.2 嵌入式系统的核心器件体系结构 ?????????????????20 2.1.3 典型的嵌入式微处理器ARM体系结构???????????????21 2.2 存储器 ???????????????????????????????22 2.3 外部设备(输入设备/输出设备/存储设备/网络通信设备)????????22 2.4 外围接口(USB/并行接口/串行接口/无线接口)?????????????22 2.5 网络 ????????????????????????????????23
第三章 嵌入式系统软件 ?????????????????????????25 3.1 软件的作用?????????????????????????????25 3.2 固件????????????????????????????????25
3.2.1 固件的定义和功能???????????????????????25 3.2.2 一个固件范例——μHAL????????????????????26 3.3 高层软件??????????????????????????????26 3.3.1 软件库????????????????????????????27 3.3.2 操作系统???????????????????????????27
3.3.2.1 操作系统的分类?????????????????????27 3.3.2.2 单一内核操作系统 ?????????????????????27 3.3.2.3 微内核操作系统 ??????????????????????28 3.3.2.4 操作系统与实时操作系统??????????????????28 3.3.2.5 POSIX规范????????????????????????29 3.3.2.6 嵌入式操作系统(EOS)的发展????????????????30 3.3.2.7 内核???????????????????????????31 3.3.2.8 如何构建自己的嵌入式操作系统???????????????36
8
周全 ES体系结构的研究及其应用
3.4 应用软件的设计 ???????????????????????????37
3.3.1 模块化设计??????????????????????????37
3.3.2 面向对象设计?????????????????????????38 3.3.3 低功耗设计??????????????????????????38
第四章 嵌入式系统开发工具????????????????????????39 4.1 ADS v1.2集成开发环境 ????????????????????????39
4.1.1 调试的概念 ??????????????????????????41 4.1.2 目标系统接口 ?????????????????????????42 4.1.3 调试系统 ???????????????????????????43 4.1.4 Multi-ICE仿真器 ????????????????????????44 4.2 Easy Pack仿真器介绍 ?????????????????????????46
第五章 μC/OS-II v2.51到8051的移植 ????????????????????49 5.1 获得源代码v2.51???????????????????????????49 5.2 代码结构图 ?????????????????????????????49 5.3 μC/OS-II结构详解 ??????????????????????????51
5.3.1 μC/OS-II运行过程 ???????????????????????51
5.3.2 调度的发生 ??????????????????????????52 5.3.3 体系结构相关代码 ???????????????????????53 5.4 μC/OS-II的移植 ???????????????????????????53
5.4.1 结构说明 ???????????????????????????53 5.4.2 使用KEIL C51建立RTOS ?????????????????????56 5.5 基于μC/OS-II的嵌入式应用的时空指标分析???????????????59 5.5.1 影响时空指标的因素 ??????????????????????59
5.5.2 运行的时间效率????????????????????????61
第六章 μC/OS-II v2.51到ARM7的移植 ???????????????????63 6.1 开发环境 ??????????????????????????????63 6.2 评估板 ???????????????????????????????63 6.3 使用μHAL ?????????????????????????????66 6.4 使用Flash??????????????????????????????66 6.5 ARM和ADS 1.2 ????????????????????????????67 6.6 μHAL在移植中的作用 ????????????????????????68 6.7 总结??????????????????????????????72 6.8 下一步工作?????????????????????????????73
第七章 基于Linux的嵌入式系统??????????????????????75 7.1 Linux简介??????????????????????????????75 7.2 开发工具 ??????????????????????????????75 7.2.1 宿主(Host)平台 ???????????????????????75 7.2.2 需要的软件代码 ????????????????????????75 7.3 构建工具和内核 ???????????????????????????76 7.4 建立系统 ??????????????????????????????77
9
扬州大学硕士学位论文
总结 ??????????????????????????????????79
论文发表情况 ??????????????????????????????81
致谢 ??????????????????????????????????83
参考文献 ????????????????????????????????85
附件:程序清单??????????????????????????????87
10