Unable to find 'solver_zc.h' header file in generated code from Embedded Coder
67 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
MathWorks Support Team
le 13 Jan 2017
Modifié(e) : MathWorks Support Team
le 10 Juil 2025
When I add the "external reset" signal to my "PID Controller" block, the resulting model can no longer be compiled in my Embedded Coder target. I get the error message from the compiler: "could not open source file 'solver_zc.h'".
Where do I get this file? Why isn't Embedded Coder adding the file it needs to the "ert_rtw" directory?
Réponse acceptée
MathWorks Support Team
le 9 Juil 2025
Modifié(e) : MathWorks Support Team
le 10 Juil 2025
Embedded Coder does not place the 'solver_zc.h' file in the build directory. This is the case for several such header files, and is expected behavior. To access the 'solver_zc.h' file, please navigate to the path - 'C:\Program Files\MATLAB\<release>\simulink\include', where "<release>" might instead be "R2016a", as an example.
That being said, to be able to consolidate all the required build files in one folder, it is recommended to use the "packNGo" feature. The "packNGo" function can be used in the following manner, where "myModel.slx" is a Simulink model and "myModel_ert_rtw" is its build folder generated by Embedded Coder:
>> cd myModel_ert_rtw
>> load buildInfo.mat
>> packNGo(buildInfo, packType='hierarchical')
By using "packNGo" in the above manner, a majority of missing dependency issues should be resolved.
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Deployment, Integration, and Supported Hardware dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!