《嵌入式系统设计与实践:LINUX篇》刘加海,厉晓华【pdf】

20180100430.jpg

本书内容包括在嵌入式系统概述中论述了嵌入式微处理器与嵌入式操作系统、嵌入式开发流程,
分析了嵌入式最小系统与 S3C2410 开发板、ARM 处理器指令、ARM9 的 S3C2410 主要部件及参数
设置,论述了嵌入式系统开发环境的构建、嵌入式 Linux 引导程序概述与移植、内核定制与根文件
系统制作、嵌入式图形环境的设置与编程初步、嵌入式 Web 环境的设置、设备驱动程序设计基础、
步进电机驱动的设计、数码驱动程序设计、LCD 驱动参数的配置与编译、SD 卡驱动参数的配置与
编译、嵌入式系统设计分析,最后给出了十四个 Linux 环境下嵌入式系统实验设计。
本书结构合理、概念清晰、重点突出、案例实用性强,可以直接应用在项目设计

目录:

第 1 章 嵌入式系统概述····································································· 1
1.1 嵌入式系统概述··················································································2
1.1.1 嵌入式系统定义································································································ 2
1.1.2 嵌入式系统的特点····························································································· 2
1.2 嵌入式微处理器··················································································3
1.2.1 嵌入式微处理器组成·························································································· 3
1.2.2 嵌入式微处理器分类·························································································· 4
1.2.3 嵌入式微处理器系统架构···················································································· 5
1.3 嵌入式操作系统··················································································6
1.3.1 DOS··············································································································· 6
1.3.2 Windows CE····································································································· 7
1.3.3 Palm OS·········································································································· 7
1.3.4 EPOC············································································································· 7
1.3.5 VxWorks ········································································································· 7
1.3.6 μC/OS············································································································· 7
1.3.7 ucLinux··········································································································· 7
1.3.8 Linux·············································································································· 8
1.4 嵌入式应用························································································9
1.4.1 消费电子······································································································· 10
1.4.2 信息家电······································································································· 10
1.4.3 汽车电子······································································································· 10
1.4.4 工业控制······································································································· 10
1.4.5 通信网络······································································································· 11
1.4.6 医疗电子······································································································· 11
1.4.7 商业金融······································································································· 11
嵌入式系统设计与实践
2
1.5 嵌入式设备的构成············································································· 12
1.5.1 嵌入式硬件系统······························································································ 13
1.5.2 嵌入式软件系统······························································································ 13
1.5.3 嵌入式外围设备······························································································ 13
1.5.4 家庭安防系统································································································· 14
1.6 嵌入式系统的开发流程······································································· 15
1.6.1 建立开发环境································································································· 15
1.6.2 配置开发主机的参数························································································ 15
1.6.3 建立引导装载程序 BOOTLOADER······································································ 15
1.6.4 下载已经移植好的 Linux 操作系统内核 ······························································· 15
1.6.5 建立根文件系统······························································································ 16
1.6.6 建立应用程序的 FLASH 磁盘分区······································································ 16
1.6.7 开发应用程序································································································· 16
1.6.8 烧写内核、根文件系统和应用程序,发布产品······················································· 16
第 2 章 嵌入式最小系统与 S3C2410 开发板········································· 19
2.1 嵌入式系统硬件模块分析 ·································································· 20
2.2 ARM 微处理器概述 ·········································································· 23
2.2.1 ARM9 微处理器特点······················································································· 25
2.2.2 ARM 选型原则 ······························································································ 26
2.3 嵌入式最小系统················································································27
2.4 S3C2410 处理器概述·········································································29
2.4.1 S3C2410 芯片的功能单元················································································ 30
2.4.2 S3C2410 芯片的系统管理 ················································································ 30
2.4.3 S3C2410 芯片的启动模式 ················································································ 31
2.4.4 S3C2410 系统结构························································································· 31
2.4.5 S3C2410 的引脚分布及信号描述······································································· 32
2.4.6 S3C2410 芯片与端口相关的寄存器···································································· 34
2.4.7 端口 A 引脚定义及功能设置············································································· 34
2.4.8 端口 B-H 引脚定义及功能设置 ········································································· 35
2.5 嵌入式开发板···················································································40
2.6 嵌入式系统中常用硬件模块·································································41
第 3 章 ARM 处理器指令概述 ·························································· 58
3.1 ARM 微处理器的指令的分类与格式 ·····················································59
3.2 ARM 指令的寻址方式 ·······································································59
3.2.1 立即寻址 ···································································································· 59
3
目 录
3.2.2 寄存器寻址 ································································································· 60
3.2.3 寄存器间接寻址 ··························································································· 60
3.2.4 基址寻址 ···································································································· 61
3.2.5 变址寻址 ···································································································· 61
3.2.6 多寄存器寻址 ······························································································ 62
3.2.7 相对寻址 ···································································································· 62
3.2.8 堆栈寻址 ···································································································· 62
3.3 常用 ARM 指令··················································································63
3.3.1 内存访问指令 ······························································································ 63
3.3.2 算术运算指令 ······························································································ 63
3.3.3 逻辑运算指令 ······························································································ 64
3.3.4 mov 指令 ···································································································· 64
3.3.5 比较指令 ···································································································· 64
3.3.6 跳转指令 ···································································································· 64
3.3.7 条件执行指令 ······························································································ 65
3.4 汇编语言的程序结构及在 ADS 环境下调试··············································66
3.4.1 汇编语言程序结构 ························································································ 66
3.4.2 汇编语言编辑、运行与调试 ············································································ 67
3.5 汇编语言与 C/C++的混合编程 ······························································73
3.5.1 C 语言程序调用汇编语言程序········································································· 74
3.5.2 汇编程序调用 C 语言程序··············································································· 79
第 4 章 S3C2410 主要部件及参数设置················································86
4.1 NAND FLASH 控制器 ·······································································87
4.1.1 NOR FLASH 和 NAND FLASH 比较································································ 87
4.1.2 S3C2410 NAND FLASH 控制器······································································· 87
4.1.3 NAND FLASH 启动过程················································································ 88
4.1.4 NAND FLASH 存储器接口············································································· 89
4.1.5 NAND FLASH 寄存器参数描述······································································· 90
4.2 中断控制器······················································································94
4.3 系统定时器······················································································98
4.4 异步串行口·····················································································106
4.5 IIC 总线接口 ··················································································109
4.6 A/D 转换控制器 ··············································································111
第 5 章 嵌入式系统开发环境构建······················································ 115
5.1 嵌入式 Linux 开发环境的硬件连接 ······················································116
嵌入式系统设计与实践
4
5.1.1 嵌入式硬件系统 ··············································································116
5.1.2 PC 宿主机与嵌入式硬件设备的连接 ·······················································116
5.2 嵌入式 Linux 开发环境设置·······························································117
5.2.1 嵌入式开发环境配置流程 ····································································118
5.2.2 关闭防火墙 ···················································································119
5.2.3 minicom 端口配置及使用 ···································································119
5.2.4 TFTP 服务配置及使用 ·······································································125
5.2.5 NFS 服务的配置 ·············································································129
5.3 交叉编译器的安装············································································130
5.3.1 安装交叉编译器 ·························································································· 131
5.3.2 用交叉编译器编译源程序 ·············································································· 132
5.3.3 简单测试嵌入式程序 ···················································································· 132
5.4 GDBServer 调试器············································································133
5.4.1 GDBServer 调试环境搭建 ···································································134
5.4.2 GDB 程序调试举例 ··········································································135
5.5 make 工程管理器·············································································139
5.5.1 Makefile 工程文件的编写 ···································································139
5.5.2 Makefile 变量的使用 ········································································144
5.5.3 Makefile 文件对其他 Makefile 文件的引用 ················································148
5.5.4 Makefile 中的函数 ···········································································148
5.5.5 运行 make ·····················································································150
第 6 章 嵌入式 Linux 引导程序························································· 154
6.1 BootLoader 概述··············································································155
6.2 BootLoader 主要程序段分析·······························································157
6.2.1 阶段 1——汇编代码分析················································································· 157
6.2.2 阶段 2——C 语言函数功能介绍········································································ 161
6.3 U-BOOT 的移植过程········································································162
第 7 章 内核定制与根文件系统制作··················································· 166
7.1 Linux 内核移植 ···············································································167
7.1.1 内核移植的基本概念······················································································ 167
7.1.2 内核移植的准备 ··························································································· 167
7.1.3 内核移植的基本过程······················································································ 168
7.1.4 内核移植的具体操作 ····················································································· 169
7.2 Linux 根文件系统的制作···································································177
7.2.1 根文件系统概述···························································································· 177
5
目 录
7.2.2 建立根文件系统 ··························································································· 178
第 8 章 嵌入式图形环境的设置与编程初步 ········································186
8.1 MiniGUI 图形环境的设置··································································188
8.1.1 MiniGUI 的特点 ··························································································· 188
8.1.2 MiniGUI 开发环境 ························································································ 188
8.1.3 MiniGUI 的配置和交叉编译 ············································································ 188
8.1.4 实例程序的编译安装······················································································ 189
8.1.5 板载 Linux 的图像显示环境配置 ······································································ 190
8.1.6 一个简单的 MiniGUI 程序 ·············································································· 190
8.2 Qt 图形环境的设置 ··········································································197
8.2.1 Qt 的特点 ··································································································· 197
8.2.2 Qt 的开发环境 ····························································································· 198
8.2.3 Qt 集成开发工具的使用 ················································································· 200
8.2.4 Qt 应用实例分析 ·························································································· 205
第 9 章 嵌入式 Web 环境的设置······················································213
9.1 Linux 环境下 Web 服务器 ·································································214
9.1.1 CGI 通用网关接口技术 ····································································214
9.1.2 Web 动态服务的流程 ······································································215
9.2 Linux 环境下基于 thttpd 动态服务器的实现过程·····································215
9.3 Linux 环境下基于 Boa 的动态服务器实现·············································218
9.3.1 应用 Boa 软件实现动态 Web 服务器的方法 ···············································218
9.3.2 通过动态 Web 页面访问远程温度传感器的例子 ··········································222
9.4 用 DMF 实现 Linux 下的动态 Web 服务器··············································223
9.4.1 Web 服务器的配置························································································ 223
9.4.2 动态 Web 页面的访问···················································································· 225
第 10 章 设备驱动程序设计基础······················································· 228
10.1 设备驱动程序的概念 ·······································································229
10.2 驱动程序的设计流程 ·······································································231
10.2.1 字符驱动程序设计流程 ················································································· 231
10.2.2 驱动程序流程设计举例 ················································································· 233
10.3 Linux 字符设备驱动程序设计····························································235
10.3.1 字符设备驱动程序数据结构 ··········································································· 235
10.3.2 字符设备驱动程序的基本框架 ········································································ 240
10.4 字符设备驱动程序实例——虚拟字符设备············································242
嵌入式系统设计与实践
6
10.4.1 结构体设计 ································································································ 243
10.4.2 设备驱动读、写函数的设计 ··········································································· 243
10.4.3 字符设备驱动程序设计步骤 ··········································································· 245
10.4.4 字符设备驱动程序测试 ················································································· 248
10.5 字符设备驱动程序实例——GPIO 的驱动程序设计 ·································249
10.5.1 S3C2410 可编程输入、输出 GPIO··································································· 249
10.5.2 S3C2410 的 GPIO 设置 ················································································ 250
第 11 章 步进电机驱动的设计 ·························································· 264
11.1 步进电机概述 ················································································265
11.2 嵌入式 Linux 步进电机驱动程序设计流程············································266
11.3 步进电机驱动程序需求分析 ······························································267
11.4 步进电机驱动的设计 ·······································································268
11.4.1 步进电机驱动程序设计过程 ··········································································· 268
11.4.2 步进电机应用程序设计 ················································································· 271
11.4.3 步进电机驱动程序编译与调试 ········································································ 273
第 12 章 数码驱动程序设计 ···························································· 279
12.1 数码驱动原理 ················································································280
12.2 LED 数码管····················································································281
12.2.1 LED 驱动电路相关器件的功能特性································································· 281
12.2.2 驱动电路中显示模块 ···················································································· 282
12.3 数码驱动程序设计实例 ····································································282
12.3.1 系统分析 ··································································································· 282
12.3.2 系统硬件设计 ····························································································· 284
12.3.3 系统软件设计 ····························································································· 285
12.4 系统设计操作步骤 ··········································································289
12.4.1 键盘驱动程序设计步骤 ················································································· 289
12.4.2 LED 驱动程序设计步骤················································································ 294
12.5 LED 数码显示测试程序设计·····························································299
第 13 章 LCD 驱动参数的配置与编译················································ 305
13.1 LCD 概述·····················································································306
13.1.1 液晶显示器原理 ·························································································· 306
13.1.2 液晶显示器种类 ·························································································· 306
13.2 S3C2410 内置 LCD 控制器 ······························································307
13.2.1 S3C2410 LCD 控制器特性············································································· 307
7
目 录
13.2.2 TFT 屏与 S3C2410 内部 LCD 控制器······························································ 307
13.3 LCD 驱动程序设置流程···································································309
第 14 章 SD 卡驱动参数的配置与编译·············································· 314
14.1 SD 卡概述····················································································315
14.1.1 SD 卡应用································································································· 315
14.1.2 SD 卡的辨别······························································································ 315
14.1.3 SD 卡的接口定义及管脚功能········································································· 316
14.1.4 SD 卡的寄存器··························································································· 317
14.1.5 S3C2410 与 SD 卡的连接·············································································· 318
14.2 SD 卡驱动参数的配置·····································································319
14.2.1 SD 卡驱动参数的配置流程············································································ 319
14.2.2 SD 卡配置步骤··························································································· 319
14.3 生成 cramfs 文件系统······································································324
14.4 SD 卡读写校验··············································································326
第 15 章 嵌入式系统设计概述 ························································· 328
15.1 嵌入式 Linux 下 IC 卡接口设计与驱动开发···········································329
15.1.1 IC 卡设备触点硬件电路介绍·········································································· 329
15.1.2 IC 卡读卡电路简介······················································································ 329
15.1.3 IC 卡设备驱动模块的实现详解······································································· 330
15.1.4 驱动模块开发的编译调试 ·············································································· 333
15.1.5 驱动模块的静态编译进内核 ··········································································· 333
15.2 嵌入式 GPS 导航系统的设计 ····························································334
15.2.1 与 GPS 相关的一些概念················································································ 334
15.2.2 嵌入式 GPS 导航系统··················································································· 336
15.2.3 嵌入式 GPS 导航系统的硬件设计···································································· 337
15.2.4 嵌入式 GPS 导航系统的软件设计概述······························································ 338
15.2.5 嵌入式 GPS 导航系统的应用·········································································· 339
15.3 嵌入式 Linux 系统中触摸屏控制的研究与实现······································339
15.3.1 Linux 下的设备驱动··················································································· 339
15.3.2 嵌入式 Linux 系统下的驱动程序 ····································································· 340
15.3.3 触摸屏的应用程序 ······················································································· 341
15.4 嵌入式智能家居系统分析 ·································································343
15.4.1 智能家居系统概况 ······················································································· 343
15.4.2 智能家居系统的实现技术与方式 ····································································· 344
15.4.3 中心控制系统 ····························································································· 346
嵌入式系统设计与实践
8
15.4.4 系统软件设计 ····························································································· 346
15.4.5 客户端软件设计 ·························································································· 347
15.5 数字视频监控终端在 linux 环境下的设计与实现····································347
15.5.1 数字视频监控终端概况 ················································································· 348
15.5.2 视频监控系统解决方案 ················································································· 348
15.5.3 视频监控系统的研究热点 ·············································································· 349
15.5.4 视频监控系统的研究方案 ·············································································· 349
Linux 环境下嵌入式系统实验设计······················································· 352
附 录·························································································· 468

 

资源下载此资源下载价格为800知识币,请先
友情提示:
资源下载费用不足,可签到所得到。
搜索不到需要的书籍,请留言(书名+作者)。 充值优惠:充值 100 元,实际到账 150 元。
资源下载
下载价格:800 知识币
VIP优惠:5 折
友情提示:
资源下载费用不足,可签到所得到。
搜索不到需要的书籍,请留言(书名+作者)。 充值优惠:充值 100 元,实际到账 150 元。
0

评论0

请先

充值优惠:充值 100 元,实际到账 150 元
没有账号? 注册  忘记密码?