Difference between revisions of "Simulink settings for generating code"

From ConceptCar
Jump to: navigation, search
(New page: ==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 cod...)
 
 
Line 19: Line 19:
 
:Device vendor is “ARM Compatible”
 
:Device vendor is “ARM Compatible”
 
:Device type is “ARM 7”
 
:Device type is “ARM 7”
 +
:[[image:simulink_arm7target_hardwaresettings.png]]
 
;Real-Time workshop
 
;Real-Time workshop
 
:System target file is “ert.tlc” (choose the first with no auto configuration)
 
:System target file is “ert.tlc” (choose the first with no auto configuration)
Line 25: Line 26:
 
:Deselect “generate makefile”
 
:Deselect “generate makefile”
 
:Select “generate code only”
 
:Select “generate code only”
 +
:[[image:simulink_arm7target_rtwsettings.png]]
 
;Interface
 
;Interface
 
:Target function library is “GNU99 (GNU)”
 
:Target function library is “GNU99 (GNU)”
Line 31: Line 33:
 
:Select “single output/update function”
 
:Select “single output/update function”
 
:Interface is “None”
 
:Interface is “None”
 +
:[[image:simulink_arm7target_codesettings.png]]
 
;Templates
 
;Templates
 
:Deselect “Generate an example main program”
 
:Deselect “Generate an example main program”

Latest revision as of 07:14, 30 March 2009

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:

Solver
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”
Error creating thumbnail: Unable to save thumbnail to destination
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”
Error creating thumbnail: Unable to save thumbnail to destination
Interface
Target function library is “GNU99 (GNU)”
Enable floating-point numbers
Disable “GRT compatible call interface”
Select “single output/update function”
Interface is “None”
Error creating thumbnail: Unable to save thumbnail to destination
Templates
Deselect “Generate an example main program”