SniGoal

配置RaspberryPi交叉编译环境

2013-05-01

os: ubuntu

1.安装交叉编译工具

sudo apt-get install gcc-arm-linux-gnueabi

2.编写测试程序并编译

程序源码:
#include <stdio.h>
int main() {
printf(“Hello World!\n”);
return 0;
}

编译指令:
V
arm-linux-gnueabi-gcc hello.c

3.在RaspberryPi上测试运行

通过scp命令上传到RaspberryPi上

scp a.out pi@[ip]:~/

ref

www.neohe.tk/raspberrypi-cross-compile/

扫描二维码,分享此文章