Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Errors trying to compile with idf.py command interface #11152

Unanswered
Jim-Foo asked this question in Q&A
Discussion options

Board

esp32-c3

Device Description

esp32-c3-zero. The board is not connected right now because I'm just trying to compile.

Hardware Configuration

Nothing attached. I'm trying to compile the hello world example.

Version

latest master (checkout manually)

IDE Name

esp-idf command interface

Operating System

Linux

Flash frequency

80MHz

PSRAM enabled

no

Upload speed

115200

Description

I'm getting lots of errors when trying to compile a simple example such as system headers not found. I'm using esp-idf v5.4 with arduino-esp32 git master. Is there some combination of the two that is known to work?

At the moment I'm getting the error:

Compilation failed because HttpsOTAUpdate.cpp (in "arduino-esp32" component) includes esp_http_client.h, provided by esp_http_client component(s).
However, esp_http_client component(s) is not in the requirements list of "arduino-esp32"
To fix this, add esp_http_client to PRIV_REQUIRES list of idf_component_register call in /home/jim/dev/src/esp-idf-5.4/components/arduino-esp32/CMakeLists.txt.

I've made a few modifications to the CMakeLists.txt file in the arduino-esp32 directory but more errors keep appearing. the foreach loop in the CMakeLists.txt file assumes that headers are in a directory name "src" so it misses some includes. I've had to add REQUIRES to some CMakeLists.txt so the component can find headers such as the esp_mm component that couldn't find freertos headers.

Sketch

#include "Arduino.h"

void setup() {
  Serial.begin(115200);
}

void loop() {
  Serial.println("Hello world!");
  delay(1000);
}

Debug Message

Compilation failed because HttpsOTAUpdate.cpp (in "arduino-esp32" component) includes esp_http_client.h, provided by esp_http_client component(s).
However, esp_http_client component(s) is not in the requirements list of "arduino-esp32"
To fix this, add esp_http_client to PRIV_REQUIRES list of idf_component_register call in /home/jim/dev/src/esp-idf-5.4/components/arduino-esp32/CMakeLists.txt.

Other Steps to Reproduce

No response

I have checked existing issues, online documentation and the Troubleshooting Guide

  • I confirm I have checked existing issues, online documentation and Troubleshooting guide.
You must be logged in to vote

Replies: 6 comments · 3 replies

Comment options

It seems that something is wrong with your build environment? Maybe start here: https://components.espressif.com/components/espressif/arduino-esp32/versions/3.2.0-rc2/examples/hello_world?language=en

You must be logged in to vote
1 reply
@Jim-Foo
Comment options

It seems that something is wrong with your build environment? Maybe start here: https://components.espressif.com/components/espressif/arduino-esp32/versions/3.2.0-rc2/examples/hello_world?language=en

I'm trying to create a global instance of esp-idf with arduino-esp32 instead of having a local components directory for every piece of software. I now have two versions of esp-idf, one with arduino-esp32 and one without, could that be causing a problem? I would have thought that the export.sh script would serve the purpose of keeping them separate?

Comment options

It is easy with the Platformio fork pioarduino to compile Arduino as an component of IDF. See example https://github.com/pioarduino/platform-espressif32/tree/main/examples/espidf-arduino-blink

You must be logged in to vote
1 reply
@Jim-Foo
Comment options

It is easy with the Platformio fork pioarduino to compile Arduino as an component of IDF. See example https://github.com/pioarduino/platform-espressif32/tree/main/examples/espidf-arduino-blink

What's the difference between pioarduino and the platformio that it was forked from? I see that pioarduino is using "espressif Arduino 3.1.3 and IDF 5.3.2.250210". I've a feeling that at least some of the errors I'm getting are due to the fact that I'm using versions that are unstable and don't work together although I've seen nothing from espressif about this.

Comment options

pioarduino Arduino versions are the same as in the ArduinoIDE listed and shown. The release(s) are downloaded from here.
The provided IDF version is exactly the one where the orig. Arduino Libs are build from the corresponding release.
When using pioarduino to compile Arduino as an component of IDF it is guaranteed to use compatible matching versions.

pioarduino provides actual Arduino cores. Platformio does not. The latest version Platformio provides is Arduino core 2.0.17.

You must be logged in to vote
1 reply
@Jim-Foo
Comment options

pioarduino Arduino versions are the same as in the ArduinoIDE listed and shown. The release(s) are downloaded from here. The provided IDF version is exactly the one where the orig. Arduino Libs are build from the corresponding release. When using pioarduino to compile Arduino as an component of IDF it is guaranteed to use compatible matching versions.

pioarduino provides actual Arduino cores. Platformio does not. The latest version Platformio provides is Arduino core 2.0.17.

Thanks for that. I gives me an alternative way to do it without using Arduino IDE although I don't like using Vscode. Can pioarduino be used from a console?

Comment options

Yes, no need to use Vscode. CLI is supported. No changes needed.

You must be logged in to vote
0 replies
Comment options

I found the pio command and compiled and uploaded a blink example without a problem. When you say no changes needed do you mean that you can use it with idf.py?

You must be logged in to vote
0 replies
Comment options

No, Platformio / pioarduino has a complete different build system than the espressif. The sources are 100% same but nothing else.
If you use the pioarduino IDF framework (sources) in the espressif IDF Setup, you can use idf.py

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
🙏
Q&A
Labels
Type: Question Only question
3 participants
Converted from issue

This discussion was converted from issue #11148 on March 20, 2025 13:55.

Morty Proxy This is a proxified and sanitized view of the page, visit original site.