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

Hello world C example

Hello world C++ example

Plan A-F

Plan G-J

Compile on other system for yun-gcc

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