Main Content

Static memory buffer size

Size of static memory buffer for external mode communication

Model Configuration Pane: Code Generation / Interface

Description

The Static memory buffer size parameter specifies the size of the static memory buffer that the code generator allocates for external mode communication.

To determine how much memory to allocate, enable verbose mode on the target (by including OPTS="-DVERBOSE" on the make command line). External mode displays the amount of memory it tries to allocate and the amount of memory available to it each time it attempts an allocation. If an allocation fails, you can use the console log to determine the value to specify for the Static memory buffer size parameter.

Dependencies

To enable this parameter, do one of the following:

  • Set the Transport layer parameter to tcpip, serial, or customTransportLayer and select the Static memory allocation parameter.

  • Set the Transport layer parameter to XCP on TCP/IP or XCP on Serial and clear the Automatically allocate static memory parameter.

Settings

1000000 | positive scalar

Specifies the number of bytes to preallocate for external mode communication buffers in the target application.

If you a value that is small for your application, the external mode simulation produces an out-of-memory error.

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

Programmatic Use

Parameter: ExtModeStaticAllocSize
Type: integer
Value: valid value
Default: 1000000

Version History

Introduced before R2006a