Mastering Embedded Software Development through the Processor

Jacob Beningo

May 11, 2015

4 Min Read
Mastering Embedded Software Development through the Processor

Embedded system developers are called upon to be the proverbial "Renaissance Man." A developer is expected to be an expert in software engineering, digital signal processing, electrical engineering, sensor interfacing, cyber security, and project management, among many other disciplines.

Strangely enough, many embedded software developers ignore the inner workings of the microcontroller and, instead, view every MCU as nearly being identical with only the register details differing. For general software engineering this 30,000-ft view of the microcontroller may be sufficient, but for real-time and embedded applications the result is inefficient, bloated, and power-hungry firmware that may not meet expectations.

What can embedded software developers do to decrease these inefficiencies and take advantage of their processors' architecture? The first step is to dig into the MCU. Take, for example, the ARM Cortex-M series of processors. An understanding of how the Cortex-M queues up instructions and handles its pipeline can be critical to writing efficient code. Does the processor flush the pipeline whenever a branch is encountered? What can be done to save cycles during a branch? Questions like these are often not investigated and, even worse, never asked!

STM32-F4-Series.jpg

The second step to decreasing firmware inefficiencies and take advantage of the processors' architecture is to experiment. Development boards, such as the STM32L0 Nucleo from STMicroelectronics, cost less than $15, and an entire series of ARM Cortex-M boards from M0+ through M3 and M4 would run less than $60. The ARM Cortex-M processors have a highly scalable instruction set that allows software to be easily ported between the different cores.

Developing test code as part of an embedded software test bench is a great way to dig into the architectural differences and similarities of microcontrollers. It also builds up a series of working drivers and applications that can easily be deployed and used for rapid prototyping or to work the kinks out of a new idea.

The third and final step to understanding the low-level details of how the microcontroller works is to take a course on ARM Cortex-M processors. Design News has an upcoming course, Embedded System Design Techniques - Mastering the ARM Cortex-M Processor, which I will teach May 18-22. The course is part of Design News' Continuing Education Center series that offers two weeks of webinar training each month. Participants earn IEEE Professional Development Hours, and the education webinar series is sponsored by Digi-Key.

The course is the first of three training courses that will focus on the design and development of embedded software for the ARM Cortex-M processor. The course will start with the use of a STM32L0 Nucleo board combined with the free version of the Keil ARM-MDK compiler. Attendees will have the opportunity to learn about the detailed inner workings of the ARM Cortex-M processor series, along with the differences between the different cores in the series.

MORE FROM DESIGN NEWS: MCUs Embrace New Demand for Ultra-Low Power Innovation

Mastering the details of the processor is not the only goal. The 30-minute lectures over five days will consist of a deep dive into the ARM Cortex-M that is followed by the practical application of the concepts, with plenty of example code. The STM32Lo Nucleo board is an expandable development kit that has an onboard user LED and a push-button. These are utilized in example code, which attendees can use to start building their own embedded software test bench. The next two courses, in August and October, respectively, will then build upon these capabilities.

Each session of "Embedded System Design Techniques - Mastering the ARM Cortex-M Processor" is as follows:

  • Day 1 - Overview of the STM32 ARM Cortex-M0+

  • Day 2 - Project Setup and Compilation

  • Day 3 - ARM Cortex-M Architecture

  • Day 4 - Writing Embedded Software with CMSIS

  • Day 5 - Low-Power Design Techniques

"The Devil is in the details" is a common statement used to describe how a seemingly simple concept may be far more difficult to implement than first meets the eye. For an embedded software developer, understanding these details is crucial to developing an efficient and real-time system. Developers must bite the bullet and dig into the inner workings of today's microcontrollers in order to get every bit and microamp out of their systems.

Jacob Beningo is a Certified Software Development Professional (CSDP) whose expertise is in embedded software. He works with companies to decrease costs and time to market while maintaining a quality and robust product. Sign up for his monthly Embedded Bytes Newsletter here.

Atlantic Design & Manufacturing,the largest advanced design and manufacturing trade show serving the Northeastern US, delivers thousands of senior level design and manufacturing professionals who are looking for new ideas, innovations, and solutions. A Design News event, Atlantic Design & Manufacturing will take place in New York, June 9-11, 2015. It’s your chance to meet qualified suppliers, get hands-on with the latest technologies, and expand your network. Learn more here.

About the Author(s)

Jacob Beningo

Jacob Beningo is an embedded software consultant who currently works with clients in more than a dozen countries to dramatically transform their businesses by improving product quality, cost and time to market. He has published more than 300 articles on embedded software development techniques, has published several books, is a sought-after speaker and technical trainer and holds three degrees which include a Masters of Engineering from the University of Michigan.

Sign up for the Design News Daily newsletter.

You May Also Like