Colin Walls has over thirty years experience in the electronics industry, largely dedicated to embedded software. A frequent presenter at conferences and seminars and author of numerous technical articles and two books on embedded software, Colin is an embedded software technologist with Mentor … More »
February 16th, 2015 by Colin Walls
Sometimes I think that there is nothing truly new in the world. With technology, it is often a question of the time being right. It occurred to me that the current enthusiasm for multi-core designs is really nothing new. I browsed some of the literature and titles like “Multi-core is here now” have been appearing for at least 5 years. But it goes back further still. I was working on a multi-core system in 1980 … Read the rest of Vintage multi-core – introduction
January 19th, 2015 by Colin Walls
The term “real time” is widely used nowadays. Although it is a technical term, it finds its way into quite normal conversation. I might be heard to say “I do not watch much real-time TV”, meaning that I record programs to watch at my convenience. So, colloquially, real time means “immediate” or “occurring now”. How does this align with its precise meaning when we refer to a real time operating system, for example? … Read the rest of What is “real time”?
December 15th, 2014 by Colin Walls
The idea of inlining code – placing the actual code of a small function at each call site – is a well known compiler optimization, which I have discussed before. This technique can provide significant performance improvements, due to the elimination of the call/return sequence. Also, stack usage is reduced. There is a possible cost in terms of increased program memory requirement.
It is reasonable to expect a good C or C++ compiler, when told to compile for speed, to perform inlining automatically. Some C compilers have extensions to give more control over this, but C++ has intrinsic support for inlining within the language … Read the rest of Staying in line
November 21st, 2014 by Colin Walls
The computer world is often accused of being mired in jargon and I think that is a fair criticism. In some ways it gets worse when an everyday word is “hijacked” to have a new meaning. A good example is “program”, which had several meanings before it was applied to software. Interestingly, in the UK we use the US spelling (“program”) to refer to software, but retain the English version (“programme”) for everything else.
Another re-purposed word is “memory”, which is interesting because it has acquired a number of meanings in a computing context. Historically, the term referred to the place that a program and data resided during execution – it still does have this meaning. But it was also used to refer to bulk storage like disk drives. Even today, when someone tells me how much memory their PC has, I have to make sure that they are not telling me about disk storage. For embedded systems, memory has always been a term with a number of meanings … Read the rest of Thanks for the memory
October 15th, 2014 by Colin Walls
There are two aspects of any product that give me great pleasure: good design and quality of manufacture. This applies to just about anything: a pair of shoes, a car, a house, a piece of software … Assessing both these parameters can be hard. A pair of shoes must look good, be comfortable to wear and last well; this takes time to evaluate. A car needs to be enjoyable to ride in, drive well and offer long term reliability and economy; again, not something to be measured quickly. A house can be even more difficult, as you need to live in it through a full year of seasons at least and, even then, you may still be evolving the way that you use the space, which will establish how good the original design was.
September 15th, 2014 by Colin Walls
Life is often about compromise, but embedded developers really are not good at that. Code generation is a context in which compromise is somewhat inevitable and we call it “optimization”. All modern compilers perform optimization, of course. Some do a better job than others. A lot of the time, the compiler simply guesses which optimization will produce the best result without knowing what the designer really wants. For desktop applications, this is OK. Speed is the only important criterion, as memory is effectively free. But embedded is different … Read the rest of Small or fast?
August 15th, 2014 by Colin Walls
I am interested in programming languages in general and particularly as they apply to embedded systems programming. The most popular programming language for embedded continues to be C. Clearly it offers the capabilities and facilities that most developers need today, but what comes next?
I think we can get some ideas by looking at the genealogy of C – where it comes from and how it relates to other languages … Read the rest of C, C++ and the family tree
July 22nd, 2014 by Colin Walls
Like most people nowadays, I have a selection of electronic devices that have become part of the fabric of my life. I have certain expectations: I want a device to do what it is supposed to do. I want it to be easy to use. I am after reliability. I want it to consume the minimum amount of power – either to conserve battery life or to simply be environmentally friendly. Lastly, I want the device to be available and ready to use when I want it.
As such devices are generally embedded systems, my requirements are generally met [or not!] by the software. It is the last of my criteria, and the influence that software might have on it, that I find particularly interesting…
There are a selection of factors that can affect the availability and readiness of a device. Obviously, it has to be affordable and compatible with the rest of my world. For a portable device, its power consumption affects availability, as a dead battery can be something of a show stopper. But a really key parameter is start up time. How fast a device starts up can have a significant effect upon its usability.
June 17th, 2014 by Colin Walls
The Agile methodology has been talked about for some years. To be frank, I have given the matter very little attention – I just had a basic idea of what it was all about. I suppose I had a feeling that the approach was rather chaotic and disorganized, which is at odds with my view of what programming should be like. However, I attended a talk at a conference a while ago which changed my mind. The presenter was, in essence, trying to sell some project management tools that support the Agile methodology. But he also described the philosophy in terms that I could appreciate. I realized that what was being proposed was very similar to the approach that I have espoused for many years … Read the rest of Agile embedded
May 20th, 2014 by Colin Walls
At the heart of a real time operating system (RTOS) is the kernel, which is comprised of the task scheduler and a bunch of services that are available for application programs. Control of the scheduler and access to these services is by means of the kernel’s application program interface (API). APIs differ from one RTOS to another (although there are some standards, like POSIX), but there are some characteristics which are common to many. One of those similarities is the concept of blocking and non-blocking calls.
The idea is fairly straightforward. A program may make an API call to request a specific resource or service. Such a call may normally return with the required result and/or a pointer to requested resources. There may also be the possibility for an error result. But, what if the call is valid, but the resource or service cannot be provided at this time? There are two ways to make such a call, which differ in their response to this unavailability: a blocking call results in the task being suspended (put to sleep) and the task will be woken when the request can be fulfilled; a non-blocking call results in an error code being returned and the task has the option of trying the call again later.