分类: LINUX
2008-10-17 16:52:29
下载交叉编译器
安装交叉编译器
sudo tar xvf cross-3.2.tar.bz2
sudo mkdir /usr/local/arm
sudo cp -R usr/local/arm/* /usr/local/arm
配置环境变量
sudo vim ~/.profile
add the following in the end:
export PATH=$PATH: /usr/local/arm
使环境变量生效
source ~/.profile
检查路径设置
echo $PATH
测试
#include
int main(void)
{
printf("Hello, world!\n");
return 0;
}
arm-linux-gcc -o hello hello.c