Esp32 Lyrat using platformio/atom

Hello platformio community,
I am using platformio/atom with the esp doit board on the arduino framework. I have downloaded the esp32 idf and adf but now not exactly sure what to do. I am unsure how to copy the example that I would like to use and build. Is it imperative I copy each example that I’d like to use and upload them individually, if so how? This is much more complicated than the hell world project although I’ve tried to follow same example but in Vsc. Hey everyone started somewhere so help is greatly appreciated.

Which example exactly? One from ESP-IDF?

A set of example projects is provided here: platform-espressif32/examples at develop · platformio/platform-espressif32 · GitHub

The exact set of importing an ESP-IDF example always depends on the example itself. But basically you will have to copy all source files into your src/ folder. If there are embedded text files (like here with the howsmyssl_com_root_cert.pem file), you will need to copy that file to your main project folder as well and, as documented, add a build_flags option to include that file. Some examples may have a sdkconfig.defaults (like here), so you will need to put /modify these extra options into your src/sdkconfig.h file as well. Some projects may have KConfig.projbuild file (like here). These define additional macros used by the project. You will need to add them using -D options in the build_flags (as documented). If the KConfig file e.g. says

config WIFI_SSID
    string "WiFi SSID"
    default "myssid"
        SSID (network name) for the example to connect to.

it generates the macro CONFIG_WIFI_SSID with a default value of "myssid". So you would add a

build_flags = -D CONFIG_WIFI_SSID=\"myssid\"


I have downloaded many examples including espressif. The platformio examples with the MG adf/mdf will work on it and post expediently. This appears to be the most effiecient model for me to follow

Hi I am using the ESP32 LyraT board with Platformio/ Atom With the ESPdoitdevkit on the ESP IDF framework. This is the 4.3 version lyrat and the project is from the maxgerhardt/ pio-esp-adf-example
This is the error received.
.pioenvs\esp32doit-devkit-v1\libesp32.a(cpu_start.o):(.literal.main_task+0x18): undefined reference to `app_main’

.pioenvs\esp32doit-devkit-v1\libesp32.a(cpu_start.o): In function `main_task’:

cpu_start.c:(.text.main_task+0x5f): undefined reference to `app_main’

collect2.exe: error: ld returned 1 exit status

*** [.pioenvs\esp32doit-devkit-v1\firmware.elf] Error 1

[ERROR] Took 257.09 seconds

Please open an issue on Issues · maxgerhardt/pio-esp-adf-example · GitHub with your pio --version, your platform version (pio platform show espressif32) and a full verbose compilation log (pio run -v)