Rediscovering the delights of C

The last few months have been an interesting journey for me. Not only have I been having loads of fun (and quite a few late nights) with my Raspberry Pi experimentations, but I have also been spending my working days programming in C. It came as a bit of a surprise when I was first …

Continue reading ‘Rediscovering the delights of C’ »

Developing memory-mapped IO

I’m trying to make a concerted push on a first working version of CORNELIUS at the moment, and it’s throwing up all sorts of interesting aspects of software development. For the first version I am building the minimum OS and language in C. However, I am trying very hard to minimise the amount of C …

Continue reading ‘Developing memory-mapped IO’ »

Automatic Raspberry Pi board revision detection: model A, B1 and B2

When the raspberry Pi model A was announced a few days ago, I ordered one straight away. With three different models of raspberry Pi now available (or four, if you count the red Chinese variant), working out the capabilities of the board is becoming increasingly important. It’s vital for anyone involved in making hardware or …

Continue reading ‘Automatic Raspberry Pi board revision detection: model A, B1 and B2’ »

Why is it so hard to build Raspberry Pi Linux drivers?

A few days ago I complained a bit about the profusion and confusion around the Linux drivers for the PiBorg LEDBorg multi-colour LED. With a bit of renewed energy, I thought I’d have a go at improving the situation by including a test for board revisionin the driver and ensuring that the correct GPIO pins …

Continue reading ‘Why is it so hard to build Raspberry Pi Linux drivers?’ »

Pulse Width Modulation for dimming LEDs

Since getting all excited about flashing Morse code on a on a LEDBorg, I have been wondering about how to control it to get the best out of its three LED colours.The way to do this is to individually turn up and down the brightness of the three LEDs, thus changing the proportions of the …

Continue reading ‘Pulse Width Modulation for dimming LEDs’ »

Unit testing bare-metal Raspberry Pi code

A few days ago I took a few small steps toward creating a project structure and build process which would allow me to build and test the majority of my bare-metal Raspberry Pi code on my development (Windows or Linux) machine, with only the very hardware-specific bits needing to be built and tested on the …

Continue reading ‘Unit testing bare-metal Raspberry Pi code’ »

Morse code on a big, bright, LEDBorg

I have already proved to myself that I can set up and control the OK LED on the Raspberry PI board from a bare-metal C program, but I didn’t really feel that I entirely understood what was going on. The cop-and-paste code to set up and switch the GPIO line used for the OK LED …

Continue reading ‘Morse code on a big, bright, LEDBorg’ »

Building Raspberry Pi code for unit tests

So far, despite working on a variety of bare-metal software features for the Raspberry Pi, I have not managed to achieve my aim of using the principles of TDD (Test-Driven Development). In my “day job” I make a lot of use of TDD techniques, and I am convinced that this approach both greatly improves the …

Continue reading ‘Building Raspberry Pi code for unit tests’ »

How to read Raspberry Pi board revision and memory size

As I mentioned yesterday, I now have some new Raspberry Pi boards to play with, and also some extra hardware. I had planned to spend this evening writing some GPIO code to control the colours and brightness of the LEDborg. I even got as far as plugging it in to one of the boards. Then …

Continue reading ‘How to read Raspberry Pi board revision and memory size’ »