Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
1 task done
Jim-Foo opened this issue Mar 20, 2025 · 2 comments
Closed
1 task done

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

Jim-Foo opened this issue Mar 20, 2025 · 2 comments
Labels
Type: Question Only question

Comments

@Jim-Foo
Copy link

Jim-Foo commented Mar 20, 2025

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.
@Jim-Foo Jim-Foo added the Status: Awaiting triage Issue is waiting for triage label Mar 20, 2025
@me-no-dev
Copy link
Member

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

@Jason2866
Copy link
Collaborator

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

@Jason2866 Jason2866 added Type: Question Only question and removed Status: Awaiting triage Issue is waiting for triage labels Mar 20, 2025
@Jason2866 Jason2866 converted this issue into discussion #11152 Mar 20, 2025

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
Type: Question Only question
Projects
None yet
Development

No branches or pull requests

3 participants