Page 1 of 1

Cross compiling

Posted: Mon Mar 19, 2018 12:09 pm
by punchingkan
How do i cross compile a c program written for Sama5d27_som_ek?

Thank You
Punchingkan

Re: Cross compiling

Posted: Mon Mar 19, 2018 1:27 pm
by punchingkan
I am so sorry, i did not give complete information. How do i cross compile a c program for sama5d27_som_ek that is running on linux. Is there anything that is similar to GCC in ubuntu to compile programs on board.

Thank You
Punchingkan

Re: Cross compiling

Posted: Mon Mar 19, 2018 6:23 pm
by sirdan
Hello,

What build environment are you using? Buildroot, Yocto, etc?

Regards,
Dan

Re: Cross compiling

Posted: Tue Mar 20, 2018 8:24 am
by punchingkan
Its yocto

Re: Cross compiling

Posted: Tue Mar 20, 2018 9:09 am
by sirdan

Re: Cross compiling

Posted: Tue Mar 20, 2018 4:12 pm
by thackerp

Re: Cross compiling

Posted: Fri Mar 30, 2018 4:04 pm
by punchingkan
Thanks thackerp

i have written a c program with just

#include<stdio.h>
void main()
{
printf("hello world");
}

i navigated to /sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi

and entered ./arm-poky-linux-gnueabi-gcc helloworld.c

but it says stdio.h not found

Re: Cross compiling

Posted: Mon Apr 02, 2018 4:34 pm
by thackerp
Read the paragraph title "Use Atmel Poky Qt-Embedded SDK:" in the link I sent. After you have sourced your environment, type $CC helloworld.c on the command line to build your program.