Have had a major play on this issue, and believe that I have found a way around this. I've created a function which will look within the working directory for a '.mexw64' file, and delete it (as this contains the compiled code). This as been configured such that it runs at initialisation of my model and voila, everytime that I change my C++ code and then run my model it retrieved the latest version! Note entirely sure if this is the correct way to fix this problem, but it appears to be working
Force C-code recompile in Simulink
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hi Guys,
I've been able to create a Simulink model, which utilizes some C++ code that I have created; code that will generate sine/cosine from input radians. Within the code, I have a #define which will vary how accurate the generated sine/cosine output is. Currently, if I run the model, it works as expected, if I then change the value of this #define, Simulink doesn't then re-compile the updated code. The only way that I have found which forces this re-compile, is if I go into the "Configuration parameters" and delete the include files within "Simulation Target\Header file", apply, and then run the model. Which will then result in the use of the new #define value.
Is there any setting, that I am missing, which will force a re-compile of the C-code when I run the model?
Risposta accettata
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Simulink Coder in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!