1、下載交叉編譯鏈
xilinx-2011.09-50-arm-xilinx-linux-gnueabi.bin,直接搜這個,網上有資源。
2、安裝依賴庫
sudo apt-get install lib32ncurses5 lib32z1
3、修改shell
sudo dpkg-reconfigure -plow dash
,在出現的界面中選no
4、安裝
./xilinx-2011.09-50-arm-xilinx-linux-gnueabi.bin
,如果提示權限不夠,則使用chmod 777
添加權限,安裝過程一直enter就行
5、配置環境
export CROSS_COMPILE=arm-xilinx-linux-gnueabi-
export PATH=/root/CodeSourcery/Sourcery_CodeBench_Lite_for_Xilinx_GNU_Linux/bin:$PATH
注意第二行命令,要根據你實際安裝的路徑進行設置,如果你安裝的時候是用root安裝的,則上面的配置是正確的,如果用普通用戶,則安裝路徑可能位于/home/usrname/CodeSourcery/Sourcery_CodeBench_Lite_for_Xilinx_GNU_Linux/bin
6、驗證
arm-xilinx-linux-gnueabi-gcc -v