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

조회 수: 15(최근 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:
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?


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.

Community Treasure Hunt


Start Hunting!

Translated by