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