Developing Standalone Linux Applications |
Development of standalone Linux applications relies on the ARM GCC toolchain included in the Yocto SDK. The SDK is built as part of the Yocto Linux build procedure, and is packaged into a self-installing archive with the following name: A archive with prebuilt Yocto SDK can be downloaded from the following link: Yocto SDK Being on your Linux cross-development host, go through the steps described below to install the C/C++ SDK and develop standalone Linux applications (those built outside of the Yocto build).
The Yocto SDK is installed on the Linux development host using the following command: [user@localhost ~]$ chmod 755 fsl-imx-wayland-glibc-x86_64-image-pmd-debug-aarch64-toolchain-5.4-zeus.sh
After installation, the Yocto SDK environment needs to be activated. The activation process configures paths to the SDK tools and sets up various environment variables, required by the SDK. The environment activation can be done using the following command (which needs to be performed every time a new instance of shell is opened): [user@localhost ~]$ source /opt/fsl-imx-wayland/5.4-zeus/environment-setup-aarch64-poky-linux
Let's go through the step required to develop and build a simple "Hello, world" C application.
[user@localhost ~]$ $CC -o hello hello.c The resultant hello binary is ready to be tested on the i.MX 8M Mini target.
[user@localhost ~]$ scp hello root@192.168.1.10:/tmp Note that the i.MX 8M Mini IP address in the above command may differ, depending on your configuration. root@imx8mmcube2g:~# cd /tmp |