C Caller does not reflect changes in C-Code on Simulink Model

2 views (last 30 days)
I would like to use a C Caller Block to include simple C-code in my Simulink model. For this I have written a .c- and a .h-file. When you first start the model works fine. Now I want to change something in my C-code in the .c-file, but the changes are not reflected in the Simulink model.
It works when I completely close MATLAB, delete the slprj-folder in my project folder, and then start the Simulink model again. But is there no other way?

Answers (1)

Jonas
Jonas on 14 Aug 2019
Edited: Jonas on 14 Aug 2019
Could you try to go into your Simulink Configuration Parameters => Model Referencing and set Rebuild to Always. It may be ignoring parts of your model because no changes were detected, but it only detects changes in Simulink blocks, not external code. If the embedded C-code is not in a referenced model however, the setting is not going to help.
Alternatively, you should change your accelerator mode to 'Normal'. If you use 'Accelerator' mode it will not rebuild but keeps using previously built files.

Categories

Find more on Simulink Functions in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!