Follow our illustrated blog on Embedded Software Architecture

How to build a hybrid solar/wind energy harvester?

The embedded hierarchy – Part3

Linux-based software platforms Linux kernel In this section the Linux kernel part of an embedded software platform is discussed. Compiler While FreeRTOS (see Part2) has support for several compilers, the Linux kernel community has chosen GCC. Although less flexible, it simplifies things a lot and allows developers to take advantage of gcc specific features and […]

Share

Responsive software design without threads — Part 1

We need a GUI thread. …is a common developer’s reaction when the application only responds slowly to user clicks. The developer might be right: when some (gui) events require a lot of processing then having more than one thread, e.g. a GUI thread and one or more worker threads, is one of the solutions. The […]

Share

The red-black tree and hash table

red-black tree The even more advanced container we look at now is the red-black tree, which is a type of self-balancing binary search tree. Especially, interesting is the time complexity in big O notation: Action/Subject       Average          Worst case Space                          O(n)                O(n) Search                        O(log n)    […]

Share

Vector, list and tree

Choice of containers Information technology, even embedded devices, is about information gathering, processing or calculation, and control. Input and data needs to be juggled around and maybe sorted. In this article, we want to point out some fundamental implications in the choice of a data container. Vector The first container is the array or “vector”. […]

Share

Priority inversion

I found the inspiration for this article while working on a consultancy job: Priority inversion. In computer science, priority inversion is a (potential) problematic scenario in scheduling in which a high priority task is indirectly preempted by a medium priority task effectively inverting the relative priorities of the two tasks. (http://en.wikipedia.org/wiki/Priority_inversion) To put it more […]

Share

Object-orientation in C – Part 4

We continue to build on the example in Part 3, but we go another step further. Even more abstraction and information hiding can be achieved by partially mimicking (part of) the COM manner of programming: strictly talking with interfaces. This style of coding is not for everybody, nor is it a fit for every project. […]

Share

The embedded hierarchy – Part2

So how can we represent the embedded hierarchy in software? Before we can answer this question, we must make our goals clear: setting up and defining a new board should be as easy as possible, and code re-use should be optimal. With these goals in mind, it is useful to divide the hardware hierarchy into […]

Share

The embedded hierarchy — Part 1

Good programming skills is not the only quality a software engineer needs to have in order to write extendable, reusable and manageable software. Understanding the domain is equally important because it enables you to build good abstractions, and to do correct configuration management (version control). This is no different in embedded software: creating or even […]

Share

Object-orientation in C — Part 2

In Part1 we have laid the foundation of how a class could look like in C. This simple class is good for creating an Abstract Data Type but it doesn’t support polymorphism and inheritance…yet. Here is an UML diagram (made with dia) of what we are trying to achieve in this post: Admitted, the example is not very original […]

Share

Beware of premature optimization

One should only write optimized code? No, one should not write only optimized code. One should write maintainable and readable code, which adheres to the KISS principle. Depending on the foreseeable scenario, certain optimizations could be introduced in order to meet the performance requirements. The dangers of early optimization “fever” are loosing yourself in the […]

Share