- Open your model
- Press Ctrl+E to open ‘Configuration Parameters’.
- Go to ‘Code Generation’ section on left pane
- Change the ‘System Target File’ to ‘ert_shrlib.tlc’
- Generate the code now
Simulink edit makefile to create a library instead of executable
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
When I generate the C code from SIMULINK eta *.mk is configured to create an executable file instead of a library.
How Can I edit the makefile to create an independent library ?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1463027/image.png)
###########################################################################
## Makefile generated for component 'SoC_00'.
##
## Makefile : SoC_00.mk
## Generated on : Wed Aug 23 11:08:54 2023
## Final product: $(RELATIVE_PATH_TO_ANCHOR)/SoC_00.elf
## Product type : executable
##
###########################################################################
0 commentaires
Réponses (1)
Ayush
le 29 Août 2023
Modifié(e) : Ayush
le 29 Août 2023
Hi @Mikel85
I understand that you want to create an independent library using makefile. If you have Embedded Coder license, you can generate the Makefile such that it is capable of generating library instead of executable. Here are the general steps to follow:
You may refer to the documentation from here: https://in.mathworks.com/help/ecoder/ug/creating-and-using-host-based-shared-libraries.html
Thanks,
Ayush Jaiswal
0 commentaires
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!