嵌入式開發環境搭建之安裝交叉編譯工具鏈,嵌入式編譯工具

來源:互聯網
上載者:User

嵌入式開發環境搭建之安裝交叉編譯工具鏈,嵌入式編譯工具

如果開發環境是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

安裝成功。

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.