Hallo Carambola

Today I got my Carambola boards (thank you Matze). The Carambola is a MIPS based SoC from 8devices. It uses the Ralink RT3050 which includes a high performance 320MHz MIPS24KEc CPU core, 8 MB Flash and 32 MB RAM. The device also provides two Ethernet ports and w a 802.11bgn radio. And best of it all: it is very low cost (about 22 EURO). For a quick start I also ordered a devboard, which breaks out RS232, the PYHs for the two Ethernet ports, and some of the GPIO pins of the CPU. The board comes with a pre-installed OpenWrt distribution, but building the distribution on your own is very simple and well described in the Carambola wiki.

Thus, after compiling and installing the firmware (which worked flawlessly on Ubuntu 12.04), I couldnt resists on soldering some 2×10, 2,54 female headers to the devboard, and see if I could blink some LEDs for „Hello Carambola“.

It turned out to be very simple. OpenWrt provides a tool called "gpioctl". It allows you to configure a GPIO as output or input, and also to set/clear an output, or get the state for an input:

gpioctl dirin|dirout|get|set|clear gpio

The first parameter is the command, the second one the number of the GPIO. E.g. to refer to GPIO1, one would pass 1 as second argument. To refer to GPIO5, 5 is passed an so on. On the J5 header of the devboard, the GPIOs 1 and 2 are available on pins 13 and 15, ground is located on pin 18. For the full pinout see this wiki page.

What I did was connecting a blue LED each between pin 13/15 and ground. Then configured this pins as output: