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
約9時間 前
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!