System Target Block Description
This block is used to configure core parameters and model options within the Simulink environment. Specifically, it enables model integration with a CubeMX configuration file, adds FreeRTOS support, and sets up code generation and compilation options.

Table of Contents
Inputs
This block has no inputs.
Outputs
| Output Name | Type | Description |
|---|---|---|
| Start init function | bool | Conditional output An output that triggers the Initialize block. This output is available when the Enable initialization function call output option is enabled. |
Block Parameters
”Common” Tab
| Parameter | Description |
|---|---|
| Integrate with .ioc file | Enables access to the parameter containing the path to the CubeMX configuration file. |
| CubeMX file path | Conditional Parameter The file path to the CubeMX configuration file. This parameter is accessible when the Integrate with .ioc file option is enabled. The path can be selected using the “Select File” button. The file can be opened directly using the “Open file” button. |
| Microcontroller | The microcontroller model for which the code is generated. If a file is selected in the CubeMX file path option, the model will be detected and selected automatically. |
| RTOS type | The type of Real-Time Operating System (RTOS) used in the model. This will populate automatically once it is configured within the CubeMX file. |
| Enable timer | Enables a custom execution time source for the model. |
| Timer number | Conditional Parameter The number of the timer used as the model execution time base. This parameter is available when the Enable timer option is enabled. |
| Timer clock [MHz] | Conditional Parameter The clock frequency of the timer used as the model execution time base. This parameter is available when the Enable timer option is enabled. |
| Enable initialization function call output | Enables the output port used to trigger the Initialize block. |
| Enable init delay | Enables an initialization delay. |
| Delay [msec] | Conditional Parameter The initialization delay time in milliseconds. This parameter is available when the Enable init delay option is enabled. |
| Display ioc errors as warnings | Allows displaying CubeMX configuration file errors as warnings within Simulink. If disabled, these errors will not be shown. |
| Sample time [s] | The refresh period of the model. |

“Build options” Tab
| Parameter | Description |
|---|---|
| Generate project files | Project file generation settings:None - no files are generatedSystem32CubeIDE - files are generated for the STM32CubeIDE environment |
| Makefile parallel execution | Enabling this option allows the Make utility to build multiple independent files simultaneously, which speeds up C code compilation. |
| Interface identifier | The identifier of the interface used for programming and debugging:SWD – Serial Wire Debug mode (two-wire)JTAG – standard JTAG interface (multi-wire) |
| Build | Project build options:Generate Code – generates C compilation code without flashing it to the microcontrollerDeploy to hardware – builds the project and flashes it directly onto the target microcontrollerExternal mode – external mode that allows executing the code on the microcontroller while simultaneously tuning parameters in Simulink (e.g., using sliders), injecting signals, or monitoring real-time block data. |
| Build optimization level | The optimization level applied to the generated code during the C build process. |

“Target - host connection” Tab
This tab is only available when the External mode option is selected in the Build parameter under the “Build options” tab.
| Parameter | Description |
|---|---|
| Communication interface | The communication interface used to connect with the host computer:Serial – serial interface |
| Interface type | The type of communication interface:USART/UART – UART interface |
| USART/UART module number | The number of the USART/UART module used for communication with the host computer. |
| Baudrate [bps] | Data transmission speed in bits per second. |
| Serial port | The serial port used to communicate with the host computer. |
| Timeout [s] | The time limit the system waits for a response from the host computer in seconds. |
| Verbose | Enables displaying detailed log information regarding messages and task progress reports. |

CubeMX Configuration for a Given MCU Model
The minimal required CubeMX file configuration for the Simulink model is detailed in the Getting Started tab.
See Also
Last updated on