As my colleague Max pointed out, embedded hardware development has changed quite a bit over the past 20 years. Over that same period, engineers have seen some dramatic shifts in the nature of embedded software development – and the speed of those changes continues to accelerate. Today’s embedded software programmer would likely view development just 20 years ago as something of a horror show – or at best a jumble of arcana.
According to the 1997 Embedded Survey, over 7% of developers used a DEC VAX! In fact, that survey carefully documented use of inherently evil things like cross-compilers and ROMable DOS(!!), while the embedded systems work environment had little to do with software. Among their many details, Embedded surveys have over two decades documented some interesting trends in programming languages and OS platform.
In 1997, embedded developers used any number of programming languages (Figure 1A) — although one suspects the use of Cobol by the developers who included it in their answer said more about the diversity of their day job than their approach to embedded systems.
C and assembler rightly represented the predominant programming languages in 1997. Yet, that balance shifted quickly over the next few years. The ratio of assembler to C use was over 87% in 1997, dropping precipitously over the next 10 years to 11% according to the 2007 Embedded Survey (Figure 1B) and to 7% 10 years after that according to the 2017 Embedded Survey (Figure 1C).
Figure 1. Programming language use in embedded systems — 1997 (A), 2007 (B), and 2017 (C). (Source: Embedded.com)
While other programming languages maintained a relatively modest following, Python has emerged as an interesting alternative for embedded systems programming. Despite relatively low numbers of existing projects programming in Python (Figure 1C), it has certainly gained interest. In 2015, 2% of respondents said their next project would likely be programmed in Python. In 2017, that number jumped to 5%.
It’s risky to make too much of these limited results but some related trends add to the argument that Python (or some other higher level language) may shift the balance of software content away from C. In the case of Python, the Embedded survey’s numbers reflect the industry-wide growth in interest in the language (Figure 2). (For those not familiar with Stack Overflow’s language surveys, these are based on the amount of community activity around various languages – not conventional statistical surveys but nevertheless reflective of real interest.)
Figure 2. The rapid growth in interest in the Python programming is likely to continue, driven largely by growing availability of Python modules for data science and AI. (Image credit: Stack Overflow).
Likely the largest influence in Python’s growing popularity arises from its emergence as a popular language for data science and AI. Along with Python analytics libraries such as scikit-learn and Pandas, developers can explore machine learning in Python with Google’s groundbreaking TensorFlow library. Although these capabilities might have minimal impact on embedded developers today, the trend toward migration of intelligence from the cloud to the edge of the IoT adds reason to consider Python’s emergence as a viable part of embedded development.
Even so, embedded developers already find growing support for Python in more conventional embedded systems designs. Versions of Python such as MicroPython and CircuitPython are optimized for the resource constraints of embedded systems. Most developers working in hard real-time designs will laugh at the concept of using Python, however optimized, for their designs. Yet, history suggests the ratio of C to Python use may at some point change in a fashion not dissimilar to that of assembler to C use.
Along with trendy libraries and embedded variants, another enabler for Python’s growth in embedded is the continual shift toward more powerful hardware platforms. One of the fascinating results from the Embedded surveys is the evolution of the processor and associated functionality built into embedded hardware designs. The surveys do show significant but incremental shifts toward the kind of high-end processors you’d likely use for running Python code much less AI libraries.
In fact, the surveys showed little change in the number of MCU devices used in the same design over the past few years with around 50% of designs using a single (possibly multicore) MCU device, 20% using two or more devices, and 15% using 3-5 devices. What’s interesting is the nearly 5x increase in the use of homogeneous multicore MCUs and over 2x increase in heterogeneous multicore MCUs over the past decade (Figure 3). Between that and higher performance processor cores across all architectures, developers certainly have growing access to hardware platforms able to support more advanced algorithmic processing in Python or other higher level language.
Figure 3. Nature of the MCU used — 2007 (A) and 2017 (B). (Source: Embedded.com)
It’s reasonable to extend this same thinking to the underlying system software — that more powerful hardware impacts OS choice. In 1997, only 43.3% of developers used a commercial off-the-shelf RTOS, kernel, or executive. Among that group, the two top factors in selection were speed/performance (62.3%) and code size (33.9%).
In 2007, 70% of developers used such software. While that group still considered real-time an important factor, other issues rose as greater concerns compared to memory footprint (Figure 4A). Even more telling, 2017 indicated that developers’ concerns shifted significantly. Real-time and memory footprint not only dropped in relative importance but also dropped on their own merits (Figure 4B).
Figure 4. Key factors in choosing an RTOS/kernel — 2007 (A) and 2017 (B). (Source: Embedded.com)
In fact, Figure 4B documents the other side of an important trend in operating systems for embedded designs. While important, availability of tech support has fallen in importance. Even real-time performance is a less of a factor. A reasonable conclusion for the latter is the common use of more powerful MCUs. For the former, however, the reason is likely related to a dramatic shift toward open-source software without support (Figure 5).
Figure 5. Shift toward open-source OS in embedded designs — 2007 (A) and 2017 (B). (Source: Embedded.com)
This look at the evolution of software development over the past 20 years just scratches the surface. Download the surveys from the Embedded Survey archive and see for yourself!