嵌入式软件开发实验指导书

上传人:公**** 文档编号:429910850 上传时间:2023-04-15 格式:DOC 页数:89 大小:1.73MB
返回 下载 相关 举报
嵌入式软件开发实验指导书_第1页
第1页 / 共89页
嵌入式软件开发实验指导书_第2页
第2页 / 共89页
嵌入式软件开发实验指导书_第3页
第3页 / 共89页
嵌入式软件开发实验指导书_第4页
第4页 / 共89页
嵌入式软件开发实验指导书_第5页
第5页 / 共89页
点击查看更多>>
资源描述

《嵌入式软件开发实验指导书》由会员分享,可在线阅读,更多相关《嵌入式软件开发实验指导书(89页珍藏版)》请在金锄头文库上搜索。

1、嵌入式软件开发实验指导书李军 梁吉胜2010年10月28日嵌入式软件开发实验指导书目录3 实验一 Linux 开发基础4一、常见命令测试4二、文件与目录命令测试:8三、标准输入输出与重定向及管道 13四、Linux帮助系统16五、Linux下的网络服务18一、实验目的21二、实验内容21三、预备知识21四、实验设备及工具21五、实验原理及说明21六、实验步骤22实验三 Linux C程序设计33一、VI编辑器的使用33二、使用gcc编译器,编译程序35三、使用动态库36四、使用静态库37五、Makefile的编写(参考)38实验四 Linux的实验环境的搭建44一、实验目的44二、实验内容44

2、三、实验设备44四、实验步骤44实验五 linux内核、文件系统的移植与下载51一、实验目的 51二、实验内容 51三、实验设备 51四、linux的移植说明51实验六 基于Linux的键盘驱动程序的编写57一、实验目的57二、实验内容57三、实验设备57四、键盘驱动程序的编写57五、实验演示步骤(动态加载)63实验七 搭建Qt4实验环境65一、实验目的65二、实验内容65三、实验设备65四、实验步骤65实验八 基于QT的对话框程序设计实验70一、实验目的70二、实验内容70三、实验设备70四、实验步骤70实验九 五子棋游戏开发实验80一、实验目的80二、实验内容80三、实验设备80四、实验步

3、骤80五、最后编译、连接和运行84嵌入式软件开发实验指导书 实验一 Linux 开发基础一、常见命令测试1. 访问http:/kernel.org/ 网站了解最新的Linux内核发布情况2. 掌握Linux登录的两种方式正常的图形用户界面登录,优点:操作界面美观,熟悉,缺点:图形界面会占用系统一部分资源3关机命令 分别用shutdown -help和init -help命令查看帮助信息,记下如下两条命令的作用分别用man shutdown和man init命令查看帮助信息,记下如下两条命令的作用Shutdown -h nowInit 0思考:若计划在5分钟后关机,该输入啥命令,在16:30分关

4、机,该输入啥命令提示部分: Runlevels 0, 1, and 6 are reserved. Runlevel 0 is used to halt the sys- tem, runlevel 6 is used to reboot the system, and runlevel 1 is used to get the system down into single user mode.# Default runlevel. The runlevels used by RHS are:# 0 - halt (Do NOT set initdefault to this)# 1 - S

5、ingle user mode# 2 - Multiuser, without NFS (The same as 3, if you do not have networking)# 3 - Full multiuser mode# 4 - unused# 5 - X11# 6 - reboot (Do NOT set initdefault to this)# id:3:initdefault:时间 设置多久时间后执行shutdown命令。时间参数有hh:mm或+m两种模式。hh:mm格式表示在几点几分执行shutdown命令。例如“shutdown 10:45”表示将在10:45执行shu

6、tdown。+m表示m分钟后执行shutdown。比较特别的用法是以now表示立即执行shutdown。值得注意的是这部分参数不能省略。Shutdown h +5 Shutdown h 16:304 关机前发送广播命令 wall ,通知大家保存信息rootlocalhost root# wall computer will shutdown in 3minutes ,please save what you are doing Broadcast message from root (pts/0) (Fri Jun 15 10:19:57 2007): computer will shutdo

7、wn in 3minutes ,please save what you are doing5 退出服务器或当前用户命令: exit6 查看当前系统支持的shellrootlocalhost root# ls /bin/*sh*/bin/ash /bin/ash.static /bin/bash /bin/bash2 /bin/bsh /bin/csh /bin/sh /bin/tcsh7 查看命令的返回值rootlocalhost root# ls /bin/*sh/bin/ash /bin/bash /bin/bsh /bin/csh /bin/sh /bin/tcshrootlocalh

8、ost root# echo $?0rootlocalhost root# $?-bash: 0: command not foundrootlocalhost root# echo $?127rootlocalhost root#8 修改用户口令rootlocalhost root# passwdChanging password for user root.New password: BAD PASSWORD: it is too simplistic/systematicRetype new password: passwd: all authentication tokens upda

9、ted successfully.rootlocalhost root#10. 用户认证rootlocalhost root# iduid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel)rootlocalhost root# su qianzgqianzglocalhost root$ iduid=500(qianzg) gid=500(qianzg) groups=500(qianzg)qianzglocalhost root$9 查看当前用户命令who10 Echo 命令

10、 在终端显示字符串 11 Cat命令查看文件内容 rootlocalhost root# echo how are youhow are yourootlocalhost root# echo how are you aarootlocalhost root# cat aahow are yourootlocalhost root#12 Date 显示或设置日期或时间 请设置当前时间为: 2008年10月23日14点25分 rootlocalhost root# date五 6月 15 16:08:33 CST 2007rootlocalhost root# date 10231425二 10

11、月 23 14:25:00 CST 2007 rootlocalhost root# date 102314252008四 10月 23 14:25:00 CST 2008rootlocalhost root#13rootlocalhost root# cal 六月 2007日 一 二 三 四 五 六 1 2 3 4 5 6 7 8 910 11 12 13 14 15 1617 18 19 20 21 22 2324 25 26 27 28 29 30rootlocalhost root# cal 7 2008 七月 2008日 一 二 三 四 五 六 1 2 3 4 5 6 7 8 9 1

12、0 11 1213 14 15 16 17 18 1920 21 22 23 24 25 2627 28 29 30 31rootlocalhost root# cal 07 7 一月 二月 三月 日 一 二 三 四 五 六 日 一 二 三 四 五 六 日 一 二 三 四 五 六 1 1 2 3 4 5 1 2 3 4 5 2 3 4 5 6 7 8 6 7 8 9 10 11 12 6 7 8 9 10 11 12 9 10 11 12 13 14 15 13 14 15 16 17 18 19 13 14 15 16 17 18 1916 17 18 19 20 21 22 20 21 2

13、2 23 24 25 26 20 21 22 23 24 25 2623 24 25 26 27 28 29 27 28 27 28 29 30 3130 31 四月 五月 六月 日 一 二 三 四 五 六 日 一 二 三 四 五 六 日 一 二 三 四 五 六 1 2 1 2 3 4 5 6 7 1 2 3 4 3 4 5 6 7 8 9 8 9 10 11 12 13 14 5 6 7 8 9 10 1110 11 12 13 14 15 16 15 16 17 18 19 20 21 12 13 14 15 16 17 1817 18 19 20 21 22 23 22 23 24 25 26 27 28 19 20 21 22 23 24 2524 25 26 27 28 29 30 29 30 31 26 27 28 29 30 七月

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 大杂烩/其它

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号