Dr. Dobb's is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.

Channels ▼

Al Williams

Dr. Dobb's Bloggers

Bone Yard

May 21, 2012

One of the benefits of writing this blog is it gives me an excuse to buy fun toys. Sometimes vendors are kind enough to send something along for me to look at, but more often than not I see something interesting and just buy it, and I don't have to come up with a new excuse each time.

You may have noticed I do a lot in the "deeply embedded" space. That is, very small PIC, AVR, and low-end ARM processors. I still need more horsepower on occasion and for the last several years, small Linux systems have been well suited for larger projects.

Until recently, I'd been using some MINI2440 boards for Linux development. They aren't too expensive and have a nice LCD touchscreen you can mount on them. I'd seen the BeagleBoard, but decided there wasn't enough difference between them to bother building up another toolchain.

Earlier this year I noticed that the BeagleBoard had a new little sibling, the BeagleBone. Overall it is a very attractive package. For well under $100, you get a computer just a little bigger than a credit card (3.4" by 2.1") that uses a microSD card as mass storage. The board has a USB port for JTAG and serial (the board can also access the network via a host computer using this port). There's a USB port for peripherals, and a regular Ethernet port (not USB-based). The board brings out a lot of 3.3V I/O to some 0.1" headers (but they are dual, so forget plugging them into a breadboard).

Doubtless trying to ape the Arduino, the connectors allow for "capes" (instead of Arduino "shields" — why daughterboard is no longer good enough, I don't know). The CPU is an ARM Cortex-A8 running at 720MHz (or less if powering off USB) and it has 256MB of RAM.

The Raspberry Pi is the obvious competitor. However, I haven't been impressed with the supply of these computers, and the Pi uses an ARM11 and routes its Ethernet port through the USB controller. Of course, it is also much less expensive, but that assumes you can actually get one!

The next few weeks I want to further explore the BeagleBoard and embedded Linux, in general. To tell the truth, I had planned to do this several months ago when I first got the BeagleBoard, but it didn't make a very good first impression.

I got one of the A4 version boards (the 2nd run of PC boards, apparently). There was a hardware bug on the board that prevented the Ethernet port from working most of the time. It took a while to find the answer, which was to remove a surface mount resistor. This has been fixed in subsequent releases.

The other problem was the Linux distribution. You can load many different operating systems on the board (including Android, and some non-Linux operating systems like QNX and FreeBSD). By default, however, the board ships with a microSD card loaded with the Angstrom Linux distribution.

Angstrom is a tiny embedded distribution and comes with several really fun tools. However, the early version I had didn't really work very well. I recently stepped up to the May 9 release (you have to unpack a file to the microSD as detailed at here). The results have been much better.

You can find more details at the BeagleBone site, or you can plug a BeagleBone into your network, let it acquire an IP address via DHCP, and point a web browser at it. By default, the device shows a slide show about itself and offers you a choice of several tools, including Cloud9. The Cloud9 is an IDE that runs in your browser and lets you write code directly on the BeagleBone. I have found some of the examples to be a little flaky, but overall it does work (at least, the current version does).

The IDE supports JavaScript (well, node.js), PHP, and something called bonescript. Not only can you edit and run the code, but you can debug as well. As you'd expect, there are primitives for working with I/O and doing other tasks you'd need to do. For example, node.js programs can call the pinMode API call to set a pin to be an input or output. The digitalWrite API lets you set an output high or low. Programs can also do the same tasks by writing to "magic files" that handle I/O.

You can see the Cloud9 IDE running in the figure above. The example code in the figure, blinkled.js, appears below:

var bb = require('./bonescript');

var ledPin = bone.P8_3;
var ledPin2 = bone.USR3;

setup = function() {
    pinMode(ledPin, OUTPUT);
    pinMode(ledPin2, OUTPUT);

loop = function() {
    digitalWrite(ledPin, HIGH);
    digitalWrite(ledPin2, HIGH);
    digitalWrite(ledPin, LOW);
    digitalWrite(ledPin2, LOW);


If you prefer, any other language you can use for Linux will work as long as it runs on or targets ARM. You can even write in C (and host the compiler on the board, if you like, although I don't for any serious projects).

Although it does have some quirks, the BeagleBone is a capable little Linux box. I'm not sure how useful the Cloud9 IDE is for any real work, but your mileage may vary. I'll stick with cross compiling with GCC on my desktop, at least for now.

Are you using the BeagleBone? Or another similar board? Leave a comment and share your experiences. Next time, I'll have more to say about the BeagleBone.

Related Reading

More Insights

Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.