esphome / esphome/feature-requests

Arduino as ESP-IDF component

Open
#2,369 3 comments 5 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
450
Forks
29
PR merge metrics
No merged PRs in 30d

Description

**Describe the problem you have/What new integration you would like**

Arduino can be loaded as a component over ESP-IDF as described here: https://docs.espressif.com/projects/arduino-esp32/en/latest/esp-idf_component.html and here: https://github.com/platformio/platform-espressif32/issues/24

It would be great if ESPHome would allow this configuration:
```yaml
esp32:
board: esp32dev
framework:
type: arduino, esp-idf
```

**Please describe your use case for this integration and alternatives you've tried:**

I would like to customise the `sdkconfig` compilation flags for ESP-IDF. It would also be useful for people who are migrating their code to pure ESP-IDF.

**Additional context**

I am trying to set custom pins for the PSRAM built in to the Sonoff NSPanel. It has 16MB PSRAM (see [this link](https://blakadder.com/nspanel-teardown/) for more info), but the pins are non standard, so I need to set these flags:
```
CONFIG_D0WD_PSRAM_CLK_IO=5 # default: 17
CONFIG_D0WD_PSRAM_CS_IO=18 # default: 18
```
I have tested this using pure esp-idf and I can detect the PSRAM, but Arduino doesn't allow setting these options due to the bootloader being precompiled. The only alternative it to create a custom bootloader using https://github.com/espressif/esp32-arduino-lib-builder but I think esphome wouldn't be able to include this.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the ESP32 framework configuration shown in the issue and review the linked Arduino ESP-IDF component documentation and PlatformIO discussion. Define what the combined Arduino and ESP-IDF setting must support, including custom sdkconfig flags and the bootloader constraints, then verify the configuration against the Sonoff NSPanel use case.

Written by the indexing model from the issue text.

Assessment

Tech stack
arduino, yaml
Domain
build-system, embedded-iot
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.