Remove root level I/O zero initialization - Control generation of initialization code for root-level inports and outports set to zero - MATLAB (original) (raw)

Main Content

Control generation of initialization code for root-level inports and outports set to zero

Model Configuration Pane: Code Generation / Optimization

Description

The Remove root level I/O zero initialization parameter specifies whether to generate initialization code for root-level inports and outports set to zero.

This parameter does not apply to root-level inports and outports that you map to:

Settings

on | off

On

Does not generate initialization code for root-level inports and outports set to zero.

During startup, standards-compliant C and C++ compilers initialize global data to zero, eliminating the need to include zero initialization code for this data in the generated code. Standards-compliant compilers do not necessarily initialize dynamically allocated data and local variables to zero. Before leaving the Remove root level I/O zero initialization parameter selected, confirm that your model meets these conditions:

Generated code initializes data that you specify in an Initialize Function block, even if you select this parameter.

Off

Generates initialization code for root-level inports and outports.

Generated code does not initialize data whose storage class has imported scope, unless you specify that data in an Initialize Function block. Generated code does not initialize inports that you connect to Initialize Function blocks. Generated code does not initialize data that you map to a service interface that uses the outside-execution or during-execution data communication methods.

If you set the Code interface packaging model configuration parameter to Nonreusable function, by default, theRemove root level I/O zero initialization check box is selected. At the command line, ZeroExternalMemoryAtStartup is set tooff.

If you set the Code interface packaging parameter toReusable function, by default, the Remove root level I/O zero initialization check box is cleared. At the command line,ZeroExternalMemoryAtStartup is set to on.

If you set the Code interface packaging parameter toC++ Class, the Remove root level I/O zero initialization check box is selected and cannot be changed. At the command line, ZeroExternalMemoryAtStartup is set tooff.

If you set the Code interface packaging parameter toReusable function and select the Use dynamic memory allocation for model initialization parameter, the Remove root level I/O zero initialization check box is cleared and ZeroExternalMemoryAtStartup is set toon.

Application Setting
Debugging No impact
Traceability No impact
Efficiency On (GUI), off (command line) (execution, ROM), No impact (RAM)
Safety precaution No recommendation

Programmatic Use

Parameter: ZeroExternalMemoryAtStartup
Type: character vector
Value: 'off' (UI Setting On) | 'on' (UI Setting Off)
Default: 'off'

Version History

Introduced in R2007a

See Also

Topics