PlatformIO Community

ESP-IDF components

Hi there,

I’ve startet working with ESP and im working with the ISP-IDF Framework on VSC. I created the “components” folder and added a component from Espressif. But I don’t really know how to include this file in my main.c. The documentation just tells me to put it in the “components” folder but that does not work. If someone could give me a little hint or at best a minimum example, that would be great.

Which one exactly?

Does it throw a compile error or just an intellisense error? Intellisense is only updated after a build with ESP-IDF.

I downloaded the GC9A01 from Espressif. I referenced it with the relative path to the components folder. That is not what I expected, but it works.

What does not work is: If I download a library via: Platformio->Libraries->lvgl
And install it, I can find the entry(s) in the pio.ini file and it also is migrated to the libdeps-folder. But I can´t include the header files….

LVGL in ESP-IDF projects must not be included as a library because its specific build and config options are not evaluated that way. It must be a component. See Espidf lvgl how to use it - #8 by maxgerhardt and Build error after adding lvgl component - #3 by maxgerhardt.

I cannot reproduce your error. I create a new blank ESP-IDF project, create a components folder, then put the esp_lcd_gc9a01 from here in that folder. I add a #include "esp_lcd_gc9a01.h" in my src/main.c. The firmware compiles.

grafik

Zero problems. No CMake or platformio.ini files touched.

Thank you verry much.
I tried it out and it works fine until “pio run -t menuconfig”. I spend some time on that problem but I didn’t find a solution for this problem. If I run Menuconfig from Platformio, that works fine but not with PlatformIO CLI

Ill try a reinstall tomorrow. Hope that will fix it.

“doesn’t work” meaning what error message? Or do you mean this quirk?

Okay the first error got fixed with reloading the project. Seems to be a bug with the json file.

I encountered the second problem with the menuconfig a while ago but I did not find a solution. After running “pio run -t menuconfig” in the PlattformIO CLI, it stops with:
ninja: build stopped: subcommand failed.
Error: Couldn’t execute ‘menuconfig’ target.
scons: *** [menuconfig] Explicit exit, status 1

Maybe it´s time for a break.

If you have another build system extension actiave, especially the CMake one, you should disable it to prevent overwrites to .vscode files.

What’s the full error message, and with which project setup can that be replicated?

Thank you verry much. I was slightly busy trying to get the LVGL to work, but no luck. I try to open a new topic for that.