PlatformIO Community

Compilation error @ ESPDUINO 32

Hello,

I am trying to compile ESPhome on ESPDUINO 32 HW 707 but I get the following compilation errors:

    HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
PACKAGES: 
 - framework-arduinoespressif32 3.10004.200129 (1.0.4) 
 - tool-esptoolpy 1.20600.0 (2.6.0) 
 - toolchain-xtensa32 2.50200.80 (5.2.0)
Dependency Graph
|-- <AsyncTCP-esphome> 1.1.1
|-- <ESPmDNS> 1.0
|   |-- <WiFi> 1.0
|-- <Update> 1.0
|-- <WiFi> 1.0
Compiling .pioenvs/sens_d1_02/FrameworkArduino/wiring_pulse.c.o
Compiling .pioenvs/sens_d1_02/FrameworkArduino/wiring_shift.c.o
In file included from /root/.platformio/packages/framework-arduinoespressif32/cores/esp32/Arduino.h:185:0,
                 from /root/.platformio/packages/framework-arduinoespressif32/cores/esp32/wiring_private.h:31,
                 from /root/.platformio/packages/framework-arduinoespressif32/cores/esp32/wiring_pulse.c:18:
/root/.platformio/packages/framework-arduinoespressif32/variants/d-duino-32/pins_arduino.h:61:33: error: initializer element is not constant
 static const uint8_t OLED_SCL = SCL;
                                 ^
/root/.platformio/packages/framework-arduinoespressif32/variants/d-duino-32/pins_arduino.h:62:33: error: initializer element is not constant
 static const uint8_t OLED_SDA = SDA;
                                 ^
*** [.pioenvs/sens_d1_02/FrameworkArduino/wiring_pulse.c.o] Error 1
In file included from /root/.platformio/packages/framework-arduinoespressif32/cores/esp32/Arduino.h:185:0,
                 from /root/.platformio/packages/framework-arduinoespressif32/cores/esp32/wiring_private.h:31,
                 from /root/.platformio/packages/framework-arduinoespressif32/cores/esp32/wiring_shift.c:21:
/root/.platformio/packages/framework-arduinoespressif32/variants/d-duino-32/pins_arduino.h:61:33: error: initializer element is not constant
 static const uint8_t OLED_SCL = SCL;
                                 ^
/root/.platformio/packages/framework-arduinoespressif32/variants/d-duino-32/pins_arduino.h:62:33: error: initializer element is not constant
 static const uint8_t OLED_SDA = SDA;
                                 ^
*** [.pioenvs/sens_d1_02/FrameworkArduino/wiring_shift.c.o] Error 1
====================================== [FAILED] Took 8.90 seconds ======================================

My test YAML begins with:

esphome:

  • name: sens_d1_02*
  • platform: ESP32*
  • board: d-duino-32*

Can anyone help with this error? I managed to compile it by commenting out the two lines that contain the SCL/SDA entries @ /root/.platformio/packages/framework-arduinoespressif32/variants/d-duino-32/pins_arduino.h.

Other version information:

esphome version: 1.15.1
board: d-duino-32
arduino_version: espressif32@1.12.4
PlatformIO version: 4.3.4

YAML? The platformio.ini is in INI format. Where are you using what YAML :smiley:

Also please link the sketch and exact copy of the platformio.ini you’re compiling.