Wednesday 3 June 2015

Baremetal OS development

A year ago I had decided that I wanted to try writing a simple OS for my MINI2440 development board. The motivation was that this machine being quite powerful why waste cycles on running a full fledged OS like Linux.

Also I wanted to know how far I can go trying to bring an ARM machine to life with just my baremetal code. Being so close to the metal had always fascinated me. I had written code for micro-controllers such as the MSP430 and the STM32F103ZE and had some experience in bringing up an MCU but never brought up an entire SoC.

So the baremetal OS was born. I named it MDK (microcontroller development Kit) for developers and a kernel the MDK-OS. The idea was to have a development kit for the developers and also to have a small kernel.

This brought me to my first commit here:

https://github.com/mindentropy/s3c2440-mdk/commit/c4a9f316b4c8fd6f7984a1209b5cc473fdd3d13e


Ah the joy of seeing the LED's blink. The initial commit featured a Makefile, a linker script an assembly file for the intial interrupt vector table and the main 'C' file which contained the code to blink the LED.

What a joy it was to watch this simple code run.

In this blog I will be explaining and writing my experiences in writing the OS and the development kit. Hope this will act as a learning kit for people who want to write their own OS.


Writing is nature’s way of showing us how sloppy our thinking is.


No comments:

Post a Comment