Framework = espidf, fails to build, by giving no error notice

Building a project with the latest platform-espressif32 release v6.9.0.

On the release notes it says to suppport ESP-IDF v5.3.1.

If I build a simple blank project with nothing in the component folder, it builds fine.

this is my platformiol.ini file

[env:esp32-s3-devkitc-1]
platform = espressif32 @ 6.9.0
board = esp32-s3-devkitc-1
framework = espidf

If I add another component in the components folder like this one for example it also manages to compile.

Now the problem arises when I add Arduino as a component, by downloading it from arduino-esp32, release 3.1.0 says that it’s based on ESP-IDF v5.3.1, and putting it in the components folder like I did with the other component that works fine.

Despite being on the same supported ESP-IDF version, (building logs confirm that), it still fails to build and gives no reason why, here’s the log:

 *  The terminal process "C:\Users\CreepyMemes\.platformio\penv\Scripts\platformio.exe 'run', '--environment', 'esp32-s3-devkitc-1'" terminated with exit code: 1. 
 *  Terminal will be reused by tasks, press any key to close it. 

 *  Executing task: C:\Users\CreepyMemes\.platformio\penv\Scripts\platformio.exe run --environment esp32-s3-devkitc-1 

Processing esp32-s3-devkitc-1 (platform: espressif32 @ 6.9.0; board: esp32-s3-devkitc-1; framework: espidf)
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32-s3-devkitc-1.html
PLATFORM: Espressif 32 (6.9.0) > Espressif ESP32-S3-DevKitC-1-N8 (8 MB QD, No PSRAM)
HARDWARE: ESP32S3 240MHz, 320KB RAM, 8MB Flash
DEBUG: Current (esp-builtin) On-board (esp-builtin) External (cmsis-dap, esp-bridge, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES:
 - framework-espidf @ 3.50301.0 (5.3.1)
 - tool-cmake @ 3.16.4
 - tool-esptoolpy @ 1.40501.0 (4.5.1)
 - tool-idf @ 1.0.1
 - tool-mconf @ 1.4060000.20190628 (406.0.0)
 - tool-ninja @ 1.9.0
 - tool-riscv32-esp-elf-gdb @ 11.2.0+20220823
 - tool-xtensa-esp-elf-gdb @ 11.2.0+20230208
 - toolchain-esp32ulp @ 1.23800.240113 (2.38.0)
 - toolchain-riscv32-esp @ 13.2.0+20240530
 - toolchain-xtensa-esp-elf @ 13.2.0+20240530
Reading CMake configuration...
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 0 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
Archiving .pio\build\esp32-s3-devkitc-1\esp-idf\espressif__esp_diagnostics\libespressif__esp_diagnostics.a
*** [.pio\build\esp32-s3-devkitc-1\.pio\build\esp32-s3-devkitc-1\https_server.crt.S.o] Source `.pio\build\esp32-s3-devkitc-1\https_server.crt.S' not found, needed by target `.pio\build\esp32-s3-devkitc-1\.pio\build\esp32-s3-devkitc-1\https_server.crt.S.o'.
Indexing .pio\build\esp32-s3-devkitc-1\esp-idf\espressif__esp_diagnostics\libespressif__esp_diagnostics.a
============================================================================== [FAILED] Took 5.20 seconds ==============================================================================

 *  The terminal process "C:\Users\CreepyMemes\.platformio\penv\Scripts\platformio.exe 'run', '--environment', 'esp32-s3-devkitc-1'" terminated with exit code: 1. 
 *  Terminal will be reused by tasks, press any key to close it. 

I’m doing this instead of doing

framework = arduino, espidf

Because this way it doens’t support ESP-IDF v5.x.x+, am I missing something?

If your actual goal is to use Arduino 3.x you have probably missed this:

One possible solution to your problem is to use pioarduino.

Thanks for the reply, yes I know about that but I’m trying to understand why it’s not possible to just use the arduino component?

Isn’t platformio using ESP-IDF from espressif, so why can’t it just load the component?

Or is there some customizations on platformio’s end, that I don’t know about.

Doesn’t framework = espidf mean that platformio loads the ESP-IDF framework and all of it’s functionality, what makes the arduino-esp component different?

What does pioarduino do that platformio doesn’t?

Thank you

Due to my lack of knowledge, I can’t answer your questions.
Maybe @Jason2866 (the maintainer of pioarduino) has enough time and can do it?

Have you tried whether pioarduino works for you?

No worries thank you for your time, I didn’t try pioarduino yet, but I’m mostly interested in the underlying reason why the arduino-esp component is treated differently, despite platformio io supporting the ESP-IDF v5.3.1 framework.

I know that framework = arduino, espidf doesn’t work perhaps because there’s some platformio innerlying configurations that are no longer supported for later versions of the arduino-esp component. Although I wouldn’t understand why platformio woudn’t just use the original component from the espressif repository directly.

Which is what I tried, by downloading arduino-esp and putting it in the components directory on the root folder of the platformio project, but to no avail.

I suppose I’m missing some foundamental knowledge here. I it possible that @Jason2866 will be reading this post?

Since manually adding Arduino as an component in IDF mode is not supported from Platformio. To complex to explain here. If you want to understand you really have to dive in the build process of Platformio for espidf. It is very different to the build way of plain native espressif IDF

And there is a error message. This error can probably solved by adding to the env

board_build.embed_txtfiles =
    managed_components/espressif__esp_insights/server_certs/https_server.crt
    managed_components/espressif__esp_rainmaker/server_certs/rmaker_mqtt_server.crt
    managed_components/espressif__esp_rainmaker/server_certs/rmaker_claim_service_server.crt
    managed_components/espressif__esp_rainmaker/server_certs/rmaker_ota_server.crt
2 Likes

Interesting, by adding the suggested board_build.embed_txtfiles in my .ini file.

I’m now able to build and upload the project

by using the latest version of arduino-esp v3.1.0 component (which is based on ESP-IDF 5.3.1+)

Running on platformio’s platform-espressif32 v6.9.0 framework (which supports ESP-IDF 5.3.1)

My project’s platformio.ini file:

[env:esp32-s3-devkitc-1]
platform = espressif32 @ 6.9.0
board = esp32-s3-devkitc-1
framework = espidf

monitor_speed = 115200  ; ESP-32 default baud rate
monitor_filters = esp32_exception_decoder ; Fix monitor color filters

board_build.embed_txtfiles =
    managed_components/espressif__esp_insights/server_certs/https_server.crt
    managed_components/espressif__esp_rainmaker/server_certs/rmaker_mqtt_server.crt
    managed_components/espressif__esp_rainmaker/server_certs/rmaker_claim_service_server.crt
    managed_components/espressif__esp_rainmaker/server_certs/rmaker_ota_server.crt

This suggestion solved the problem, although now I’m even more confused than before.

Was it failing to build the arduino component because platformio was not embedding those files by default for some reason? Is this what pioarduino is pretty much doing?

Is it still preferrable to just use pioarduino as this seems like a workaround (correct me if i’m wrong)

And just for clarity where would the error messages be as I didn’t see them in the build logs, when it failed to build earlier.

Thank you so much for your time and your work in this platform!

This files are needed from the components added from component manager.
Not a bug at all. Just missing in your config. Not depending which platform used.
BUT since new MCUs are not supported from official Platform this is a workaround. To be safe better to use my fork pioarduino

The error is here in your log

*** [.pio\build\esp32-s3-devkitc-1\.pio\build\esp32-s3-devkitc-1\https_server.crt.S.o] Source `.pio\build\esp32-s3-devkitc-1\https_server.crt.S' not found, needed by target `.pio\build\esp32-s3-devkitc-1\.pio\build\esp32-s3-devkitc-1\https_server.crt.S.o'.
1 Like