ESP-IDF: Build your Project Error

After successfully setting up the ESP-IDF environment I try to run an example project “Hello World”. Unfortunately during the build I get the error below:
##############################################################################
cmake : The term ‘cmake’ is not recognized
script file, or operable program. Check the
was included, verify that the path is corre
At line:1 char:1

  • cmake -G Ninja …
  •   + CategoryInfo          : ObjectNotFoun
     ndException
      + FullyQualifiedErrorId : CommandNotFou
    

###########################################################################
I have the CMAKE path present in the ENV, I am not sure what I am missing. Has someone seen this issue and was is the solution.
In addition I do see the path on power shell.

PlatformIO does explicitly not use the cmake found in a user’s environment, it brings its own of a specific version and uses that.

Can you show your whole project structure and files and the result of pio run -v (or “Verbose Build” in VScode)?

Thanks for your reply I am new to Platformio, thus I am not sure exactly what you mean by pio run -v. Do you see the print screen I have attached?

o_O? You just imported a pure ESP-IDF hello world project, but without the platformio.ini config.

Please read through Espressif IoT Development Framework — PlatformIO latest documentation and see platform-espressif32/examples/espidf-blink at develop · platformio/platform-espressif32 · GitHub. You need at least a platformio.ini to make it a PlatformIO project.

Okay, let me read this documentation. Thanks

This looks like a mixup. It seems you have followed instructions provided by the ESP-IDF framework hot to setup the environments and tool. Thus you write:

However, PlatformIO takes a different approach. It will set up the environment and all the tools for you. But you have to create the project somewhat differently, e.g. by using PlatformIO’s New Project command (accessible from PlatformIO Home).

So you need to decide which route to go:

  • Native ESP-IDF (with cmake), or
  • ESP-IDF with PlatformIO

In the later case, see Get started with ESP-IDF and ESP32-DevKitC: debugging, unit testing, project analysis — PlatformIO latest documentation for an introduction.

Hi All(expert)

I have a similar problem and tried adding IDF_PATH. But the problem is still there. Please help in detail to fix it.

BR




The certificate problem has been discussed in Problems building with ESP-IDF latest version (4.3.0) - #4 by maxgerhardt.

@maxgerhardt

Sure I read your suggestion page. My English isn’t good, I still don’t know how to fix it.

Is this problem caused by the ESP-IDF side and has nothing to do in PIO?

Shall we downgrade to V4.2 If the problem with V4.3 of ESP-IDF only?

BR

Have you done per Problems building with ESP-IDF latest version (4.3.0) - #6 by martinberlin? Edit the sdkconfig.esp32dev file of your project that way, clean and rebuild.

1 Like

@maxgerhardt

Thanks for your help. Your suggestion works and it still is processing.

May I know the function of them “MBEDTLS CERTIFICATE BUNDLE”?
The attached shows the revised “sdkconfig.esp32dev”.
revised MBEDTLS CERTIFICATE BUNDLE

Please share more again with me.

BR