Commenced in January 2007
Frequency: Monthly
Edition: International
Paper Count: 30840
Evaluation of Model-Based Code Generation for Embedded Systems–Mature Approach for Development in Evolution

Authors: Nikolay P. Brayanov, Anna V. Stoynova


Model-based development approach is gaining more support and acceptance. Its higher abstraction level brings simplification of systems’ description that allows domain experts to do their best without particular knowledge in programming. The different levels of simulation support the rapid prototyping, verifying and validating the product even before it exists physically. Nowadays model-based approach is beneficial for modelling of complex embedded systems as well as a generation of code for many different hardware platforms. Moreover, it is possible to be applied in safety-relevant industries like automotive, which brings extra automation of the expensive device certification process and especially in the software qualification. Using it, some companies report about cost savings and quality improvements, but there are others claiming no major changes or even about cost increases. This publication demonstrates the level of maturity and autonomy of model-based approach for code generation. It is based on a real live automotive seat heater (ASH) module, developed using The Mathworks, Inc. tools. The model, created with Simulink, Stateflow and Matlab is used for automatic generation of C code with Embedded Coder. To prove the maturity of the process, Code generation advisor is used for automatic configuration. All additional configuration parameters are set to auto, when applicable, leaving the generation process to function autonomously. As a result of the investigation, the publication compares the quality of generated embedded code and a manually developed one. The measurements show that generally, the code generated by automatic approach is not worse than the manual one. A deeper analysis of the technical parameters enumerates the disadvantages, part of them identified as topics for our future work.

Keywords: Embedded Systems, embedded code generation, embedded C code quality, model-based development

Digital Object Identifier (DOI):

Procedia APA BibTeX Chicago EndNote Harvard JSON MLA RIS XML ISO 690 PDF Downloads 246


[2] J. Lin, “Measuring Return on Investment of Model-Based Design”, White Paper,
[3] J. Klein, H. Levinson, J. Marchetti, “Model-Driven Engineering: Automatic Code Generation and Beyond”, CMU/SEI-2015-TN-005
[4] B. Schatz, A. Pretschner, F. Huber, J. Philipps, “Model-Based Development of Embedded Systems”, DOI: 10.1007/3-540-46105-1_34
[5] M. Broy, S. Kirstan, H. Krcmar, B. Schätz, J. Zimmermann, „What is the benefit of a model-based design of embedded software systems in the car industry?“, DOI: 10.4018/978-1-4666-4301-7.ch017
[6] N. Ajwad, “Evaluation of Automatic Code Generation Tools”, ISSN 0280-5316
[7] MathWorks® Automotive Advisory Board “Control Algorithm Modeling Guidelines Using MATLAB®, Simulink®, and Stateflow”,
[8] “610.12-1990 - IEEE Standard Glossary of Software Engineering Terminology”, DOI: 10.1109/IEEESTD.1990.101064
[9] “1219-1998 - IEEE Standard for Software Maintenance”, 10.1109/IEEESTD.1998.88278
[10] S. H. Kan, “Metrics and Models in Software Quality Engineering, Second Edition”, ISBN: 0-201-72915-6, Chapter 4: Software Quality Metrics Overview
[12] C. Ferdinand, R. Heckmann, H. J. Wolff, C. Renz, O. Parshin, R. Wilhelm, “Towards Model-Driven Development of Hard Real-Time Systems Integrating ASCET and aiT/StackAnalyze”,
[13] T. Yu, M. B. Cohen, “Guided Test Generation for Finding Worst-Case Stack Usage in Embedded Systems”, DOI: 10.1109/ICST.2015.7102592
[14] S. Petters, “Comparison of Trace Generation Methods for Measurement Based WCET Analysis”, In Proceedings of the 3rd International Workshop on Worst Case Execution Time Analysis, 2003, page 61-64
[15] R. Firth, V. Mosley, R. Pethia, L. Roberts, W. Wood, “A Guide to the Classification and Assessment of Software Engineering Tools”, CMU/SEI-87-TR-010
[16] “Heated Seat Module”,
[17] “Car seat heater”,
[18] “Heated seat system”,]
[19] A. Milanova, A. Rountev, B. G. Ryder, “Precise Call Graphs for C Programs with Function Pointers”, Automated Software Engineering (2004) 11: 7.