Setup not successful

Hello everyone,
Still I am not able to setup for ESP32 with platformio in vscode.

I want to configure ESP32 with ESP-IDF
for trial, I copy paste a led blink program , and then try to build, at that time i saw a notification “bad cmake file”
so first tell me , how to configure “cmake”

You first need to read through the documentation of the ESP-IDF integration with PlatformIO and then you start by copying the official ESP-IDF blinky code from platform-espressif32/examples/espidf-blink at develop · platformio/platform-espressif32 · GitHub into your project. There are very crucial CMakeLists.txt in the main project folder and in src/ without which this does not work at all.

Note that you can also follow the first half of the tutorial as posted in our documentation regarding general ESP32 + ESP-IDF usage.

1 Like

As per your suggestion, I read the documents, then I found “Project configuration”, in this wizard, I set the default config, now compilation is done, but upload can’t.
It shows Error2 . “failed to connect ESP32: Timed out waiting for Packet header”

So how have you connected the ESP32 to your computer? Which serial adapter / COM port is it on? Do you have to manually boot the ESP32 into bootloader mode for your board? Which exact board do you have?

The board have 2102 based USB-serial adaptor. Driver is installed properly and IDE shows “auto detect:COM3”

Okay that answers the first two questions but not the last two, especially regarding bootloader mode.

Also full platformio.ini please.

PlatformIO Project Configuration File
;   Build options: build flags, source filter, extra scripting
;   Upload options: custom port, speed and extra flags
;   Library options: dependencies, extra library storages
; Please visit documentation for the other options and examples

platform = espressif32
framework = espidf
board = esp32dev
monitor_speed = 115200
build_flags =

So what are your results after putting your (still unknown to me) board into bootloader mode as linked above?

It works, successfully downloaded.
but "Bad cmake executable " massage still appears.
and led not blinks as per delay value in program.

I refer that documents as shown ( platform-espressif32/examples/espidf-blink at develop · platformio/platform-espressif32 · GitHub ) but there is some file deleted.
In tutorial, the screenshot shown is older version of vscode. some command not works (like ctrl+alt+b).
and i cant show the screenshot of my pc to you at this place.
really I am tired.

Can you show a screenshot of that? You can make screenshots pressing Alt+PrintScreen on the keyboard and then just Ctlr+V it in a post.

I removed all previous setup and started new.

now first massage appear is “no kit selected” ( at bottom). pl. tell me what is kit and how to add.


You have installed some VSCode CMake plugin which has probably destroyed the PlatformIO project / your ability to build it. You only need PlatformIO to build and upload, CMake is already built into it.

What’s your list of installed VSCode extensions?

At present, VScode demanded for dot net 4.5, so i am installing it.

there are 3 extensions. C/C++ 1.1.3, Cmake tools 1.5.3, Platformio IDE 2.2.1

Do you specifically nned CMake Tools for other projects? If not, just uninstall it. You need to build the ESP-IDF projcets through PlatformIO, which internally uses CMake. But not by yourself.

Ok, done.
now look at the bottom " no kit selected",
tell me, what is kit and how to select ?

cmake removed, (uninstalled)

1 Like

This is not needed. If you still see this then restart VSCode.

A kit is a collection of compiler tools I think.

Now tell me what is the meaning of such error.