Weird error in Kconfig

The esp32-camera component I dowloaded from espressif contains among others a file named: “Kconfig”
This file shoe following errors:

Can someone please help me out?

Somehow it’s interpreting the .projbuild file as C++ code. This file contains no code though. The error is meaningless and wrong. The only thing you can do is associate the file extension .projbuild to be “text”. (https://stackoverflow.com/questions/29973619/how-to-associate-a-file-extension-with-a-certain-language-in-vs-code)

Max,
Thank you, that has helped.
But, as usually, the problem has “moved”

Now VS-Code/Pio complains about:
‘CONFIG_SCCB_CLK_FREQ’ undeclared (first use in this function); did you mean ‘CONFIG_XTAL_FREQ’?

Which is quite not the case, because this value is defined in Kconfig.projbuild, like so:

Any suggestion is most welcome.

ESP-IDF components such as esp32-camera cannot be added by lib_deps, as PlatformIO will not process their KConfig / Cmake config at all (issue).

If you want to add the esp32-camera component to your ESP-IDF project, create a new folder components inside your project and put the esp32-camera folder inside there.

See docs

https://docs.platformio.org/en/stable/frameworks/espidf.html#esp-idf-components

Max,
Well, that’s quit clear. Thank you.

Works out well.
One slight remark: the directory name should be included as well.
list(APPEND EXTRA_COMPONENT_DIRS components/esp32-camera)

1 Like