Can't find main.c file when using SIMULINK code generation
10 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
If i try to generate code for my model using Simulink code gen. The only files that come are model.c files and other files. However, I am always missing the ,"main.c" file. How do I get that file?
0 Commenti
Risposte (1)
Vinayak Choyyan
il 13 Apr 2023
Hi Rahul,
As per my understanding, you are trying to generate C code using Simulink Coder and wish to know why the main file is missing.
Simulink Coder generates code for real-time and nonreal-time applications, including simulation acceleration, rapid prototyping, and hardware-in-the-loop testing. In these types of systems, the main function is typically provided by the target operating system or runtime environment, and the generated code is integrated with the system through other means. On the other hand, Embedded Coder is specifically designed to generate code for microcontrollers and other embedded systems that may not have an operating system or runtime environment. Therefore, when generating code using Embedded Coder, there is an option to "Generate a default main function".
Depending on your use case, consider using Embedded Coder to get the main file.
I hope this resolves the issue you are facing.
0 Commenti
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!