15 Dec 2016

It has been nearly two years since my last blog post. For the past two years, I have been busy with work related projects, and I haven’t had much time to update this blog. Yet again, I am going to attempt to put together a series of technical articles. Hopefully, this time, I will be more successful in following up on them. In this post, I’ll talk about a new embedded project I’ll be documenting here.

The last article I wrote, AES Reference Implementation in Haskell, explored the mechanics of AES. In the not-so-distant future, I intend to follow up on this article to talk about the parameterized random number generator I wrote using this reference implementation, as well as the more optimized version in C. Because of employment contracts at the time, I had to put that work down and leave it in a sort of legal purgatory. Now free of those constraints, I can once again freely write about security and cryptography. Expect me to develop this idea further in later posts.

My plan over the next few months is to write some articles exploring another area I’m passionate about, which is firmware development. For this series of articles, which I am calling the “Kinetis Deep Dive”, I am going to build an embedded device using a custom controller board and some off-the-shelf peripherals. In this article, I will be using an NXP Kinetis K11 microcontroller, which is a fairly sophisticated ARM Cortex-M4 based device. Instead of taking the standard formulaic approach of plugging and chugging with the SDKs available for this chipset, I will be building the OS and the peripheral drivers from scratch, so that I can explore the architecture of the Cortex-M4 in depth. In the process, I will be documenting the development of a toy operating system for the Cortex-M4 based loosely on ideas gleamed through reading Operating Systems Design and Implementation by Andrew S. Tanenbaum. This book describes the architecture of the Minix-3 microkernel for X86. I will be building a similar microkernel concept for the Cortex-M4, but without many of the bells and whistles provided in the book.

In my next article, I’ll begin exploring this process by setting up an embedded toolchain for an inexpensive evaluation board for this chipset, and testing this toolchain through the creation of a simple executable that can be debugged using GDB and a GDB server.