本节介绍如何编译可以在开发板上运行的应用,编译方法很简单。
基于:iTOP4412开发板
首先要确定一下环境变量,如下图所示,使用“cd”命令回到根目录,然后使用命令
“vim .bashrc”打开环境变量文件。
如下图所示,进入最底行,这里使用的和编译内核的编译器一样就可以。

使用命令“cd /home/linuxsystemcode/helloworld/”回到
“/home/linuxsyetemcode/helloworld”目录中,如下图所示,使用命令
“ARM-none-linux-gnueabi-gcc -o helloworld helloworld.c -static”,将当前目录下的 C
文件“helloworld.c ”编译成可执行文件“helloworld”;
“arm-none-linux-gnueabi-gcc ”表示使用 arm 编译器,对应 iTop4412 开发板;
“-static”表示将库也编译进去。

如下图所示,编译成功,生成“helloworld”文件
