Aight,
So after digging through various issue trackers, I hope I am at the right place here
Long story short: I am using EspHome (A home assistant plugin to generate binaries for ESP devices). During compilation/linking an exception is thrown - which seemingly is a bug in PlattformIO.
In case the thread is the wrong subforum/subsection feel free to move it!
This is the error shown:
I also opened issues on the EspHome/Arduino boards, please check them out too:
opened 01:57AM - 17 Sep 20 UTC
closed 02:48AM - 17 Sep 20 UTC
### Basic Infos
- [x] This issue complies with the [issue POLICY doc](https:/… /github.com/esp8266/Arduino/blob/master/POLICY.md).
- [x] I have read the documentation at [readthedocs](https://arduino-esp8266.readthedocs.io/en/latest) and the issue is not addressed there.
- [ ] I have tested that the issue is present in current master branch (aka latest git).
- [x] I have searched the issue tracker for a similar issue.
- [x] If there is a stack dump, I have decoded it.
- [x] I have filled out all fields below.
#### Additional Information
This issue is related to the version used by EspHome under the hood.
I like to cross reference this issue, as it seems to be an Arduino problem, rather than an EspHome one.
Please see: https://github.com/esphome/issues/issues/1476
#### Platform
- Hardware: ESP8266
- Core Version: Latest of EspHome
- Development Env: EspHome
- Operating System: HassOS (Linux)
### Settings in IDE
- Module: Generic ESP8266 Module
- Flash Mode: Unknown/Default
- Flash Size: Unknown/Default of Generic ESP8266
- lwip Variant: Unknown
- Reset Method: Unknown
- Flash Frequency: Unknown
- CPU Frequency: Unknown
- Upload Using: Irrelevant, process fails during linking (Doesn't reach upload stage)
- Upload Speed: Irrelevant, process fails during linking (Doesn't reach upload stage)
### Problem Description
Generating a binary for Generic ESP8266 in EspHome causes a crash during linking (Unable to find size and start point in file eboot.elf)
See this screenshot for more information as well as the issue I linked above:
![err](https://user-images.githubusercontent.com/32770080/93410504-5e0fcd00-f899-11ea-8982-b61bde67cbb3.PNG)
### [MCVE](https://stackoverflow.com/help/mcve) Sketch
This is the sketch used in EspHome. The sketch is valid, linking of the binary fails, as shown in the screenshot.
```yaml
esphome:
name: smartplug1
platform: ESP8266
board: esp01_1m
wifi:
ssid: censored
password: censored
manual_ip:
static_ip: 192.168.1.195
gateway: 192.168.1.1
subnet: 255.255.255.0
ap:
ssid: censored
password: censored
api:
logger:
ota:
web_server:
port: 80
binary_sensor:
- platform: gpio
pin:
number: GPIO0
mode: INPUT_PULLUP
inverted: True
name: "Sonoff S20 Button"
- platform: status
name: "Sonoff S20 Status"
switch:
- platform: gpio
name: "Sonoff S20 Relay"
pin: GPIO12
output:
# Register the green LED as a dimmable output ....
- platform: esp8266_pwm
id: s20_green_led
pin:
number: GPIO13
inverted: True
light:
# ... and then make a light out of it.
- platform: monochromatic
name: "Sonoff S20 Green LED"
output: s20_green_led
```
**Steps to reproduce:**
1. Install HassOS
2. Install EspHome plugin
3. Try to compile the yaml script linked above
4. Observe the crash
### Debug Messages
Not available
opened 02:00AM - 16 Sep 20 UTC
closed 03:20AM - 28 Jan 21 UTC
stale
**Operating environment/Installation (Hass.io/Docker/pip/etc.):**
HassOS 4.13, … Supervisor Version 243, EspHome Version 1.15.1
**ESP (ESP32/ESP8266, Board/Sonoff):**
Generic ESP8266
**ESPHome version (latest production, beta, dev branch)**
ESPHome Addon version: 1.15.1
**Affected component:**
Most likely this one: https://esphome.io/devices/sonoff_s20.html however, the issue does not seem to be component specific.
**Description of problem:**
After a fresh install, I added a node and wanted to compile the bin, so that I can flash it on the target device. The script validated just fine.
During compilation, the follow exception is thrown: `Unable to find size and start point in file eboot.elf for .text` See the screenshot for details.
![esphome build error](https://user-images.githubusercontent.com/32770080/93283331-a1eacf80-f7d0-11ea-9dee-8ab6a16101c3.PNG)
**Problem-relevant YAML-configuration entries:**
```yaml
esphome:
name: smartplug1
platform: ESP8266
board: esp01_1m
wifi:
ssid: censored
password: censored
manual_ip:
static_ip: 192.168.1.195
gateway: 192.168.1.1
subnet: 255.255.255.0
ap:
ssid: censored
password: censored
api:
logger:
ota:
web_server:
port: 80
binary_sensor:
- platform: gpio
pin:
number: GPIO0
mode: INPUT_PULLUP
inverted: True
name: "Sonoff S20 Button"
- platform: status
name: "Sonoff S20 Status"
switch:
- platform: gpio
name: "Sonoff S20 Relay"
pin: GPIO12
output:
# Register the green LED as a dimmable output ....
- platform: esp8266_pwm
id: s20_green_led
pin:
number: GPIO13
inverted: True
light:
# ... and then make a light out of it.
- platform: monochromatic
name: "Sonoff S20 Green LED"
output: s20_green_led
```
**Logs (if applicable):**
See the screenshot.
**Additional information and things you've tried:**
Restarting EspHome. Reinstalling EspHome.
The following YAML Script was used to compile an ELF binary:
esphome:
name: smartplug1
platform: ESP8266
board: esp01_1m
wifi:
ssid: censored
password: censored
manual_ip:
static_ip: 192.168.1.195
gateway: 192.168.1.1
subnet: 255.255.255.0
ap:
ssid: censored
password: censored
api:
logger:
ota:
web_server:
port: 80
binary_sensor:
- platform: gpio
pin:
number: GPIO0
mode: INPUT_PULLUP
inverted: True
name: "Sonoff S20 Button"
- platform: status
name: "Sonoff S20 Status"
switch:
- platform: gpio
name: "Sonoff S20 Relay"
pin: GPIO12
output:
- platform: esp8266_pwm
id: s20_green_led
pin:
number: GPIO13
inverted: True
light:
- platform: monochromatic
name: "Sonoff S20 Green LED"
output: s20_green_led
I really hope you guys can look into this problem, as it currently renders EspHome unusable for me.
Hope to get some input from you guys
Execute pio settings set force_verbose Yes
and restart your compilation.
What is the command that comes after Creating BIN file "...."
?
What happens if you execute that command in a separate shell?
Have you checked that running /root/.platformio/packages/toolchain-xtensa@*/bin/xtensa-lx106-elf-objdump
throws no error about missing shared libraries? If yes, what does ldd <path to objdump>
tell you?
Also it seems fishy to me that its using packages installed as root. Are you really running everything as root? Or running as a non-root user.
panakos
December 24, 2022, 12:13pm
3
Citrix Workspace was causing the issue. I updated Citrix and problem gone!