Copy components in new dir when building

TibiToz
Posts: 7
Joined: Mon Aug 10, 2020 1:46 pm

Copy components in new dir when building

Postby TibiToz » Mon Dec 21, 2020 8:43 am

Hi,

I want to modify some esp-idf components for a specific project and dont change the sdk's original component. The perfect way for me would be to :

- Build the project; The usefull esp-idf includes components are cloned in a new project's directory.
- Modifiy the cloned components as i want.
- Rebuild the project , not from the original components but from the modified ones from my cloned components.

I am a bit struggling with CMake. I found that we can list the components with idf_build_get_property(COMPONENTS). Is there a simple way or tool to do this ? Or a better solution ?

Thank you for your time,

Tibi

ESP_Mahavir
Posts: 190
Joined: Wed Jan 24, 2018 6:51 am

Re: Copy components in new dir when building

Postby ESP_Mahavir » Mon Dec 21, 2020 1:29 pm

Hi Tibi

Documentation pointer at https://docs.espressif.com/projects/esp ... -same-name can be helpful for you.

Idea here is to duplicate component within your project under `components` directory, and it shall take preference while building because of same name.

For example: if you duplicate `freertos` under `components` in example at https://github.com/espressif/esp-idf/tr ... em/console, then you can freely modify and example will use your copy.

Hope this helps.

Mahavir

Who is online

Users browsing this forum: No registered users and 111 guests