• 嵌入式开发环境搭建之安装交叉编译工具链


    如果开发环境是Linux,那么交叉编译工具链是必须的,具体安装过程如下:(以我现在用的为例)准备好制作好的交叉编译工具链arm-linux-gcc-3.4.5-glibc-2.3.6.tar.bz2

    cd work/toolchaintar
    xjf arm-linux-gcc-3.4.5-glibc-2.3.6.tar.bz2
    

     解压好后需要设置环境变量为了方面,不要每次使用时都要手动设置,可以在/etc/environment中修改PATH的值,如下:

    PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/haley/work/toolchain/gcc-3.4.5-glibc-2.3.6/bin"

    保存后立即生效

    source /etc/environment

    打开新的终端

    haley@ubuntu:~$ arm-linux-gcc -v
    Reading
     specs from /home/haley/work/toolchain/gcc-3.4.5-glibc-2.3.6/bin/../lib/gcc/arm-linux/3.4.5/specsConfigured
     with: /work/tools/create_crosstools/crosstool-0.43/build/arm-linux/gcc-3.4.5-glibc-2.3.6/gcc-3.4.5/configure
     --target=arm-linux --host=i686-host_pc-linux-gnu --prefix=/work/tools/gcc-3.4.5-glibc-2.3.6 --with-float=soft --with-headers=/work/tools/gcc-3.4.5-glibc-2.3.6/arm-linux/include
     --with-local-prefix=/work/tools/gcc-3.4.5-glibc-2.3.6/arm-linux --disable-nls --enable-threads=posix --enable-symvers=gnu --enable-__cxa_atexit
     --enable-languages=c,c++ --enable-shared --enable-c99 --enable-long-longThread
     model: posixgcc
     version 3.4.5

    安装成功。

     

  • 相关阅读:
    计算数组的逆序对个数
    处理类型(typedef,uisng,auto,decltype)
    constexpr与常量表达式(c++11标准)
    const的限定
    void*类型的指针
    linux终端拖动鼠标总是产生ctrl+c
    Linux hrtimer分析(2)
    Linux hrtimer分析(一)
    Alarm(硬件时钟) init
    第十一章 Android 内核驱动——Alarm
  • 原文地址:https://www.cnblogs.com/Ye-Jason/p/7353610.html
Copyright © 2020-2023  润新知