跳至主要内容

【转】vivi开发笔记(六):GNU Tools开发工具综述

文章说明:calmarrow(lqm)原创

文章引自:http://piaoxiang.cublog.cn

 
    "工欲善其事,必先利其器",掌握嵌入式开发工具的使用是进行嵌入式开发的前提条件之一。基本的工具使用过gcc、gdb、make、vi,而且都只是掌握基本的用法。现在要深入到vivi开发项目中,才发现最基本的开发工具仍然没有掌握好。
 
    嵌入式开发工具有很多,商业的、开源的都有。应该选择一种开发工具集,并且熟练应用。GNU Tools是Linux环境下最主要的开发工具集,现在不少商业软件都把GNU Tools作为IDE的一个组成部分,比如英培特的Embest IDE 2004支持的两套开发工具之一就是GNU Tools。选择GNU Tools,一则免费,二则使用广泛,技术支持好。为了更有效的开发嵌入式系统,至少需要了解和掌握如下几类工具:
 
    (1)编译开发工具(即能够把一个源程序编译生成为一个可执行程序的软件)GCC
    GCC,它并不只是一个C Compiler,GCC实际是GNU Compiler Collection的简称,可以支持C、C++、Object C、JAVA、Fortran、PASCAL等多种高级语言,主要包括如下工具:
 
    cpp:GNU预处理器(Preprocessor),主要用于扩展用户源程序的头文件和宏定义。GNU C Compiler在编译前自动使用cpp对用户程序进行转换。
    gcc:符合ISO等标准的C编译器
    g++:基本符合ISO标准的C++编译器
   
    (2)调试工具(即能够对执行程序进行源码或汇编级调试的软件)GDB
    (3)软件工程工具(用于协助多人开发或大型软件项目的管理的软件)make、cvs
    (4)文本差异处理工具diff、patch
    diff可以用来方便的制作补丁,patch是补丁安装程序,可以根据diff生成的补丁来更新程序。
    (5)二进制工具(既能够对二进制文件进行处理的软件工具)binutils
    bintils是一组二进制工具程序集,它包括addr2line、ar、as、ld、nm、objcopy、objdump、ranlib、size、strings、strip等,是辅助GCC的主要软件。
 
    要想了解GNU Tools的方方面面,这是不现实的。可行的思路就是首先熟悉常用工具的常用选项,在后续的实践开发中逐步深入掌握。这几天的时间就是要掌握GNU Tools常用工具的最常用的使用方法,同时掌握相关的概念,从而为深入分析vivi做好准备,也为将来的项目开发打好基础。
 
掌握其基本用法:diff、patch、gcc、gdb、make
下一步需要掌握:1 as 2 ld 3 ar 4 nm 5 objcopy 6 objdump 7 readelf 8 strip

评论

此博客中的热门博文

【转】smb协议栈使用示例

/*  * * uncdownload.c  * *  * * Utility for downloading files from SMB shares using libsmbclient  * *  * * Copyright(C) 2006 Sophos Plc, Oxford, England.  * *  * * This program is free software; you can redistribute it and/or modify it under the terms of the  * * GNU General Public License Version 2 as published by the Free Software Foundation.  * *  * * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without  * * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  * * See the GNU General Public License for more details.  * *  * * You should have received a copy of the GNU General Public License along with this program; if not,  * * write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA  * *  * */ # include < sys / types . h > # include < sys / time . h > # include ...

【转】Ether Types

Ether Types (last updated 2008-09-09) NOTE: Please see [RFC5342] for current information and registration procedures. This registry will be revised soon and will be replaced with up-to-date information. Many of the networks of all classes are Ethernets (10Mb) or Experimental Ethernets (3Mb). These systems use a message "type" field in much the same way the ARPANET uses the "link" field. If you need an Ether Type, contact: IEEE Registration Authority IEEE Standards Department 445 Hoes Lane Piscataway, NJ 08854 Phone +1 732 562 3813 Fax: +1 732 562 1571 Email: <ieee-registration-authority& ieee.org > http://standards.ieee.org/regauth/index.html The following list of EtherTypes is contributed unverified information from various sources. Another list of EtherTypes is maintained by Michael A. Patton and is accessible at: <URL: http://www.cavebear.com/CaveBear/Ethernet/ > <URL: ftp://ftp.cavebear.com/pub/Ethernet-codes > Assign...

【转帖】berkeleyDB安装

我们以redhat9为例开始介绍其安装过程: 从其sleepycat公司官网的下载页 http://dev.sleepycat.com/downloads/releasehistorybdb.html 获得其安装包,现在已经更新到4.4.20.   #tar zxfv db-4.x.tgz   #cd db-4.x/build_unix   1. 如果以gcc编译的话,进行以下操作:   #vi /dist/configure 在最前面添加:CC gcc   #../dist/configure   #make   #make install   默认状态,berkeleyDB的lib和include将被安装到/usr/local/BerkeleyDB/下,需要更改这个路径的话,可以将 #../dist/configure一步加上选项--prefix,例如:#../dist/configure --prefix=/opt/BerkeleyDB.   #vi /etc/ld.so.conf 并将berkeleyDB的lib路径加到该文件的最后一行,这样才能找到并加载它的库文件.ld.so.conf是什么东西?它就是系统动态链接库的配置文件。此文件内,存放着可被LINUX共享的动态链接库所在目录的名字(系统目录/lib,/usr/lib除外),各个目录名间以空白字符(空格,换行等)或冒号或逗号分隔。   #ldconfig   2. 如果以armgcc编译的话,进行以下操作:   先安装armgcc,对我说就是在/mnt/setup/program/FFT/FFT-2410光盘-V3.0/linux开发/linux交叉编译器/tool或者在gmail中附件里armgcc目录下(除了cross-armv4l-qtE-custom-1.5-3mz.i386.rpm,其他都装)   #cp /mnt/setup/program/FFT/FFT-2410光盘-V3.0/linux开发/linux交叉编译器/tool /usr/tmp/   #cd /usr/tmp/tool   #rpm -ivh *   #ldc...