I recently read the Mythical Man-Month, a collection of essays on software engineering by Frederick Brooks. He writes about his observations and experiences from working at IBM and managing the OS/360 project in the sixties. The book was first published in the 1975 which, I have to say, shows in the examples. Many parts feel a bit dated now (like the discussion how to do time-allocation on a central computer). Still, if you look past the old technical references the essays contain a lot of good general guidelines and observations that are still relevant today.
One of the essays that especially caught my attention was “Plan to Throw One Away”. As the title implies, it suggests that one should throw away the first system and use the lessons learned to build the second, real system.
Continue reading “Don’t build one to throw away, iterate”
The ARM Thumb-2 instruction set is not a new thing. In fact it was announced already in 2003. Yet, the standard ARM instruction set is often still used because it is the default option, while Thumb-2 could be a better alternative. This post explains why the Thumb-2 can be a better option for many applications and also how to configure it in Yocto build system for Linux kernel, system libraries, utilities and user binaries. Continue reading “Why and how to enable ARM Thumb-2 instruction set in Yocto”
I was working with a device that used Atmel SAMA5D3x MCU. Sometimes the devices needed to be re-flashed which required putting the MCU to programming mode. However, the device enclosure needed to be opened and also a jumper wire was needed to do this. Then I realized that it would be possible to enter the programming mode directly from Linux by manipulating boot sequence controller registers in the MCU. Writing a dedicated device driver for this seemed like an overkill so I wrote a simple utility application with mmap instead.
Continue reading “Access hardware from userspace with mmap – Atmel SAMA5D3x programming mode case study”
Recently I was working on an embedded Linux IoT device that communicated with cloud using MQTT protocol. The software in the device was divided into multiple applications that also required interprocess communication. We ended up using MQTT also for the local communication, and it turned out to be a good decision. Continue reading “Using local MQTT broker for cloud and interprocess communication”
Even though I work with C/C++ projects that are not related to Qt technology, QtCreator has become my main code editor. Here I explain some of the main reasons why I prefer it over other alternatives. Continue reading “My editor of choice for C/C++: QtCreator + FakeVim”
A while back I read the Working Effectively with Legacy Code by Michael C. Feathers. The book focuses on strategies and approaches to get existing untested legacy code covered by unit tests.
The book also includes more than twenty dependency-breaking techniques that can be used for new code as well to make it easily testable in the first place. Here I have picked three of the techniques that I have personally found most useful.
- Interfaces to abstract implementation
- Extract and override call
- Expose static method
Continue reading “C++ tips for easier unit testing”
Trusted platform module (TPM) is a secure element that can be used to securely generate and store keys. It has many possible uses, one of which is encryption of sensitive data. This article describes how to use TPM and tpm-tools package on Linux environment to encrypt different types of data, how to encrypt filesystem partitions and how to bind the encryption with device state.
Continue reading “How to use TPM for encryptions”
In the true open-source spirit, the authors of some great Linux kernel books have decided to make these books freely available for everyone. They are good material for anyone interested in the Linux kernel, and also a good reference for professionals working with the kernel. At least I have personally found these books very useful.
Continue reading “Free books for Linux kernel enthusiasts”