1/下载arm编译器,解压到你自己的目录
需要手动把linux.HEAD.tar相关的包放到buildroot/dl目录下);
tar -xvf xxxx.tar.gz
2/export 输出环境变量
##声明临时变量
## 20210705
声明 临时 arm gcc 交叉编译环境变量
{自设路径}gcc
export CROSS_COMPILE=/home/bian/gpl/camera/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf/bin/arm-linux-gnueabihf-
##查看 当前交叉编译器版本
${CROSS_COMPILE}gcc -v
3/hello world push到开始板试运行
//${CROSS_COMPILE}gcc test_arm.c -o test
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <strings.h>
#include <signal.h>
#include <ctype.h>
#include <stdint.h>
int main()
{
while(1)
{
sleep(1);
printf("Hello world!!!\n");
}
return 0;
}