MATLAB Answers

How can I create code for an embedded Linux target with Simulink hosted on Windows?

40 ビュー (過去 30 日間)
Mike Bardill
Mike Bardill 2014 年 8 月 29 日
コメント済み: jie zhang 2016 年 3 月 2 日
I want to be able to create code a multitasking embedded Linux target from Simulink hosted on Windows. The Windows machine does not have access to the Linux compiler tools and so all I want is to be able to copy the generated code manually to Eclipse on a different Linux machine and build it there.
I am basically trying to following the method in this post but with the Linux tools being hosted on a different machine: http://www.mathworks.co.uk/matlabcentral/answers/95176-from-my-windows-platform-how-do-i-build-a-model-with-concurrently-executing-sample-times-and-which
I have set the System target file to 'idelink_ert.tlc' and then on the Code target tab set the Build Format to 'makefile' and the Build action to 'create_makefile'. However, when I try to build the model the process fails when it seems to try and run the makefile to build the target and can't find the target tools. I want 'create_makefile' to do just that and no more; in fact I don't even need a makefile, I just want the .c and .h files.
Is there a way to stop the build from 'running' the make file?

  0 件のコメント

サインインしてコメントする。

回答 (1 件)

Kaustubha Govind
Kaustubha Govind 2014 年 8 月 29 日
You can select the Generate Code Only checkbox on the Code Generation pane of the Configuration Parameters Window to prevent build. I would also recommend selecting the "Package code and artifacts" checkbox on the same pane (on releases older than R2012b, you can manually use the packNGo utility to do the same). This will ensure that any additional artifacts (other than the .c and .h in the _rtw folder) are also packaged for relocation.

  1 件のコメント

jie zhang
jie zhang 2016 年 3 月 2 日
Great, finally got a solution for the question I want ask.

サインインしてコメントする。

Community Treasure Hunt

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

Start Hunting!

Translated by