Real-Time Workshop Embedded Coder 5.4
Introduction to Real-Time Workshop® Embedded Coder™ Demo
Learn
about automatic code generation for embedded systems requiring
production code efficiency and quality. This demo is based on the Introduction
to
Real-Time Workshop® video.

Contents
Demo Overview
The video shows how to create an executable specification using the following MathWorks™ products:- Simulink®
- Stateflow®
- Embedded MATLAB™ functionality
- On-target rapid-prototyping
- Embedded systems
- Mass production
- C
- C++
- Microprocessors
- Microcontrollers
- Digital signal processors
Creating the Executable Specification
Here we have a top-level model representing an algorithm modeled in Simulink software. You can design your system using Simulink blocks, Stateflow charts, and Embedded MATLAB functions. You can execute your multidomain design and see the results of the simulation all from within the same environment.
Configuring for Production Code
Once the design is complete, you can configure the Real-Time Workshop® Embedded Coder™ to generate production code. These code generation options and parameters are consolidated in Simulink® Model Explorer.

See
how you configure for production code.
Configuring Code Generation Options
You can configure different options in the generated
code including:
- Generate C or C++ code to target applications running on DSPs and microcontrollers
- Configure how comments are produced and include
high-level system requirements for traceability purposes
- Add externally written or legacy code to the code generated from a model
- Configure how Real-Time Workshop Embedded Coder generates code for floating- and fixed-point math
- Verify the generated code using software-in-the-loop
and
processor-in-the-loop testing

See
how you configure options for production code.
Target Function Libraries
Target Function Libraries (TFL) generate processor-optimized code when ANSI/ISO C code is not efficient enough. You can use the built-in TFL or create your own.
See
how you can use Target Function Libraries.
Generating and Viewing the Code
After you generate code, you will see the generated code
report documenting the settings used. The generated files include a
main C-file, a model C-file, and the associated header files and
libraries. The generated model C-file is compact and streamlined.
Notice how well the
Simulink, Stateflow, and Embedded MATLAB code is
integrated.

See
how you can generate and view the code.
Additional Resources
Technical Evaluation Kit
- Request for the Real-Time Workshop Embedded Coder Technical Kit
- Request
for
the Production Code Generation Evaluation Kit
Related Video Demos
Related Demos
Products Used in this Demo
- MATLAB®
- Simulink®
- Stateflow®
- Real-Time Workshop®
- Real-Time Workshop® Embedded Coder™
- Stateflow® Coder™
Store
