Cross Compile with SDK
Setup the environment to make development easier.
Get and install the SDK
Download the SDK from Releases section of this project.
Create a directory for the SDK where you will download and install the SDK.
mkdir toolchain
cd toolchain
Once you have downloaded the SDK, unpack it in your newly created toolchain folder.
Install the SDK
Still inside the toolchain
folder. Run the following commands to install the SDK.
chmod +x oecore-x86_64-i586-toolchain-nodistro.0.sh
./oecore-x86_64-i586-toolchain-nodistro.0.sh
nemox86 SDK installer version nodistro.0
========================================
Enter target directory for SDK (default: /usr/local/oecore-x86_64): ~/toolchain/
Setting up the environment
You will notice that the SDK has installed environment-setup-i586-oe-linux
file in the directory. This contains all the important environment variables for the SDK. Before the SDK works you need to source the environment.
. ~/toolchain/environment-setup-i586-oe-linux
Compile Hello World
Create empty helloworld.c file and paste following:
#include <stdio.h>
int main(void)
{
printf ("Hello World!\n");
return 0;
}
Now we can compile it:
make helloworld
Output should be executable binary.
Remote Debugging
TODO, more info on Yocto Dev-Manual.