| Contents | Index |
| On this page… |
|---|
The following tutorials are based on the throttle controller example model described in Get Familiar with the Example Model and Testing Environment in the Simulink Coder documentation. The tutorials will help you get started with using Embedded Coder to generate code from Simulink models and subsystems for embedded system applications.
Each tutorial focuses on a specific aspect of code generation or integration for embedded systems and is self-contained. Use only the tutorials that apply to your needs.
Each tutorial uses a unique Simulink demo model and data set. As you proceed through the tutorials, you save each model after you have worked on it, preserving your modifications to the model and model data for future examination. To prevent any errors from carrying over to the next tutorial, begin the next tutorial by opening a new model and loading new data.
You must know how to:
MathWorks products
Read, write, and apply MATLAB scripts
Create Simulink models
Include Stateflow charts in Simulink models
Run Simulink simulations and evaluate the results
C programming
Use C data types and storage classes
Use function prototypes and call functions
Compile a C function
Metrics for evaluating embedded software
Evaluate code readability
Evaluate RAM/ROM usage
Evaluate system execution performance
To compile and build generated code for the integration and testing tutorials, you can use an Integrated Development Environment (IDE) or equivalent tools such as command-line compilers and makefiles. Appendix A, Installing and Using an IDE for the Integration and Testing Tutorials describes how to install and use the Eclipse™ IDE for C/C++ Developers and the Cygwin™ debugger for integrating and testing your generated code.
Each tutorial uses a unique example model file and data set.
Before you use each example file, place a copy in a writable location on your MATLAB path. Proceed through the tutorials from this location.
As you proceed through a tutorial, save your changes for future examination.
To avoid potentially introducing errors into the next tutorial, begin each tutorial by opening a new model and loading new data.
![]() | Simulink Tutorials | Configure Model and Generate Code | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |