How to use Matlab embedded coder under Windows to compile for LINUX?

1.2k views Asked by At

I'm trying to compile a Simulink algorithm to a CarPC. The CarPC is based on a Intel Atom processor and runs in LINUX. The idea is compile the Simulink code with the Matlab embedded coder to the specific target.

The problem is I don't know if I can use my Windows version of Matlab to compile the algorithm and then use it on LINUX. I mean, compile from Windows to LINUX.

Is it possible with my Matlab R2014a from Windows to the Intel Atom processor with LINUX?

1

There are 1 answers

0
Ryan Livingston On

As @ThP said, yes you can. One option is to generate the C code on the Windows machine and then move the generated code to a machine that has a C compiler for the embedded target and compile the C code there.

Make sure that you set up the target hardware in:

Simulation > Model Configuration Parameters > Hardware Implementation

to be compatible with your Atom processor/compiler. Also set up the model to generate code only in:

Simulation > Model Configuration Parameters > Code Generation

if you are planning on compiling the generated code on another machine.

There is a good deal of additional information about generating code for other targets in the Simulink Coder documentation.