1. Motivation

If you want to program your target code manually in C or C++ it is interesting to test this code with Simulink as environment simulation.

You can also test a generated code with the ready to use code for the target. But in this step not the target itself is used to run the C/C++ code, instead Visual Studio is used on PC to check the C/C++ code. Because of the emC concept (multiplatform, C/C++ is portable) the target code can be test also on PC, relaxed, without target conditions, to find out not running but algorithm effects. This is a maybe important step before using the code on the target hardware and after designing the functionality in the simulation tool.

Note that the same approach can be also used with other simulation toos, which supports including C/C++ Function blocks.

The video

shows some details using the example in