Monday, 16 August 2010

How to program the BeagleBoard

I've gotten a lot of questions over the past couple of weeks of people asking me, "how do I program the BeagleBoard?" It's not that silly of a question, actually, and it reminds me that I once asked this question too, only a couple of months ago.

The answer is: you don't! The BeagleBoard programs you! (just kidding, this isn't Russia)

In all seriousness, the BeagleBoard isn't like the Arduino, in that it doesn't have an IDE program that sits on the desktop and communicates with the board. Instead, all of its files exist on an SD card.

The BeagleBoard SD card is the easiest way to get programs and files on and off of the BeagleBoard. Just popthe SD card out of the BeagleBoard, pop it into a multi-card SD reader, plug the reader into the desktop USB port, and then copy files onto the SD card that you want to make available to the BeagleBoard.

Ok, here's a step-by-step guide:


Step 1: Turn BeagleBoard on it's side

In my case, I always leave the BeagleTouch on the front side of the BeagleBoard, so it can display graphics and the Linux OS on the screen.


Step 2: Locate the SD Card in the BeagleBoard

Every BeagleBoard is operated with software that is loaded on an SD card. This is different than the Arduino, because the Arduino stores all of it's data in a small area of Flash memory on the Atmel chip. The Atmel has something like 128-256K of space. The BeagleBoard SD card that I use (and sell pre-programmed) has 4 gigabytes of space. That's a huge difference...



Step 3: Remove SD Card from the BeagleBoard

This is not a very hard step:


Step 4: Plug SD Card into SD Card Reader

I use a Sony or Ultra one, only because I like the brushed silver / aluminum look.


Step 5: Plug SD Card Reader into PC

Using a USB cable that came with the reader:


Step 6: Copy Files to the SD Card

This is the hardest part of the whole thing, which isn't saying much. Basically it's really easy. You copy the files from your computer onto the SD card.

On Windows, it looks like this:


On Linux (and MacOS X), it looks like this:


Step 7: Install an Ext2 Partition Reader on Windows

Windows users have one extra step. The SD Card that runs the BeagleBoard has two partitions on it. One of those partitions is formatted in "vfat" which is the native format that Windows can read. This is the partition that stores the boot-up data.

The second partition is in a format called "ext2". That partition is where you want to copy the files on to the BeagleBoard. I'm not going to try to recount an explanation of ext2 here, but instead, there's a really good, easy read about it on wikipedia here. Here's the catch: Windows 7 can't read "ext2" out of the box, so you need a program to access the partition.

So to access ext2 on Windows 7, in theory, you have 3 options: Install Explore2fs (open source, free) from here, Install Diskinternals (freeware) from here, Install "Installable Ext2 File System for Windows" (freeware) from here.

I've only ever gotten it to work by following these instructions for the "Installable Ext2 File System for Windows". Here's a tutorial on how to get that working.

After you've installed one of those programs, you can now access the ext2 partition, and copy data to and from it.

0 comments:

Post a Comment