linux 主机和开发板交叉编译
1. 主机:
main.c
查看代码
#include <stdio.h>
int main()
{
printf("hello world!!\r\n");
return 0;
}
2. 执行静态编译
arm-linux-gnueabihf-gcc main.c -o hello --static
3. 复制应用到开发板/home/root
scp ./hello root@192.168.3.3:/home/root/
4. 开发板执行
root@myd-y6ull14x14:~# ./hello
hello world!!

浙公网安备 33010602011771号