Tutorial HelloWorld for C

Tutorial HelloWorld for C

Scope
Create a new model from scratch
Create the HelloWorld model
Create a launch configuration to start the C code generator
Generate the code
Setup the include path
Build and run the model
Summary

Scope

In this tutorial you will learn how to create a model for C from scratch. There are some more steps to do in C compared to Java. The goal is to get familiar with the additional steps. The Java tutorial is a prerequisite for the following explanations. You will perform the following steps:

  1. create a new model from scratch for C

  2. create structure and behavior similar to Java

  3. create a launch configuration for the C code generator

  4. setup the C environment

  5. generate the source code

  6. run the model

Make sure that you have set up the workspace as described in Setting up the Workspace for C Projects.