Open kprzeb opened 5 years ago
Same issue here. The same configuration works fine when building for ESP32. This was working prior to 1.14 update. Thank you
Note that the xtensa compiler itself is crashing. ESP8266 and ESP32 have different toolchains so that would explain why one is working and not the other.
Yeah so this is almost certainly due to the Arduino framework update.
For the 2.4.2 version, I manually compiled a toolchain for aarch64. For the latest one I was under the impression the one supplied by the framework worked for aarch64 - at least it did on my RPi 3b+. Maybe it's because it's armv8 with both aarch64 and armhf support, whereas your board does not.
You can use the old version by putting arduino_version: 2.4.2
in your core-esphome config.
I tried using:
arduino_version: 2.4.2
but I still get the same result.
Is it feasible that something else might have changed?
Yeah so this is almost certainly due to the Arduino framework update.
For the 2.4.2 version, I manually compiled a toolchain for aarch64. For the latest one I was under the impression the one supplied by the framework worked for aarch64 - at least it did on my RPi 3b+. Maybe it's because it's armv8 with both aarch64 and armhf support, whereas your board does not.
You can use the old version by putting
arduino_version: 2.4.2
in your core-esphome config.
Why can't you use a ready-made toolchain for aarch64 ? I tried it in a docker, it works well for me.
curl -L https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-4/aarch64-linux-gnu.xtensa-lx106-elf-b40a506.1563313032.tar.gz | tar --strip-components=1 -xzf - -C /root/.platformio/packages/toolchain-xtensa/
Why can't you use a ready-made toolchain for aarch64 ?
That's not the toolchain arduino SDK 2.5.2 is using.
To clear this up:
I don't think SDK 2.5.0 can be used with toolchain 2.5.0-4, most toolchain updates are not forwards-compatible, so likely also not backwards-compatible.
I don't think SDK 2.5.0 can be used with toolchain 2.5.0-4, most toolchain updates are not forwards-compatible, so likely also not backwards-compatible.
With 2.5.0-4 I compiled 2.5.2, 2.5.1, 2.5.0 and 2.4.2 on aarch64. Why can't using different toolchain depending on sdk ?
I tried esphome/esphome:dev (x86-64) in the docker. There, too, I was able to compile only 2.5.2, 2.5.1, 2.5.0 and 2.4.2. Below 2.4.1, compilation errors appear. So what's the difference then?
The documentation contains incorrect default versions of sdk (arduino_version).
I have the same problem using the Hass.io ESPHome plugin, 1.14.3, on an Orange Pi Prime (Allwinner H5, Armbian).
I have the same problem using the Hass.io ESPHome plugin, 1.14.3, on an Orange Pi Prime (Allwinner H5, Armbian).
Try it - https://github.com/esphome/issues/issues/805#issuecomment-553428445 It's in a docker with esphome.
I have the same problem using the Hass.io ESPHome plugin, 1.14.3, on an Orange Pi Prime (Allwinner H5, Armbian).
Try it - #805 (comment) It's in a docker with esphome.
Yup, that worked, thanks @zvldz
For others who are stuck:
Find the Container ID of the ESPHome container:
docker ps
get a shell in that container:
docker exec -it <Container ID> /bin/bash
Fetch the toolchain:
curl -L https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-4/aarch64-linux-gnu.xtensa-lx106-elf-b40a506.1563313032.tar.gz | tar --strip-components=1 -xzf - -C /root/.platformio/packages/toolchain-xtensa/
I have the same problem using the Hass.io ESPHome plugin, 1.14.3, on an Orange Pi Prime (Allwinner H5, Armbian).
Try it - #805 (comment) It's in a docker with esphome.
Yup, that worked, thanks @zvldz
For others who are stuck: Find the Container ID of the ESPHome container:
docker ps
get a shell in that container:docker exec -it <Container ID> /bin/bash
Fetch the toolchain:curl -L https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-4/aarch64-linux-gnu.xtensa-lx106-elf-b40a506.1563313032.tar.gz | tar --strip-components=1 -xzf - -C /root/.platformio/packages/toolchain-xtensa/
I have installation on QNAP VM (Ubuntu 16.4 - Docker)
I have new problem after this:
|-- <ESP8266mDNS> 1.2 | |-- <ESP8266WiFi> 1.0 Compiling /data/light_bedroom_upperlight/.pioenvs/light_bedroom_upperlight/src/esphome/components/api/api_connection.cpp.o Compiling /data/light_bedroom_upperlight/.pioenvs/light_bedroom_upperlight/src/esphome/components/api/api_pb2.cpp.o sh: 1: xtensa-lx106-elf-g++: Exec format errorsh: 1: xtensa-lx106-elf-g++: Exec format error *** [/data/light_bedroom_upperlight/.pioenvs/light_bedroom_upperlight/src/esphome/components/api/api_pb2.cpp.o] Error 2 *** [/data/light_bedroom_upperlight/.pioenvs/light_bedroom_upperlight/src/esphome/components/api/api_connection.cpp.o] Error 2 ========================== [FAILED] Took 7.15 seconds ==========================
I have new problem after this:
|-- <ESP8266mDNS> 1.2 | |-- <ESP8266WiFi> 1.0 Compiling /data/light_bedroom_upperlight/.pioenvs/light_bedroom_upperlight/src/esphome/components/api/api_connection.cpp.o Compiling /data/light_bedroom_upperlight/.pioenvs/light_bedroom_upperlight/src/esphome/components/api/api_pb2.cpp.o sh: 1: xtensa-lx106-elf-g++: Exec format errorsh: 1: xtensa-lx106-elf-g++: Exec format error *** [/data/light_bedroom_upperlight/.pioenvs/light_bedroom_upperlight/src/esphome/components/api/api_pb2.cpp.o] Error 2 *** [/data/light_bedroom_upperlight/.pioenvs/light_bedroom_upperlight/src/esphome/components/api/api_connection.cpp.o] Error 2 ========================== [FAILED] Took 7.15 seconds ==========================
You probably don't have arm64
curl -L https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-4/aarch64-linux-gnu.xtensa-lx106-elf-b40a506.1563313032.tar.gz | tar --strip-components=1 -xzf - -C /root/.platformio/packages/toolchain-xtensa/
Yes. It's my trouble. I set up i686-linux-gnu.xtensa-lx106-elf-b40a506.1563313032.tar.gz and it's working! Thanx
Are you running a 32-bit OS? I think all the non-ARM Docker containers are set up expecting x86_64.
True, there are no x86/i686 versions of the docker images available - iirc that's because the base image for Hass.io (ubuntu-hassio-base) does not have a 32-bit x86 variant.
I am seeing the exact same error message when I try to compile my esphome yamls while running hassio on an Odroid C2.
Having the same issue with vanilla hassio on an ODroid C2.
I had the same error and I was also able to solve my error by following the below instructions with a little difference, I had to delete the contents of the toolchain-xtensa directory first else it did not work. But after successful compilation the code encountered an exception on the ESP.
Find the Container ID of the ESPHome container: docker ps get a shell in that container: docker exec -it
/bin/bash Fetch the toolchain: curl -L https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-4/aarch64-linux-gnu.xtensa-lx106-elf-b40a506.1563313032.tar.gz | tar --strip-components=1 -xzf - -C /root/.platformio/packages/toolchain-xtensa/
Also after deleting and getting its contents afresh , on my first compile ESPHome installed the toolchain-xtensa files as below:
INFO Reading configuration /config/esphome/tank_controller.yaml... INFO Generating C++ source... INFO Compiling app... INFO Running: platformio run -d /config/esphome/tank_controller Processing tank_controller (board: d1_mini; framework: arduino; platform: espressif8266@2.2.3) PackageManager: Installing toolchain-xtensa @ <3 Downloading [####################################] 100% Unpacking [####################################] 100% toolchain-xtensa @ 2.40802.191122 has been successfully installed! HARDWARE: ESP8266 80MHz, 80KB RAM, 4MB Flash
I was able to compile well on RPi3, Hassio/Buster/addon ESPHome 1.14.3 but got the following exception on running the code on ESP:
Exception 29: StoreProhibited: A store referenced a page mapped with an attribute that does not permit stores PC: 0x4020c39a EXCVADDR: 0x00000000 Decoding stack results 0x4023218a: scalbn at ../../../../../../dl/newlib-xtensa/newlib/libm/common/s_scalbn.c line 93
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.
Operating environment/Installation (Hass.io/Docker/pip/etc.):
Docker aarch64 odroidc2 ESP (ESP32/ESP8266, Board/Sonoff):
ESP8266 sonoff mini Affected component:
Description of problem: Compilation and upload problem
Problem-relevant YAML-configuration entries:
Logs (if applicable):
Additional information and things you've tried: