Open roomme13 opened 2 years ago
With a more recent version of Arduino Core it's working. This is the snippet I'm using with LilyGo TTGO T-01C3 ESP32-C3 module:
esphome:
name: myesp32c3
platformio_options:
board_build.variant: esp32c3
board_build.flash_mode: dio
esp32:
board: esp32-c3-devkitm-1
framework:
type: arduino
version: dev
platform_version: https://github.com/platformio/platform-espressif32.git#feature/arduino-upstream
I then flashed the firmware-factory.bin
with esptool.
@MFlasskamp i use same board but revision version maybe TTGO T-IO Plus
`INFO Reading configuration /config/c3.yaml...
WARNING The selected Arduino framework version is not the recommended one. If there are connectivity or build issues please remove the manual version.
WARNING The selected Arduino framework version is not the recommended one. If there are connectivity or build issues please remove the manual version.
INFO Generating C++ source...
INFO Compiling app...
Processing myesp32c3 (board: esp32-c3-devkitm-1; framework: arduino; platform: https://github.com/platformio/platform-espressif32.git#feature/arduino-upstream)
--------------------------------------------------------------------------------
* Adding toolchain toolchain-riscv32-esp with version 8.4.0+2021r2
* Adding toolchain toolchain-xtensa-esp32 with version 8.4.0+2021r2
* Adding toolchain toolchain-xtensa-esp32s2 with version 8.4.0+2021r2
* Adding toolchain toolchain-riscv32-esp with version 8.4.0+2021r2
* Adding toolchain toolchain-xtensa-esp32 with version 8.4.0+2021r2
* Adding toolchain toolchain-xtensa-esp32s2 with version 8.4.0+2021r2
HARDWARE: ESP32C3 160MHz, 320KB RAM, 4MB Flash
- framework-arduinoespressif32 0.0.0+sha.50e9772
- toolchain-riscv32-esp 8.4.0+2021r2
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
Dependency Graph
|-- <WiFi> 2.0.0
|-- <ESPmDNS> 2.0.0
|-- <Update> 2.0.0
Compiling .pioenvs/myesp32c3/src/esphome/components/adc/adc_sensor.cpp.o
sh: 1: riscv32-esp-elf-g++: not found
Compiling .pioenvs/myesp32c3/src/esphome/components/api/api_connection.cpp.o
sh: 1: riscv32-esp-elf-g++: not found
Compiling .pioenvs/myesp32c3/src/esphome/components/api/api_frame_helper.cpp.o
sh: 1: riscv32-esp-elf-g++: not found
*** [.pioenvs/myesp32c3/src/esphome/components/adc/adc_sensor.cpp.o] Error 127
Compiling .pioenvs/myesp32c3/src/esphome/components/api/api_pb2.cpp.o
*** [.pioenvs/myesp32c3/src/esphome/components/api/api_connection.cpp.o] Error 127
*** [.pioenvs/myesp32c3/src/esphome/components/api/api_frame_helper.cpp.o] Error 127
sh: 1: riscv32-esp-elf-g++: not found
*** [.pioenvs/myesp32c3/src/esphome/components/api/api_pb2.cpp.o] Error 127
========================== [FAILED] Took 3.34 seconds ==========================`
But i got this error with your template, i can get it work with another template but the I2C or MQTT never worked for me.
Your board is different, but that's not the problem. There is something mixed up with your esphome build. Did you try "Clean Build Files" in ESPHome?
Your config file is /config/c3.yaml
but the working directory is myesp32c3
(name from my example).
The example extended with MQTT and I2C:
esphome:
name: myesp32c3
platformio_options:
board_build.variant: esp32c3
board_build.flash_mode: dio
esp32:
board: esp32-c3-devkitm-1
framework:
type: arduino
version: dev
platform_version: https://github.com/platformio/platform-espressif32.git#feature/arduino-upstream
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_pass
mqtt:
broker: !secret mqtt_ip
i2c:
sda: GPIO8
scl: GPIO2
And for reference the compile log:
INFO Reading configuration /config/myesp32c3.yaml...
WARNING The selected Arduino framework version is not the recommended one. If there are connectivity or build issues please remove the manual version.
WARNING The selected Arduino framework version is not the recommended one. If there are connectivity or build issues please remove the manual version.
WARNING GPIO8 is a Strapping PIN and should be avoided.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
WARNING GPIO8 is a Strapping PIN and should be avoided.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
WARNING GPIO2 is a Strapping PIN and should be avoided.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
WARNING GPIO2 is a Strapping PIN and should be avoided.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
INFO Generating C++ source...
INFO Compiling app...
Processing myesp32c3 (board: esp32-c3-devkitm-1; framework: arduino; platform: https://github.com/platformio/platform-espressif32.git#feature/arduino-upstream)
--------------------------------------------------------------------------------
* Adding toolchain toolchain-riscv32-esp with version 8.4.0+2021r2
* Adding toolchain toolchain-xtensa-esp32 with version 8.4.0+2021r2
* Adding toolchain toolchain-xtensa-esp32s2 with version 8.4.0+2021r2
* Adding toolchain toolchain-riscv32-esp with version 8.4.0+2021r2
* Adding toolchain toolchain-xtensa-esp32 with version 8.4.0+2021r2
* Adding toolchain toolchain-xtensa-esp32s2 with version 8.4.0+2021r2
HARDWARE: ESP32C3 160MHz, 320KB RAM, 4MB Flash
- framework-arduinoespressif32 0.0.0+sha.6a7bcab
- toolchain-riscv32-esp 8.4.0+2021r2
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
Dependency Graph
|-- <AsyncTCP-esphome> 1.2.2
|-- <WiFi> 2.0.0
|-- <ESPmDNS> 2.0.0
|-- <AsyncMqttClient-esphome> 0.8.6
| |-- <AsyncTCP-esphome> 1.2.2
|-- <Wire> 2.0.0
|-- <ArduinoJson> 6.18.5
Compiling .pioenvs/myesp32c3/src/esphome/components/esp32/core.cpp.o
Compiling .pioenvs/myesp32c3/src/esphome/components/esp32/gpio_arduino.cpp.o
Compiling .pioenvs/myesp32c3/src/esphome/components/esp32/gpio_idf.cpp.o
Compiling .pioenvs/myesp32c3/src/esphome/components/esp32/preferences.cpp.o
Compiling .pioenvs/myesp32c3/src/esphome/components/i2c/i2c.cpp.o
Compiling .pioenvs/myesp32c3/src/esphome/components/i2c/i2c_bus_arduino.cpp.o
Compiling .pioenvs/myesp32c3/src/esphome/components/i2c/i2c_bus_esp_idf.cpp.o
Compiling .pioenvs/myesp32c3/src/esphome/components/json/json_util.cpp.o
Compiling .pioenvs/myesp32c3/src/esphome/components/mdns/mdns_component.cpp.o
Compiling .pioenvs/myesp32c3/src/esphome/components/mdns/mdns_esp32_arduino.cpp.o
Compiling .pioenvs/myesp32c3/src/esphome/components/mdns/mdns_esp8266.cpp.o
Compiling .pioenvs/myesp32c3/src/esphome/components/mdns/mdns_esp_idf.cpp.o
Compiling .pioenvs/myesp32c3/src/esphome/components/mqtt/custom_mqtt_device.cpp.o
Compiling .pioenvs/myesp32c3/src/esphome/components/mqtt/mqtt_binary_sensor.cpp.o
Compiling .pioenvs/myesp32c3/src/esphome/components/mqtt/mqtt_button.cpp.o
Compiling .pioenvs/myesp32c3/src/esphome/components/mqtt/mqtt_client.cpp.o
Compiling .pioenvs/myesp32c3/src/esphome/components/mqtt/mqtt_climate.cpp.o
Compiling .pioenvs/myesp32c3/src/esphome/components/mqtt/mqtt_component.cpp.o
Compiling .pioenvs/myesp32c3/src/esphome/components/mqtt/mqtt_cover.cpp.o
Compiling .pioenvs/myesp32c3/src/esphome/components/mqtt/mqtt_fan.cpp.o
Compiling .pioenvs/myesp32c3/src/esphome/components/mqtt/mqtt_light.cpp.o
Compiling .pioenvs/myesp32c3/src/esphome/components/mqtt/mqtt_lock.cpp.o
Compiling .pioenvs/myesp32c3/src/esphome/components/mqtt/mqtt_number.cpp.o
Compiling .pioenvs/myesp32c3/src/esphome/components/mqtt/mqtt_select.cpp.o
Compiling .pioenvs/myesp32c3/src/esphome/components/mqtt/mqtt_sensor.cpp.o
Compiling .pioenvs/myesp32c3/src/esphome/components/mqtt/mqtt_switch.cpp.o
Compiling .pioenvs/myesp32c3/src/esphome/components/mqtt/mqtt_text_sensor.cpp.o
Compiling .pioenvs/myesp32c3/src/esphome/components/network/util.cpp.o
Compiling .pioenvs/myesp32c3/src/esphome/components/wifi/wifi_component.cpp.o
Compiling .pioenvs/myesp32c3/src/esphome/components/wifi/wifi_component_esp32_arduino.cpp.o
Compiling .pioenvs/myesp32c3/src/esphome/components/wifi/wifi_component_esp8266.cpp.o
Compiling .pioenvs/myesp32c3/src/esphome/components/wifi/wifi_component_esp_idf.cpp.o
Compiling .pioenvs/myesp32c3/src/esphome/core/application.cpp.o
Compiling .pioenvs/myesp32c3/src/esphome/core/color.cpp.o
Compiling .pioenvs/myesp32c3/src/esphome/core/component.cpp.o
Compiling .pioenvs/myesp32c3/src/esphome/core/controller.cpp.o
Compiling .pioenvs/myesp32c3/src/esphome/core/entity_base.cpp.o
Compiling .pioenvs/myesp32c3/src/esphome/core/helpers.cpp.o
Compiling .pioenvs/myesp32c3/src/esphome/core/log.cpp.o
Compiling .pioenvs/myesp32c3/src/esphome/core/scheduler.cpp.o
Compiling .pioenvs/myesp32c3/src/esphome/core/util.cpp.o
Compiling .pioenvs/myesp32c3/src/main.cpp.o
Generating partitions .pioenvs/myesp32c3/partitions.bin
Compiling .pioenvs/myesp32c3/lib528/AsyncTCP-esphome/AsyncTCP.cpp.o
Compiling .pioenvs/myesp32c3/libcd4/WiFi/WiFi.cpp.o
Compiling .pioenvs/myesp32c3/libcd4/WiFi/WiFiAP.cpp.o
Compiling .pioenvs/myesp32c3/libcd4/WiFi/WiFiClient.cpp.o
Compiling .pioenvs/myesp32c3/libcd4/WiFi/WiFiGeneric.cpp.o
Archiving .pioenvs/myesp32c3/lib528/libAsyncTCP-esphome.a
Compiling .pioenvs/myesp32c3/libcd4/WiFi/WiFiMulti.cpp.o
Compiling .pioenvs/myesp32c3/libcd4/WiFi/WiFiSTA.cpp.o
Compiling .pioenvs/myesp32c3/libcd4/WiFi/WiFiScan.cpp.o
Compiling .pioenvs/myesp32c3/libcd4/WiFi/WiFiServer.cpp.o
Compiling .pioenvs/myesp32c3/libcd4/WiFi/WiFiUdp.cpp.o
Compiling .pioenvs/myesp32c3/lib856/ESPmDNS/ESPmDNS.cpp.o
Compiling .pioenvs/myesp32c3/lib813/AsyncMqttClient-esphome/AsyncMqttClient.cpp.o
Compiling .pioenvs/myesp32c3/lib813/AsyncMqttClient-esphome/AsyncMqttClient/Packets/ConnAckPacket.cpp.o
Archiving .pioenvs/myesp32c3/libcd4/libWiFi.a
Compiling .pioenvs/myesp32c3/lib813/AsyncMqttClient-esphome/AsyncMqttClient/Packets/PingRespPacket.cpp.o
Archiving .pioenvs/myesp32c3/lib856/libESPmDNS.a
Compiling .pioenvs/myesp32c3/lib813/AsyncMqttClient-esphome/AsyncMqttClient/Packets/PubAckPacket.cpp.o
Compiling .pioenvs/myesp32c3/lib813/AsyncMqttClient-esphome/AsyncMqttClient/Packets/PubCompPacket.cpp.o
Compiling .pioenvs/myesp32c3/lib813/AsyncMqttClient-esphome/AsyncMqttClient/Packets/PubRecPacket.cpp.o
Compiling .pioenvs/myesp32c3/lib813/AsyncMqttClient-esphome/AsyncMqttClient/Packets/PubRelPacket.cpp.o
Compiling .pioenvs/myesp32c3/lib813/AsyncMqttClient-esphome/AsyncMqttClient/Packets/PublishPacket.cpp.o
Compiling .pioenvs/myesp32c3/lib813/AsyncMqttClient-esphome/AsyncMqttClient/Packets/SubAckPacket.cpp.o
Compiling .pioenvs/myesp32c3/lib813/AsyncMqttClient-esphome/AsyncMqttClient/Packets/UnsubAckPacket.cpp.o
Compiling .pioenvs/myesp32c3/lib27f/Wire/Wire.cpp.o
Archiving .pioenvs/myesp32c3/libFrameworkArduinoVariant.a
Compiling .pioenvs/myesp32c3/FrameworkArduino/Esp.cpp.o
Compiling .pioenvs/myesp32c3/FrameworkArduino/FirmwareMSC.cpp.o
Archiving .pioenvs/myesp32c3/lib813/libAsyncMqttClient-esphome.a
Compiling .pioenvs/myesp32c3/FrameworkArduino/FunctionalInterrupt.cpp.o
Compiling .pioenvs/myesp32c3/FrameworkArduino/HWCDC.cpp.o
Archiving .pioenvs/myesp32c3/lib27f/libWire.a
Compiling .pioenvs/myesp32c3/FrameworkArduino/HardwareSerial.cpp.o
Compiling .pioenvs/myesp32c3/FrameworkArduino/IPAddress.cpp.o
Compiling .pioenvs/myesp32c3/FrameworkArduino/IPv6Address.cpp.o
Compiling .pioenvs/myesp32c3/FrameworkArduino/MD5Builder.cpp.o
Compiling .pioenvs/myesp32c3/FrameworkArduino/Print.cpp.o
Compiling .pioenvs/myesp32c3/FrameworkArduino/Stream.cpp.o
Compiling .pioenvs/myesp32c3/FrameworkArduino/StreamString.cpp.o
Compiling .pioenvs/myesp32c3/FrameworkArduino/USB.cpp.o
Compiling .pioenvs/myesp32c3/FrameworkArduino/USBCDC.cpp.o
Compiling .pioenvs/myesp32c3/FrameworkArduino/USBMSC.cpp.o
Compiling .pioenvs/myesp32c3/FrameworkArduino/WMath.cpp.o
Compiling .pioenvs/myesp32c3/FrameworkArduino/WString.cpp.o
Compiling .pioenvs/myesp32c3/FrameworkArduino/base64.cpp.o
Compiling .pioenvs/myesp32c3/FrameworkArduino/cbuf.cpp.o
Compiling .pioenvs/myesp32c3/FrameworkArduino/esp32-hal-adc.c.o
Compiling .pioenvs/myesp32c3/FrameworkArduino/esp32-hal-bt.c.o
Compiling .pioenvs/myesp32c3/FrameworkArduino/esp32-hal-cpu.c.o
Compiling .pioenvs/myesp32c3/FrameworkArduino/esp32-hal-dac.c.o
Compiling .pioenvs/myesp32c3/FrameworkArduino/esp32-hal-gpio.c.o
Compiling .pioenvs/myesp32c3/FrameworkArduino/esp32-hal-i2c-slave.c.o
Compiling .pioenvs/myesp32c3/FrameworkArduino/esp32-hal-i2c.c.o
Compiling .pioenvs/myesp32c3/FrameworkArduino/esp32-hal-ledc.c.o
Compiling .pioenvs/myesp32c3/FrameworkArduino/esp32-hal-matrix.c.o
Compiling .pioenvs/myesp32c3/FrameworkArduino/esp32-hal-misc.c.o
Compiling .pioenvs/myesp32c3/FrameworkArduino/esp32-hal-psram.c.o
Compiling .pioenvs/myesp32c3/FrameworkArduino/esp32-hal-rmt.c.o
Compiling .pioenvs/myesp32c3/FrameworkArduino/esp32-hal-sigmadelta.c.o
Compiling .pioenvs/myesp32c3/FrameworkArduino/esp32-hal-spi.c.o
Compiling .pioenvs/myesp32c3/FrameworkArduino/esp32-hal-time.c.o
Compiling .pioenvs/myesp32c3/FrameworkArduino/esp32-hal-timer.c.o
Compiling .pioenvs/myesp32c3/FrameworkArduino/esp32-hal-tinyusb.c.o
Compiling .pioenvs/myesp32c3/FrameworkArduino/esp32-hal-touch.c.o
Compiling .pioenvs/myesp32c3/FrameworkArduino/esp32-hal-uart.c.o
Compiling .pioenvs/myesp32c3/FrameworkArduino/firmware_msc_fat.c.o
Compiling .pioenvs/myesp32c3/FrameworkArduino/libb64/cdecode.c.o
Compiling .pioenvs/myesp32c3/FrameworkArduino/libb64/cencode.c.o
Compiling .pioenvs/myesp32c3/FrameworkArduino/main.cpp.o
Compiling .pioenvs/myesp32c3/FrameworkArduino/stdlib_noniso.c.o
Compiling .pioenvs/myesp32c3/FrameworkArduino/wiring_pulse.c.o
Compiling .pioenvs/myesp32c3/FrameworkArduino/wiring_shift.c.o
Archiving .pioenvs/myesp32c3/libFrameworkArduino.a
Linking .pioenvs/myesp32c3/firmware.elf
RAM: [= ] 11.0% (used 36120 bytes from 327680 bytes)
Flash: [==== ] 39.0% (used 715040 bytes from 1835008 bytes)
Building .pioenvs/myesp32c3/firmware.bin
esp32_create_combined_bin([".pioenvs/myesp32c3/firmware.bin"], [".pioenvs/myesp32c3/firmware.elf"])
Flash params set to 0x022f
Wrote 0xbfaa0 bytes to file /config/.esphome/build/myesp32c3/.pioenvs/myesp32c3/firmware-factory.bin, ready to flash to offset 0x0
========================= [SUCCESS] Took 58.01 seconds =========================
INFO Successfully compiled program.
@MFlasskamp Yes always clean build first. BTW i tried your configuration, but the result same.
INFO Reading configuration /config/testgain.yaml...
WARNING The selected Arduino framework version is not the recommended one. If there are connectivity or build issues please remove the manual version.
WARNING The selected Arduino framework version is not the recommended one. If there are connectivity or build issues please remove the manual version.
INFO Generating C++ source...
INFO Compiling app...
Processing myesp32c3 (board: esp32-c3-devkitm-1; framework: arduino; platform: https://github.com/platformio/platform-espressif32.git#feature/arduino-upstream)
--------------------------------------------------------------------------------
* Adding toolchain toolchain-riscv32-esp with version 8.4.0+2021r2
* Adding toolchain toolchain-xtensa-esp32 with version 8.4.0+2021r2
* Adding toolchain toolchain-xtensa-esp32s2 with version 8.4.0+2021r2
* Adding toolchain toolchain-riscv32-esp with version 8.4.0+2021r2
* Adding toolchain toolchain-xtensa-esp32 with version 8.4.0+2021r2
* Adding toolchain toolchain-xtensa-esp32s2 with version 8.4.0+2021r2
HARDWARE: ESP32C3 160MHz, 320KB RAM, 4MB Flash
- framework-arduinoespressif32 0.0.0+sha.50e9772
- toolchain-riscv32-esp 8.4.0+2021r2
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
Dependency Graph
|-- <AsyncTCP-esphome> 1.2.2
|-- <WiFi> 2.0.0
|-- <ESPmDNS> 2.0.0
|-- <AsyncMqttClient-esphome> 0.8.6
| |-- <AsyncTCP-esphome> 1.2.2
|-- <Wire> 2.0.0
|-- <ArduinoJson> 6.18.5
Compiling .pioenvs/myesp32c3/src/esphome/components/esp32/core.cpp.o
sh: 1: riscv32-esp-elf-g++: not found
Compiling .pioenvs/myesp32c3/src/esphome/components/esp32/gpio_arduino.cpp.o
sh: 1: riscv32-esp-elf-g++: not found
Compiling .pioenvs/myesp32c3/src/esphome/components/esp32/gpio_idf.cpp.o
sh: 1: riscv32-esp-elf-g++: not found
*** [.pioenvs/myesp32c3/src/esphome/components/esp32/core.cpp.o] Error 127
*** [.pioenvs/myesp32c3/src/esphome/components/esp32/gpio_arduino.cpp.o] Error 127
*** [.pioenvs/myesp32c3/src/esphome/components/esp32/gpio_idf.cpp.o] Error 127
Compiling .pioenvs/myesp32c3/src/esphome/components/esp32/preferences.cpp.o
sh: 1: riscv32-esp-elf-g++: not found
*** [.pioenvs/myesp32c3/src/esphome/components/esp32/preferences.cpp.o] Error 127
========================== [FAILED] Took 3.07 seconds ==========================
created new yaml and used your config , only change the pin for SDA & SCL,
The toolchains are managed by platformio and uploaded by espressif afaik. Those errors point to an issue with how they were uploaded to those projects.
But considering arduino-esp32 @ 2.0.0 has not officially been released yet by platformio (unfortunately), that could just be an issue that will be solved by the time it's released
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
esp32: board: esp32-c3-devkitm-1 framework: type: arduino version: dev platform_version: https://github.com/platformio/platform-espressif32.git#feature/arduino-upstream
@roomme13 @MFlasskamp
same issue here, the example above do not work, I reolve this by bump both arduino
& platform-espressif32
to the latest version:
esp32:
board: esp32-c3-devkitm-1
framework:
type: arduino
version: 2.0.5
platform_version: https://github.com/platformio/platform-espressif32.git#v5.2.0
I realise this is old, but still open.
1st: idf version has MQTT support now.
2nd: First time c3 targeted compiled happily with the arduino libraries. I used the default parameters:
esphome: name: hx711 friendly_name: HX711
esp32: board: esp32-c3-devkitm-1 framework: type: arduino
Try again, and perhaps close the ticket?
The problem
Hi,
does anyone success installing esp32-c3 with arduino core 2.0.0 ? i want to use mqtt, if i use idf platform its not available, but when i use arduino core 2.0.0 it have an error
if i dont specify the source :
Error: Could not find the package with 'platformio/framework-arduinoespressif32 @ ~3.20000.0' requirements for your system 'linux_armv7l'
if i use the source,
Error: This board doesn't support arduino framework!
is there away to make it work? or it still not supported yet?
Which version of ESPHome has the issue?
2022.1.3
What type of installation are you using?
Docker
Which version of Home Assistant has the issue?
No response
What platform are you using?
ESP32
Board
ESP32-C3
Component causing the issue
No response
Example YAML snippet
Anything in the logs that might be useful for us?
No response
Additional information
No response