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
Raag
대략 3시간 전
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:
- https://www.mathworks.com/help/rtw/ug/build-code-in-windows-subsystem-for-linux.html
- https://www.mathworks.com/matlabcentral/answers/509603-how-to-compile-windows-generated-code-on-a-linux-machine
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.
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Multicore Processor Targets에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!