基本步骤如下
下述内容基于Ubuntu16.04开发
1.编写源文件helloworld.c
#include <stdio.h>
int main(void)
{
printf("Hello world!\n");
return 0;
}
2.交叉编译源文件
arm-none-linux-gnueabi-gcc-4.4.1 helloworld.c -o helloworld -static
3.拷贝可执行文件到开发板/data目录下
adb push helloworld /data
4.修改可执行文件权限
chmod 777 helloworld
5.运行
./helloworld