I'm learning ESP-IDF platform and now want to create a library in order to be able to structure my code properly in the future.
I've done some research and found out that a component needs to be under a `components/<component-name>` folder. The documentation doesn't talk about or I missed how to create a standalone component and how to compile it to a static library, into a `.a` file which later can be linked to different projects.
- What is the minimum configuration for an ESP-IDF static library that can be built into a `.a` file?
- How to compile a component into a standalone static library?
How to create and build a standalone ESP-IDF static library?
How to create and build a standalone ESP-IDF static library?
Last edited by haxpanel on Tue May 22, 2018 7:49 pm, edited 1 time in total.
Re: How to create and build a standalone ESP-IDF static library?
Hi,
I'm going to copy the answer from the github issue to start with. Let me know if you'd like me to expand on or explain anything else from this answer:
For structure & modularity, IDF has the concept of "components". Each component is built into a static library as part of the build process.
The smallest possible component would contain one source file only, as well as a component.mk file to define the component and describe the location of that source file.
You can find documentation about the build system and creating components here:
https://esp-idf.readthedocs.io/en/lates ... ystem.html
I'm going to copy the answer from the github issue to start with. Let me know if you'd like me to expand on or explain anything else from this answer:
For structure & modularity, IDF has the concept of "components". Each component is built into a static library as part of the build process.
The smallest possible component would contain one source file only, as well as a component.mk file to define the component and describe the location of that source file.
You can find documentation about the build system and creating components here:
https://esp-idf.readthedocs.io/en/lates ... ystem.html
Who is online
Users browsing this forum: No registered users and 119 guests