嵌入式linux应用开发完全手册学习笔记三(windows、linux下工具使用)

windows\linux环境下相关工具、命令的使用


windows环境下的工具
source insight代码阅读编辑工具,发现本人桌面上居然有3.5版本,这可能是在合肥MTK培


训时装的。


使用source insight3.5以内核源码为例
1 创建一个source insight工程
options-->document options-->document type选择c source file-->在file filter中
添加"*.S"
然后project-->new project-->
工程名为linux-2.6.35.7,工程保存路径为 D:\tools\kernel-project\sc-->ok
-->指定内存源码存放路径为:D:\tools\kernel-project\linux-2.6.35.7-->ok
-->addall-->选中
include top level sbu-directories(添加第一层子目录下的文件)
recursively add lower sub-directories(添加所有子目录文件)
-->ok
2 从工程中移除文件
projects-->add and remove project files
-->
arch目录下除arm外的所有子目录
arch/arm目录下的以mach-开头的目录(所用开发板除外)
arch/arm目录下以plat-开头的文件(同上)
include目录下以asm-开头的文件(asm-arm asm-generic除外)
include/asm-arm目录下的以arch-开头的文件(开发板除外)

3 同步源文件
project-->synchronize files-->force all files to be re-parsed(强制分析所有文件)
-->ok


cuteftp 与linux服务器进行文件传输


securecrt 远程登录linux进行各类操作


file-->connect-->new session-->选择ssh2或serial-->
hostname(服务器ip)、username(用户名)-->选择串口一-->设置波特率为115200-->
数据位为8-->不使用效验位-->停止位为1-->不使用控制流






linux环境下的工具、命令介绍


代码阅读、编辑工具kscope

下载kscope-1.6.2.tar.gz,解压
[root@localhost tools]# tar -xzvf kscope-1.6.2.tar.gz
执行./configure会提示如下错误信息
configure: error: The important program kde-config was not found!


安装kdelibs3 与kdelibs3-devel



本地yum源配置过程
1挂载本地镜相
2 编辑/ect/yum.repos.d/rhel-debuginfo.repo
内容如下:
[Cluster]
name=Red Hat Enterprise Linux $releasever - $basearch - Cluster
baseurl=file:///mnt/cdrom/Cluster
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[ClusterStorage]
name=Red Hat Enterprise Linux $releasever - $basearch - ClusterStorage
baseurl=file:///mnt/cdrom/ClusterStorage
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[Server]
name=Red Hat Enterprise Linux $releasever - $basearch - Server
baseurl=file:///mnt/cdrom/Server
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[VT]
name=Red Hat Enterprise Linux $releasever - $basearch - VT
baseurl=file:///mnt/cdrom/VT
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release


3修改/usr/lib/python2.4/site-packages/yum/yumRepo.py文件
中第 787 行
remote = url + '/' + relative
修改为:
remote = "/mnt/cdrom/Server" + '/' + relative




[root@localhost cdrom]# yum search kdelibs-devel
[root@localhost cdrom]# yum install kdelibs-devel
再执行./configure错误信息如下
configure: error: Qt (>= Qt 3.3 and < 4.0) (headers and libraries) not found.


Please check your installation!


输入以下命令:
./configure --x-includes=/usr/include/X11/ --x-libraries=/usr/lib/ --with-qt-


dir=/usr/lib/qt-3.3 --with-qt-includes=/usr/lib/qt-3.3/include/ --with-qt-


inclues=/usr/lib/qt-3.3/lib/


得到makefile文件后,进行编译
[root@localhost kscope-1.6.2]# make
错误信息如下:
/usr/bin/ld: cannot find -lkateinterfaces


下载
libkate-0.3.7-1.el5.rf.i386.rpm
libkate-devel-0.3.7-1.el5.rf.i386.rpm
地址为:
http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/
安装


重新编译make


安装graphviz库
[root@localhost kscope-1.6.2]# yum install graphviz
[root@localhost kscope-1.6.2]# make install


然后在图形界面上应用程序--->编程--->kscope








远程登录工具c-kermit集成网络通信、串口通信


下载地址http://www.columbia.edu/kermit/ck90.html#source
解压
[retacn@localhost tools]$ tar -zxvf cku302.tar.gz -C kermit
[retacn@localhost tools]$ cd kermit/
[retacn@localhost kermit]$ make linux
[root@localhost kermit]# cp wermit /usr/local/bin/
[root@localhost kermit]# cp wart /usr/local/bin/


如果提示
Sorry, you must SET LINE or SET HOST first
则创建.kermrc的配置文件
[root@localhost retacn]# vi ~/.kermrc
添加如下内容:
set line /dev/ttyS0
set speed 115200
set carrier-watch off
set handshake none
set flow-control none
robust
set file type bin
set file name lit
set rec pack 1000
set send pack 1000
set window 5
c


[root@localhost retacn]# kermit
Connecting to /dev/ttyS0, speed 115200
Escape character: Ctrl-\ (ASCII 28, FS): enabled
Type the escape character followed by C to get back,
or followed by ? to see other options.


vi编辑器


vi编辑器的三种模式
命令行模式:可以进行复制/粘贴/删除操作,无法录入信息
插入模式:可以录入信息,esc返回命令行模式
底行模式:文件的保存退出操作








命令行模式下常用功能键


i 切换到插入模式,
a 同上
o 同上
ctrl+b 后翻一页
ctrl+f 前翻一页
ctrl+u 后翻半页
ctrl+d 前翻半页
0 移到本行开头
$ 光标所在行的行尾
g 移到文章最后
ng 移到第n行
n+enter 向下移到第n行
/name 向下查找name字符串
?name 向上查找name字符串
x 删除光标后一个字符
dd 删除光标所在行
ndd 向下删除n行
yy 复制光标所在行
nyy 向下复制n行
p 粘贴
u 恢复前一个动作




底行模式下常用功能键
:w 保存
:q 退出
:q! 强制退出不保存
:wq 保存退出
:w[filename] 重命名保存
:set nu 显示行号
:set nonu 取消行号显示


常用命令
http://blog.csdn.net/retacn_yue/article/details/8454423

猜你喜欢

转载自retacn-yue.iteye.com/blog/1774684