Hi ESP-IDF,
Is there ways to let ESP-IDF only compile one of my own component (in "projectRoot/components/myComp").
This will accelerate my working flow.
Cheers
Gfast
How to compile single component
Re: How to compile single component
It should be that the source of a component is only compiled/recompiled when the source of it changes. Are you asking about creating "libraries" of pre-built components as opposed to the idea of compiling a single component?
The down-side of building a pre-made library is that the component code leverages per project configuration from "make menuconfig". If you compile a component using one SDKCONFIG that may not match the settings in an SDKCONFIG for your current project and time spent hunting that down would wipe away (and then some) any small workflow improvements.
This all said ... I'd still love to hear your thinking ... it is VERY possible that you are seeing something I don't and you are on to a good thing.
The down-side of building a pre-made library is that the component code leverages per project configuration from "make menuconfig". If you compile a component using one SDKCONFIG that may not match the settings in an SDKCONFIG for your current project and time spent hunting that down would wipe away (and then some) any small workflow improvements.
This all said ... I'd still love to hear your thinking ... it is VERY possible that you are seeing something I don't and you are on to a good thing.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32
Re: How to compile single component
It's not documented and may change in the future, but you can type (for example) "make component-esp32-build" to build only the "esp32" component. Note that this does not re-link the project .elf or .bin file, it just compiles those parts of the source.
(In IDF V2.1 and earlier the target is named differently, I think it would be "make esp32-build")
However, as kolban says, the only time a component is recompiled should be if its source code changes or if the project-wide configuration changes.
(In IDF V2.1 and earlier the target is named differently, I think it would be "make esp32-build")
However, as kolban says, the only time a component is recompiled should be if its source code changes or if the project-wide configuration changes.
Re: How to compile single component
Hi Kolban, ESP_Angus,kolban wrote:It should be that the source of a component is only compiled/recompiled when the source of it changes. Are you asking about creating "libraries" of pre-built components as opposed to the idea of compiling a single component?
The down-side of building a pre-made library is that the component code leverages per project configuration from "make menuconfig". If you compile a component using one SDKCONFIG that may not match the settings in an SDKCONFIG for your current project and time spent hunting that down would wipe away (and then some) any small workflow improvements.
This all said ... I'd still love to hear your thinking ... it is VERY possible that you are seeing something I don't and you are on to a good thing.
Thanks for yor advices, they are very informative!
My goal is eventually port this brain burning library Open62541 (related question is HERE)
My question is actually this one:
This library deployed cmake to build itself first, after successful build, though I'v got my "libopen62541.a", but its header file is not generated ("open62541.h"). When I wanna include this header file in other units, I just surely can not pass the compiling. This is my component.mk. Is something still missing?
Thanks
Gfast2
Who is online
Users browsing this forum: No registered users and 45 guests