My first fortnight with the Raspberry Pi

The 12th of June was a good day for me. For one thing, I received the second semester results for my course to find that I’d received A grades in all three subjects and come close to perfect in C programming. For another, my Toolkit, the diverse set of computers which I own, gained another member in a new Raspberry Pi, bringing my computer collection up to eight.

The Raspberry Pi, for those who don’t already know, is an ARM-based single-board computer with a 700MHz ARM11 processor, 256MB of RAM, a powerful GPU and a very low price tag, on the order of £25 for the Model B version which includes a 10/100 Ethernet port and two USB slots in comparison to the single USB slot on the yet-unreleased Model A. Demand has been staggering, and after several months of waiting, I finally had my hands on a Raspberry Pi of my own.

Unfortunately, my worry that I had either bought an SD card which didn’t work or that my Raspberry Pi might be faulty prevented the first boot from being as exciting as it should have been, but once I had realised my own mistakes and resolved them, I had another working Linux system in front of me, ready to test. A few hours were spent loading some of my preferred software which wasn’t loaded onto the Debian image by default, including Emacs, but the Debian Squeeze image gave a remarkably complete starting system with enough programming tools to get going almost immediately.

Having failed to locate my HDMI to DVI lead which would give me a bit more flexibility when it comes to monitor choice – I don’t own any monitors with HDMI support – I resorted to the composite connection, which I’ve set up to provide 640×480 support – enough to show 80 columns in text mode and to show a couple of windows using X. It’s not exceptional, and compared to the full 1080p performance that the HDMI slot can deliver, it’s really quite awkward, but the provision of the composite socket was a good idea by the Raspberry Pi Foundation, giving the Raspberry Pi the ability to run on a fairly wide arrangement of monitors and TV screens.

My collection of computers means that I’m not exactly short of Linux PCs, so after doing a brief test of the GCC compiler and Python interpreter, I decided to begin looking for resources to learn something which the Raspberry Pi is well-suited for – ARM assembly language. Perplexingly, while resources on learning ARM assembly language are reasonably available on the internet, most of the resources on learning Linux assembly language seem to be related to the x86 architecture – an architecture with much uglier assembly language, with far less user-available registers and a CISC model which means that there are operations to learn with more variance between them than on the ARM’s RISC model.

I have managed to find sufficient materials to make a start, though, so I’ve managed to make some headway into learning how the ARM processor works, which will hopefully give me a bit more insight into how the processor works and how code can be effectively optimised. As the Debian Squeeze image for the Raspberry Pi comes with GCC as default, as any good, full Linux distribution should, the appropriate assembler was already present, and there are, of course, a lot of technical details about the ARM architecture’s instruction set available from ARM themselves. All I can really do of my own accord so far is to do simple arithmetic or bitwise logical operations, but everybody has to start somewhere.

I haven’t really tested the performance of the Raspberry Pi to its full yet, but I do have a somewhat similar embedded system with broadly similar specifications in my hacked Wii console, which also runs Debian Linux with the same LXDE desktop environment as on my Raspberry Pi. The Raspberry Pi seems to run more smoothly than the Wii running Linux, possibly a consequence of the greater RAM. There are a few slowdowns when loading Emacs on X, but Emacs doesn’t even load instantaneously on my dual-core desktop, so the slight pause is something I’m willing to tolerate. Anyway, the greatest strength of the Raspberry Pi is meant to be in its GPU, and I haven’t tested that yet, so my call on the Raspberry Pi’s performance will be more complete when I have a more full picture. So far, though, I can’t complain – it should serve the educational audience well enough to fit the programming tasks which the Raspberry Pi Foundation seem to have at the front of their minds.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: