Embedded Coder - PIL - Code compilation on a different platform than code generation platform?

1 次查看(过去 30 天)
What I want: I am currently working on a project where I would like to build code for a target. I want then to evaluate the results by comparing the numerical results of the model with code generated for the model running in a processor-in-the-loop (PIL).
What is working so far: a simple model (IIR filter, as it can be found somewhere in the Embedded Coder documents) and a simple test harness (model and SIL/HIL in parallel, compared at the end). Model and SIL are working fine, as only I machine is involved running Matlab on Windows.
What causes difficulties: The machine I use as a code compilation platform (build tools, etc) is a different platform then the one which I am using for code compilation. The build machine is running under Linux, as they support the cross-build tools for my target (compiler, linker, etc). (The target platform currently is ARM, but this might change in the future and I want a rather general response.)
What I have tried so far: I use "ert.tlc" as system target file. The Code Generation pane for Toolchain setting states "Automatically locate an installed toolchain" - which finds "Microsoft Visual Studio (...) | nmake (64-bit Windows)". I cannot select an option for Linux 64-bit.
Would it be possible to add a custom toolchain here? / Is it neccessary to do that? At least getting a working Makefile for GNU make might be a good start - if it's only necessary to move some files to the build platform.
Without having the correct Makefile format for my build platform I tried to move the generated code manually there (from %foo%\slprj\ert\%bar%\pil) and created an empty project in my build environment IDE, added Matlab/Simulink include files to be included and preprocessor definitions.
Sooner or later I get an error for a file ending _psf.c that says that this file must be compiled as a MEX-file (I think it provides the S function interface for the model later). This probably must be done on my Windows machine then which runs Matlab.
Will these object files be linked later?
Excluding that file from compilation I get further linker errors.
Is it, in general, possible to have code generation and code compilation (build) platforms running on different machines and/or architectures?
Any help will be appreciated, thank you!

回答(0 个)

Community Treasure Hunt

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

Start Hunting!

Translated by