In case you can't tell by this point, I really like the Raspberry Pi. It's self-contained, it's easy to break out, it's a great learning tool, and it's portable as all heck. And as much as I love toying around with the stuff it can already do, I've been itching for a long while to look into lower-level development--I haven't done much in the past and I figured the Pi would be a good place to start. Thus, I'm proud to introduce...!(/content/images/2015/11/raspi_thing.png)
Essentially, this will chronicle my blundering attempts to build something original and useful out of the RasPi, starting from bare metal. And that's where I started. I first needed something with which to talk to my RasPi, and for that, I'd recommend this excellent USB to UART cable. It worked fine for me with no configuration on both Windows and Linux. Second, take a look at this page, specifically the part about Raspbootin and Raspbootcom. It's a handy little tool written to eliminate the necessity of rewriting a kernel image to your SD card over and over. I originally started looking at that page--and its more detailed C companion--but I dislike it because it jumps into C far more quickly than I would have preferred; it throws a lump of code at you and says "this is what it does, analyze it and have fun". So I kept poking around and found this gem. It's a tutorial written for true bare metal development, working in assembly. It covers GPIO access, screen output (say what now!) and even basic keyboard input. This companion page also helped me a lot, because I'm fairly new to assembly.
I would highly recommend doing any work on Linux, simply because it's easier. It's a pain to get GCC on Windows as it is, and yeah, it's probably possible to get an ARM cross-compiler up and running on Windows, but I haven't the cardiac strength to try. This tutorial was a blessing. You'll have to add the path to the cross-compile tools to your PATH and/or modify the makefiles provided with the above-linked assembly; if you don't understand this, Google's probably your best friend. I took a few tries, but things are up and running now and I'm progressing through the tutorials.
I'm really excited about this work because it's a twofold opportunity. First, it's a chance to learn some nice bits and pieces of assembly, which I'm hoping will be useful in general. Second, it's (in my opinion) an awesome project. I have a probably disgustingly naive vision of a small screen hooked up to the thing along with a battery pack and a nest of sensors serving as a portable computer or assistant. "But we already have these! They're called phones!" you may cry. True, we do. And I have two responses to this. The first is that projects like these feel as though they'd help pave the way for another interest of mine, biointegration and augmentation. It's certainly not a total pipe dream--battery packs definitely exist (and hey, for the record, if you'd like to help make it an actual thing, donations are always welcome!), as do the required sensors, and screen technology covers such a vast expanse that I'd be hardpressed to not find an appropriate display. The second is, let's face it, compare a phone to a circuit board strapped to somebody. Which is cooler?
Once I get through the lessons and start working on my own stuff, I'll be posting updates on it (and perhaps putting everything up on GitHub). In the meantime, thanks for reading and stay tuned!
Subscribe to Kienan Knight-Boehm
Get the latest posts delivered right to your inbox