User`s guide
ii Contents
The Build Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-15
Model Compilation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-16
Code Generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-17
Customized Makefile Generation . . . . . . . . . . . . . . . . . . . . . . . 2-18
Executable Program Generation . . . . . . . . . . . . . . . . . . . . . . . . 2-18
Files and Directories Created by the Build Process . . . . . . . . . 2-22
3
Working with Real-Time Workshop
Basic Real-Time Workshop Concepts . . . . . . . . . . . . . . . . . . . 3-2
Target and Host . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3
Available Target Configurations . . . . . . . . . . . . . . . . . . . . . . . . . 3-3
Code Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3
The Generic Real-Time Target . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4
Target Language Compiler Files . . . . . . . . . . . . . . . . . . . . . . . . . 3-4
Template Makefiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-5
The Build Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-5
Model Parameters and Code Generation . . . . . . . . . . . . . . . . . . 3-6
Quick Start Tutorials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-7
Tutorial 1: Building a Generic Real-Time Program . . . . . . . . . . 3-9
Tutorial 2: Data Logging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-19
Tutorial 3: Code Verification . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-25
Tutorial 4: A First Look at Generated Code . . . . . . . . . . . . . . . 3-30
Tutorial 5: Working with External Mode Using GRT . . . . . . . 3-39
Tutorial 6: Generating Code for a Referenced Model . . . . . . . . 3-51
Glossary