Cross-Compile C programs on AR9331 processor running Openwrt-Yun

Hi everyone,

I've been searching and trying for the past two days to cross-compile a simple C program on the Arduino Yun without much success. I am wondering if someone can provide a detailed step-by-step tutorial to run a simple helloworld C program on the AR9331 processor running Openwrt-Yun on the Arduino-Yun. The main things that will components that will be very helpful are: 1) Which SDK/Toolchain to use 2) How to setup the toolchain/SDK 3) How to use the toolchain SDK 4) What are the dependencies/libraries that need to be installed 5) How to create a package to run on the Yun.

The system I am using is 32-bit Ubuntu 12.04.

Thanks in Advance, Moe Joseph

No need cross-compile;-

Hello world MIPS Assembly Language

http://forum.arduino.cc/index.php?topic=266549.msg1879510#msg1879510

Hello world C example

http://forum.arduino.cc/index.php?topic=266549.msg1997972#msg1997972

Hello world C++ example

http://forum.arduino.cc/index.php?topic=266549.msg1881809#msg1881809

Plan A-F

http://forum.arduino.cc/index.php?topic=241368.msg1755247#msg1755247

Plan G-J

http://forum.arduino.cc/index.php?topic=241368.msg1756252#msg1756252

Compile on other system for yun-gcc

http://forum.arduino.cc/index.php?topic=279177.msg1969333#msg1969333

If you go the yun-gcc route, here are some detailed instructions: gcc & g++ on an arduino-yun This is compiling on the yun itself not cross-compiling. You definitely need to use an sdcard with the expanded disk space for this to work.

The first step to cross compile is to build OpenWrt:build openwrt

Once this is done you have a tool chain to cross compile (compiler, assembler, linker, etc)

I really like this setup for the eclipse IDE: eclipse.pdf but if you like using the command line this may help: Compiling small C++ Program