Does auto-generation of C-code have a future?

November 26, 2012

Bernard Cole-November 26, 2012

In his recent blog on “Trends in embedded software design,” Michael Barr points out that despite its advantages in small footprint, limited resource MCU based designs, the C language without help is simply not up to the task of building systems requiring over a million lines of code.

Because of this trend, he predicts that “tools able to reliably generate those millions of lines of C code automatically for us, based on system specifications, will ultimately take over.”One state-machine derived candidate that he mentions is the open source Quantum Platform unified modeling language framework for event-driven programs.

To get a complete picture of modeling tools capable of auto-generating the necessary code, be sure to read the four part series on “Modeling embedded systems,” by Shelley Gretlein of National Instruments. Based on a chapter she is contributing to an upcoming 2013 book on software engineering,  the series provides a good introduction to the different model-based (MBD) tools such as LabView, MatLab and Simulink, as well as the model-driven (MDD) Unified Modeling Language design framework.

To complement and expand upon her excellent overview, there are a numerous contributed design articles, webinars and technical papers on Embedded.com on the many modeling options available. Among these, my Editors Top Picks are:

Quantum Programming for Embedded Systems
Design embedded algorithms with high level graphical tools
Model-Driven & Model-Based Design in industrial & machine control

There are also a number of recent conference and technical journal papers and presentations that I can recommend including:

Developing FPGA-based embedded controllers using Matlab/Simulink
UML for dynamically reconfigurable embedded multiprocessors
Application of UML in real-time embedded systems

Even with such productivity and code quality enhancing tools, though, traditional methods of C programming will not go away and will be needed to fine tune the performance of the generated code or write device drivers to integrate it more closely to the hardware.

But such high level tools are becoming a necessity for embedded programmers and while you may not like the idea of auto-generated code today, Barr writes that: “I guarantee that once you program for a state machine framework, you'll see the benefits of the overall structure and be ready to move up a level in programming efficiency.”

Embedded.com Site Editor Bernard Cole is also editor of the twice-a-week Embedded.com newsletters as well as a partner in the TechRite Associates editorial services consultancy. He welcomes your feedback. Send an email to bccole@acm.org, or call 928-525-9087.

See more articles and column like this one on Embedded.com. Sign up for subscriptions and newsletters. Copyright © 2012 UBM--All rights reserved.

Loading comments...

Parts Search Datasheets.com

KNOWLEDGE CENTER