Microcontrollers (MCUs) have undergone numerous technological advances, from hardware cryptography to sophisticated graphics
capabilities, and yet, in all of this time, software development has struggled to keep up. In this blog, learn about the
challenges engineers face when it comes to software development on MCU platforms, how NXP plans to solve these challenges and
why the power of choice is an essential part of the future for MCUs.
New Hardware Capabilities, Old Software Development
As with all electronics, microcontrollers have undergone massive changes since the first MCUs were introduced in the 1970s. The
first truly commercially viable MCUs, such as the ubiquitous 8051, were based on 8-bit technologies and incorporated a few
timers, a UART port, ADC, and if lucky, a DAC. These devices were incredibly simple, easy to understand, had a minimal
instruction set and could be used easily with low-level languages, such as assembler.
Fast forward to 2023 and MCUs have undergone massive changes, with significantly larger memories, faster CPUs and countless
peripherals ranging from advanced motor control to machine learning (ML) accelerators. However, one of the most significant
changes that MCUs have seen is the increase in complexity in their internal architecture, and this has made modern MCUs very
challenging to code from scratch without the help of drivers to provide abstraction from the underlying hardware.
To help engineers coding modern MCUs, software solutions and tools are widely available to eliminate the need for register-level
programming, including drivers and advanced configuration tools. While these tools are essential for getting projects to work,
the software infrastructure used to code MCUs has not advanced to the same degree as the hardware, resulting in a significant
technological gap between software and hardware.
NXP enriches the developer experience with a new era of MCUXpresso productivity. Learn more about the new MCUXpresso toolset.
What software challenges exist for MCUs?
No matter the platform, software development on MCUs faces a multitude of challenges, including locked platforms, limited
portability, fragmentation, lack of open-source support, restrictions to developer freedom and a lack of standardization.
To start, most MCU platforms typically lock engineers to that platform because of the effort involved to port code elsewhere,
making it very time consuming to move to another architecture or vendor, even if the processor core (such as Arm® Cortex-M®)
used by these platforms is the same. While this may not be problematic for simpler projects that don’t utilize the full
capabilities of the MCU or its peripherals, it can be devastating for projects that need to switch to a different manufacturer
due to changing hardware requirements. Where OEMs have a broad range of products ranging across price and power needs, using a
range of diverse MCUs may be unavoidable so the cost of maintaining what are, essentially, multiple code bases can be very high.
Another software challenge that can affect engineers is the stark differences in IDEs. It is common for engineers to work with
numerous devices across various manufacturers as each device will be particularly well suited for specific applications. But
with each platform, an engineer must learn how that IDE works, where tools are located and how to get projects running. Thus,
it can be immensely time consuming for an engineer to keep up with new changes in each development environment.
Furthermore, it is rare for an MCU vendor to support more than one free IDE platform, and most of these are based around
Eclipse, which is recognized as an industry workhorse for software development. Eclipse is a highly popular IDE and has been
customized very effectively for ease of use by some vendors, but it can impose extensive CPU and memory resource requirements
due to its Java-based core. By comparison, Microsoft’s Visual Studio Code (VS Code) is extremely lightweight and fast,
explaining why many engineers are choosing it over other development environments.
IAR, and Arm Keil, long-established experts in the premium development tools space, offer IDEs that provide their own spin on
specialist debugging capabilities, as well as high-performance optimizing compilers and safety certification. These
Platinum-level NXP partners work closely with us to enable support for their tools out of the box with MCUXpresso SDK software
packages. Even these development tool powerhouses have acknowledged the popularity and flexibility of Visual Studio Code by
introducing support for their compilers such that a hybrid approach to editing and building with this tool can be combined with
their specialized debug experiences.
Introducing MCUXpresso for Visual Studio Code
Recognizing the importance of Visual Studio Code to modern developers, NXP has now introduced
MCUXpresso for VS Code, an extension that provides full support for our MCUXpresso software drivers and middleware, enabling developers to use the
highly popular IDE for fast and responsive coding. In addition to more traditional MCUXpresso SDK flows, this new extension
provides full support for developers working with the open-source Zephyr RTOS, providing a much-improved experience over
existing solutions.
MCUXpresso for Visual Studio Code Block Diagram
MCUXpresso Hardware Abstraction Layer
To help engineers with code portability among different MCU platforms, NXP is introducing a new Hardware Abstraction Layer (HAL)
to provide developers with a set of APIs that are identical among i.MX RT, LPC5500 and MCX MCUs. With the introduction of this
new HAL, NXP MCU code can be fully portable across this broad portfolio of devices, opening up a huge range of choices
power/performance points without the barrier of code porting.
While the introduction of a HAL in itself is not new, the fact that it is based on open-source API definitions already in use
with other platforms illustrates NXP’s commitment to providing power of choice. With this approach, engineers not only have the
freedom to move across different NXP devices, but can even transport their code to other silicon vendors. This flexibility
provides the ultimate freedom for designers who can write MCU code that is no longer locked to a single hardware platform,
bringing firmware design closer to a device-agnostic future.
NXP and Open-CMSIS-Packs
The use of middleware in MCU solutions is becoming increasingly important. Because of the growing complexity of MCU design and
application requirements, engineers are turning to software libraries that can provide advanced features such as graphics
processing, network stacks, USB device enumeration, audio capabilities and even ML/AI. In these cases, trying to incorporate
third-party middleware sourced from another company into a project can be extremely challenging as software from one provider
may differ in format and style from another. Consequently, several manual steps may be necessary to restructure the external
software into the required folders as well as integrating the compilation commands, and these problems may reoccur each time a
new library is delivered by the supplier.
To help engineers incorporate middleware into their projects, all the IDEs in the MCUXpresso ecosystem now offer Open-CMSIS-Pack
support. These complete software products are packaged using a specific standard and format so that IDEs can automatically
identify the contents, add the needed files to a project, configure build tools and provide access to APIs. As dependencies are
incorporated into Open-CMSIS-Packs, engineers do not have to spend hours downloading separate files from different locations,
nor do they need to check if the versions downloaded are compatible.
Why Power of Choice Is the Future of MCU Design
Just as the computer industry evolved toward unification and open standards, MCU ecosystems can benefit greatly by following
suit, creating a new environment where firmware engineers can write code that will be hardware agnostic. This doesn’t mean that
hardware will become less important; if anything, hardware will continue to play a critical role in product design. What will
change is that those creating firmware will be able to do so without worrying about code portability, what device is executing
their software and how that software interfaces with hardware.
The use of unification and industry standards in MCUs will also enable rapid increases in the adoption of open-source software.
If MCU software becomes highly portable, it becomes much easier to share MCU code as it is able to target more platforms. This
will help accelerate open-source projects as engineers across different silicon vendors can all jointly develop software
solutions for mutual benefit while using their own native platforms.
Introducing open standards for HALs among MCUs will also help encourage new manufacturers to adopt these standards, as their
devices will be compatible with most (if not all) existing software solutions. Therefore, new MCUs can be rapidly adopted,
thereby increasing the speed at which engineers can use cutting-edge solutions without requiring major new investments in
software resources.
This power of choice ultimately will ease fragmentation in the MCU industry, and isn’t that what today’s developers want? Learn
more at MCUXpresso.