跳至主要内容

【转】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...

【转】udp编程实例

UDP通讯实例 2008-04-29 15:30:05 / 个人分类: linux C编程 UDP协议的几点好处: 1.UDP不要求保持一个连接; 2.UDP没有因接收方认可收到数据包(或者当数据包没有正确抵达而自动重传)而带来的开销; 3.设计UDP的目的是用于短应用和控制信息; 4.在一个数据包接一个数据包的基础上,UDP要求的 网络 带宽比TCP更小。 UDP的几个缺点: 1.程序员必须创建代码检测传输错误并进行重传(如果应用程序要求这样做); 2.程序员必须把大数据包分片。 code: <1> /* * sender.c--UDP protocol example */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <netdb.h> int port = 6789; int main() {     int socket_descrīptor;     int iter = 0;     char buf[80];     struct sockaddr_in address;     /* Initialize socket address structure for Interner Protocols */     bzero(&address, sizeof(address)); // empty data structure     address.sin_family = AF_INET;     address.sin_addr.s_addr = inet_addr("127.0.0.1");     address...