Simulink settings for generating code

From ConceptCar
Revision as of 17:10, 27 March 2009 by Donald (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Settings for the simulink model for code generation

The following settings must be applied to the simulink model when generating code from it with the realtime workshop & embedded coder. Failure to apply these settings will complicate the subsequent process to integrate this code into the ARM7 runtime platform. Currently, only single-rate/singletasking models are supported. Other models require a more complex handling of the model_step() function.

Top level model

At the top level there must be a simulink model, data exchange with the environment is only possible inports and outports at top level. Code generation from a library is not possible.

Model preferences

These settings must be applied in the model “configuration parameters” dialog:

type is “fixed step” (tested with “ode3”)
fixed-step size is specified, not “auto”
Hardware implementation
Device vendor is “ARM Compatible”
Device type is “ARM 7”
Real-Time workshop
System target file is “ert.tlc” (choose the first with no auto configuration)
Language is “C”
Optimizations on (faster runs) (may also work without this quite as well)
Deselect “generate makefile”
Select “generate code only”
Target function library is “GNU99 (GNU)”
Enable floating-point numbers
Disable “GRT compatible call interface”
Select “single output/update function”
Interface is “None”
Deselect “Generate an example main program”