Adding external components on VSCode

FranciscoNoble
Posts: 2
Joined: Sun Feb 16, 2025 10:40 pm

Adding external components on VSCode

Postby FranciscoNoble » Sun Feb 16, 2025 10:46 pm

How do I add components from outside ESP Registry? I have some components on Github that I would like to add to my project but I just don't know how. With Registry it's a matter of executing the add-dependency and re-build the project, but that doesn't seem to apply to other components...

Example of external component: https://github.com/PiotrTopa/esp32-I2Cdev

I followed the steps on the readme but it simply doens't work.

chegewara
Posts: 2465
Joined: Wed Jun 14, 2017 9:00 pm

Re: Adding external components on VSCode

Postby chegewara » Mon Feb 17, 2025 1:02 am

Hi,
it didnt work is not enough to provide any help.
What didnt work, maybe some logs?


Here is another way to do it like with components from registry, but instead registry you can use github repo:
https://docs.espressif.com/projects/idf ... pendencies

Or local path on disk.

FranciscoNoble
Posts: 2
Joined: Sun Feb 16, 2025 10:40 pm

Re: Adding external components on VSCode

Postby FranciscoNoble » Mon Feb 17, 2025 1:16 am

Sorry if I was too vague, what I meant was that nothing happend. I cloned the repo into ./components and nothing changed, if I tried to #include it wouldn't find the dependency.

I'll surley take a look on your link, even though I took a somewhat deep look into the docs I didn't find this section, hope that's the answer!

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

Re: Adding external components on VSCode

Postby MicroController » Mon Feb 17, 2025 7:04 am

Did you add the component to REQUIRES in main's CMakeLists.txt?

chegewara
Posts: 2465
Joined: Wed Jun 14, 2017 9:00 pm

Re: Adding external components on VSCode

Postby chegewara » Mon Feb 17, 2025 7:09 am

MicroController wrote:
Mon Feb 17, 2025 7:04 am
Did you add the component to REQUIRES in main's CMakeLists.txt?
You dont have to.
Main is "special" kind of component which is using all esp-idf and additional components by default.
Only time you have to add some extras in main's CMakeList is when component is not in project/components subfolder.

Who is online

Users browsing this forum: No registered users and 182 guests