Is it possible to have a IDF build output as a library?
My problem is that we want to give a BSP type library to a customer.
so that they can have access to the business logic without needing the source for all the low level items.
But is this even possible?
If so can you direct me in the correct direction on how to implement this
IDF build as library ?
Re: IDF build as library ?
It is possible to create a library from an IDF (ESP-IDF) build output.
Set up your IDF project with all the necessary components, libraries, and configurations required for your business logic.
Adjust the build configuration to generate a static library instead of an executable binary. This can be done by modifying the CMakeLists.txt file in your project.
Use the IDF build system (idf.py or make) to build the project. The build process will generate the library file with the desired business logic.
Once the build process is complete, you will find the library file (usually with a .a extension) in the build output directory. You can provide this library file to your customer, along with any necessary header files and documentation.
Set up your IDF project with all the necessary components, libraries, and configurations required for your business logic.
Adjust the build configuration to generate a static library instead of an executable binary. This can be done by modifying the CMakeLists.txt file in your project.
Use the IDF build system (idf.py or make) to build the project. The build process will generate the library file with the desired business logic.
Once the build process is complete, you will find the library file (usually with a .a extension) in the build output directory. You can provide this library file to your customer, along with any necessary header files and documentation.
-
- Posts: 5
- Joined: Tue Mar 28, 2023 5:47 am
Re: IDF build as library ?
good to read that it should be possible.
now i just need to find out how to modify the CMakeLists.txt to generate a static library
now i just need to find out how to modify the CMakeLists.txt to generate a static library
-
- Posts: 5
- Joined: Tue Mar 28, 2023 5:47 am
Re: IDF build as library ?
Is there any documentation or examples on how to modify the CMakeLists.txt to generate a static library?
Re: IDF build as library ?
Half-baked answer:PatrickVisser wrote: ↑Tue Jul 04, 2023 9:12 amIs there any documentation or examples on how to modify the CMakeLists.txt to generate a static library?
You don't need to change anything. All components that constitute a firmware are compiled to static library archives that are located under `build/esp-idf` in your project.
What I have not been able to figure out is how to build only the library without an entire firmware ... you'll also need to package the `*.a` lib with the corresponding header manually. (why I'm considering the answer half-baked)
There's clearly a way to do this, e.g. the closed wifi and ble functionality are distributed in this manner, but I've not been able to find it -- not that I have put that much effort into it
I'd start with the idf build system docs to dig deeper.
-
- Posts: 5
- Joined: Tue Mar 28, 2023 5:47 am
Re: IDF build as library ?
I would like to only have to give a single .a file, but that is not something that i have been able to achieve yet.
my goal is to have a lib that has only a few external functions that will be implemented by the customer.
and then just have to link the lib with the complied c file from him.
just need to figure out how to alter the build system to achieve this.
my goal is to have a lib that has only a few external functions that will be implemented by the customer.
and then just have to link the lib with the complied c file from him.
just need to figure out how to alter the build system to achieve this.
Who is online
Users browsing this forum: Baidu [Spider] and 108 guests