The error indicates a configuration or licensing issue with SIL or PIL modes in Simulink.
- First, check your model's configuration by going to Model Configuration Parameters > Code Generation and ensure the System target file is set to an ERT-based target.
- Next, verify that Embedded Coder is installed by typing ver in MATLAB. If it's not listed, you'll need to install and license it.
- After ensuring these prerequisites, switch your model to SIL/PIL mode by right-clicking on the model block, selecting C/C++ Code > SIL/PIL Simulation > Set Mode, and choosing SIL or PIL.
Generating Coverage in Normal Mode
If you prefer to use Normal mode, you can generate coverage reports with Simulink Coverage. Ensure Simulink Coverage is installed and licensed. Then, enable coverage by opening your model, going to Analysis > Coverage > Settings, and enabling the desired coverage options. Finally, run your simulation in Normal mode to generate a coverage report.
Hope this helps!