Issues setting up platformIO for esp32

I am trying to setup pio but cannot successfully build anything.

I have had issues with CMakeLists.txt
Shown is an error “undefined reference to 'app_main”
I have had issues with missing elf files.
I have read through the getting started guide/installation guide.
I have read espressif idf installation and set up though I haven’t installed the IDF specifically.
So here I am.
What information can I add to enable you to help me?

The following lines of boilerplate have to be in your project’s CMakeLists

in this exact order for cmake to work correctly

cmake_minimum_required(VERSION 3.16.0)


; PlatformIO Project Configuration File
; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags
; Library options: dependencies, extra library storages
; Advanced options: extra scripting
; Please visit documentation for the other options and examples
; Redirecting...
platform = espressif32
board = esp32dev
framework = arduino

I am grateful for any assistance offered.

The log you’re showing is from the CMake extension, not PlatformIO. You have to use the right build button, or better, if you want to use PlatformIO, deactivate the CMake extensions in your workspace. There are major confusions in your IDE setup and the fact that multiple project folders are in your workspace at once adds to the spiciness of the confusion.


Thank you so much for your response. I will try to deactivate CMake immediatly

Sweet! Success.
Disabled CMake and uninstalled CMake Tools.
Removed all but “myBlink” from the workspace.
Used the PlatformIO Build and Upload labels on the Project Tasks menu.
LED on pin 2 is now blinking joyfully!

One question though.
Is it possible to use the ESP-IDF icons along the bottom of the workspace or are Platform IO and ESP-IDF mutually exclusive?

I have not ever tried that.

Thank you for that. Now I could build my project without any problem