About disable default component in IDF

XiotSamuel
Posts: 53
Joined: Sun Aug 29, 2021 1:50 pm

About disable default component in IDF

Postby XiotSamuel » Tue Feb 28, 2023 12:05 pm

Hi. If I need to disable default component in IDF (\esp\esp-idf\components\hal\i2c_hal.c) and replace with my own components. Is it possiable to disable the hal at cmake and replace it with my own?

MicroController
Posts: 1725
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: About disable default component in IDF

Postby MicroController » Tue Feb 28, 2023 11:47 pm

One quick and easy way is to copy any components you want to modify from the IDF into your project's components directory. While building, project-local components will be given preference over external components of the same name.

XiotSamuel
Posts: 53
Joined: Sun Aug 29, 2021 1:50 pm

Re: About disable default component in IDF

Postby XiotSamuel » Wed Mar 01, 2023 2:27 am

yes, you are correct. Just copy whole compoent to the project file will be ok.

Who is online

Users browsing this forum: Baidu [Spider] and 96 guests