一、配置eclipse为ARM嵌入式开发板编程
1-计算机环境
操作系统:window10
编程软件:Eclipse IDE for C and C++ Developers - 2022-09
Windows10环境下Eclipse的C++集成开发环境安装
交叉编译工具链:gcc-linaro-4.9.4-2017.01-i686-mingw32_arm-linux-gnueabihf.tar.xz
下载好之后解压得到:
2-创建eclipse项目
3-创建源文件
#include <stdio.h>
#include <stdlib.h>
int main(void){
print("hello!\n");
while(1){
sleep(10);
print("again!\n");
}
}
4-编译
#include <stdio.h>
#include <unistd.h>
int main(void){
printf("hello!\n");
while(1){
sleep(10);
printf("again!\n");
}
}
5-CPP程序
#include <iostream>
using namespace std;
int main(void){
cout << "hello!" << endl;
return 0;
}
6-在ARM开发板上尝试运行
二、配置eclipse