Application Compilation
In the early days, because processor performance was limited, storage space was scarce, and compilation throughput was low, early development boards generally used cross-compilation. Cross-compilation has several drawbacks: it cannot compile offline, the workflow is cumbersome, and the environment is complex to configure.
The GM-3568JHF processor is powerful, and compiling programs directly on the development board is fast. We therefore recommend compiling directly with the GCC toolchain integrated on the board, which saves a great deal of time otherwise spent transferring files.
The GM-3568JHF ships with a GCC compiler. We can view the GCC version with the following commands.
#查看gcc命令
gcc -v
#查看gcc的安装路径
which gcc
#如果没有gcc,下载安装
sudo apt update
sudo apt install gcc -yAs shown below:

The author's gcc version is 12.2.0. The gcc version number may differ depending on the image and system, but this does not affect compilation.
1 Compile an executable
Code:
#include <stdio.h>
int main(void)
{
printf("Hello World!\n");
return 0;
}Build steps:
#使用vi创建hello.c文件
vi hello.c
#键盘敲入'i'或'a'进入编辑模式
#复制代码到vim编辑器里
#键盘敲入'Esc'键
#然后敲入":wq" 保存并退出
#也可以直接把源码下载到板卡上,然后进行编译
#输入命令编译
gcc -o hello hello.c
#执行程序
./helloAs shown below:
