Unable to Generate Linux-Compatible Code when "Concurrent Task" Option is enabled

I am trying to build and compile the Simulink example model "ImplementTaskParallelismInSimulinkExample", which I opened using: `openExample("simulink/ImplementTaskParallelismInSimulinkExample")`. In this example "Allow tasks to execute concurrently on target" option is enabled.
During the build process, I am unable to successfully generate code for a Linux target for cross compilation in windows.
I configured the model with:
System target file: grt.tlc
Hardware Implementation -> Device type: "x86-64 (Linux 64)"
But, the generated code still includes Windows-specific components, such as the header file "rtw_windows.h" in ex_task_parallelism_top.c. As a result, I am unable to cross-compile the generated code for the Linux platform.
Interestingly, the issue does not occur when MATLAB is installed directly on a Linux system (e.g., Ubuntu), where code generation produces Linux-compatible output as expected.

1 comentario

Hi,
It is my understanding that you are generating code using the Generic Real-Time (GRT) system target (grt.tlc) on a Windows host, while targeting a Linux platform, and are observing Windows-specific headers (for example, rtw_windows.h) in the generated code.
In general, the code generation workflow is influenced by the selected system target file and build environment configuration, which determine the generated code structure and dependencies.
For workflows involving building or compiling generated code for a different platform, you may refer to the following resources which describe supported approaches for cross-platform builds and environment configuration:
These workflows outline methods for generating code on one system and building or compiling it in a different environment, which may be useful for your use case.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Multicore Processor Targets en Centro de ayuda y File Exchange.

Productos

Versión

R2025b

Preguntada:

el 23 de Jun. de 2026 a las 16:07

Comentada:

hace alrededor de 9 horas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by