esphome / issues

Issue Tracker for ESPHome
https://esphome.io/
291 stars 34 forks source link

2022.3.0 compile errors #3158

Closed truglodite closed 1 year ago

truglodite commented 2 years ago

The problem

Compiling for one of my devices returns:

Compiling /data/master/.pioenvs/master/FrameworkArduino/umm_malloc/umm_poison.c.o
Archiving /data/master/.pioenvs/master/libFrameworkArduino.a
Linking /data/master/.pioenvs/master/firmware.elf
/data/cache/platformio/packages/toolchain-xtensa/bin/../lib/gcc/xtensa-lx106-elf/10.3.0/../../../../xtensa-lx106-elf/bin/ld: /data/master/.pioenvs/master/firmware.elf section `.text1' will not fit in region `iram1_0_seg'
collect2: error: ld returned 1 exit status
*** [/data/master/.pioenvs/master/firmware.elf] Error 1
========================= [FAILED] Took 154.01 seconds =========================

This recently happened on another device, which is actually running even more features and complexity. On that device, just disabling encryption got it working (still works). However in this case, it won't even compile after commenting out the encryption lines. Unfortunately the device is of course no longer upgradeable with this issue.

Which version of ESPHome has the issue?

2022.3.0

What type of installation are you using?

Home Assistant Add-on

Which version of Home Assistant has the issue?

2022.3.5

What platform are you using?

ESP8266

Board

Wemos D1 mini

Component causing the issue

Not sure?

Example YAML snippet

substitutions:
  name: "master"
  friendly_name: "Master"

esphome:
  name: ${name}
  platform: ESP8266
  board: nodemcuv2

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  # Enable fallback hotspot (captive portal) in case wifi connection fails

logger:

api:
  password: !secret master_password
  encryption:
    key: !secret encryption_key
# Enable ota
ota:
  password: !secret ota_password

# Device Specific Configs ###########################################
# Wemos D1 Mini
#
# dallas -> GPIO16 (D0)
# sda -> GPIO5 (D1)
# scl -> GPIO4 (D2)
# soft rx -> GPIO0 (D3) [keep high on boot!!!]
# built in LED -> GPIO2 (D4) [keep high on boot!!!]
# DHT -> GPIO14(D5)
# motion -> GPIO12(D6)
# soft tx -> GPIO13(D7)
# button (to Vcc) -> GPIO15(D8) [keep low on boot!!!]

uart:
  tx_pin: D7
  rx_pin: D3
  baud_rate: 9600

i2c:
  sda: D1
  scl: D2

dfplayer:

time:
  - platform: homeassistant
    id: ha_time

text_sensor:
  - platform: homeassistant
    name: "ESPhome Voice"
    internal: true
    entity_id: input_text.esphome_voice
    on_value:
      then:
        - dfplayer.set_volume: 25
        - delay: 150ms
        - dfplayer.play_folder:
            folder: 1
            file: !lambda return atoi(x.c_str());

font:
  - file: "verdana.ttf"
    id: my_fontlg
    size: 20
  - file: "verdana.ttf"
    id: my_fontmd
    size: 18
  - file: "verdana.ttf"
    id: my_fontsm
    size: 10

display:
  - platform: ssd1306_i2c
    id: my_display
    pages:
      - id: page1
        lambda: |-
          auto nowTime = id(ha_time).now();
          int date = nowTime.day_of_month;

          it.strftime(120, 20, id(my_fontlg), TextAlign::BOTTOM_RIGHT, "%I:%M", nowTime);
          if (nowTime.hour > 0 && nowTime.hour < 10) {
            it.filled_rectangle(57, 0, 15, 21, COLOR_OFF);
          }
          else if (nowTime.hour >= 13 && nowTime.hour <= 21)  {
            it.filled_rectangle(57, 0, 15, 21, COLOR_OFF);
          }

          if (nowTime.hour < 12) {
            it.print(121, 10, id(my_fontsm), TextAlign::BOTTOM_LEFT, "A");
          }
          else {
            it.print(121, 18, id(my_fontsm), TextAlign::BOTTOM_LEFT, "P");
          }

          it.strftime(0, 10, id(my_fontsm), TextAlign::BOTTOM_LEFT, "%A", nowTime);

          it.strftime(0, 18, id(my_fontsm), TextAlign::BOTTOM_LEFT, "%b. ", nowTime);
          if (nowTime.day_of_month == 1 || nowTime.day_of_month == 21 || nowTime.day_of_month == 31)  {
            it.printf(49, 18, id(my_fontsm), TextAlign::BOTTOM_RIGHT, "%dst", date);
          }
          else if (nowTime.day_of_month == 2 || nowTime.day_of_month == 22) {
            it.printf(49, 18, id(my_fontsm), TextAlign::BOTTOM_RIGHT, "%dnd", date);
          }
          else if (nowTime.day_of_month == 3 || nowTime.day_of_month == 23) {
            it.printf(49, 18, id(my_fontsm), TextAlign::BOTTOM_RIGHT, "%drd", date);
          }
          else {
            it.printf(49, 18, id(my_fontsm), TextAlign::BOTTOM_RIGHT, "%dth", date);
          }

          it.print(it.get_width() / 4, 16, id(my_fontsm), TextAlign::TOP_CENTER, "Inside");
          it.printf(it.get_width() / 4, 24, id(my_fontmd), TextAlign::TOP_CENTER, "%.0f %%", id(thermostat_humid).state);
          it.printf(it.get_width() / 4, 42, id(my_fontlg), TextAlign::TOP_CENTER, "%.0f F", id(inside_temp).state);
          it.print(3*it.get_width() / 4, 16, id(my_fontsm), TextAlign::TOP_CENTER, "Outside");
          it.printf(3*it.get_width() / 4, 24, id(my_fontmd), TextAlign::TOP_CENTER, "%.0f %%", id(backyard_humid).state);
          it.printf(3*it.get_width() / 4, 42, id(my_fontlg), TextAlign::TOP_CENTER, "%.0f F", id(backyard_temp).state);

          it.line(0, 16, 127, 16);
          it.line(63, 16, 63, 63);

          if (id(button).state) {
            it.rectangle(0, 0, 128, 64);
          }
    model: "SSD1306 128x64"
    reset_pin: D0
    address: 0x3C
interval:
  - interval: 3s
    then:
      - display.page.show_next: my_display
      - component.update: my_display

# Binaries
binary_sensor:
  - platform: status
    name: "${friendly_name} Status"

  - platform: gpio
    pin:
      number: GPIO15
      mode: INPUT_PULLUP
    name: "${friendly_name} Button"
    id: button
    filters:
      - delayed_on: 10ms
      - delayed_off: 10ms

  - platform: gpio
    pin:
      number: D6
      mode: INPUT
    name: "${friendly_name} Motion"
    device_class: motion
    filters:
      - delayed_off: 5000ms

dallas:
  - pin: D0

status_led:
  pin: D4

sensor:
  - platform: dallas
    index: 0
    resolution: 12
    accuracy_decimals: 1
    name: "${friendly_name} Temperature"
    id: celsius
    unit_of_measurement: "°F"
    filters:
      - lambda: return x * (9.0 / 5.0) + 32.0;

  - platform: wifi_signal
    name: "${friendly_name} WiFi Signal"
    update_interval: 60s

  - platform: dht
    pin: D5
    model: DHT22
    humidity:
      accuracy_decimals: 0
      name: "${friendly_name} Humidity"
    update_interval: 60s

  - platform: bh1750
    name: "${friendly_name} Luminance"
    address: 0x23
    update_interval: 10s

  - platform: homeassistant
    name: "Backyard Temp"
    id: backyard_temp
    entity_id: sensor.backyard_temp
    internal: true
  - platform: homeassistant
    name: "Backyard Humid"
    id: backyard_humid
    entity_id: sensor.backyard_humid
    internal: true
  - platform: homeassistant
    name: "Inside Temp"
    id: inside_temp
    entity_id: sensor.inside_temp_avg
    internal: true
  - platform: homeassistant
    name: "Inside Humid"
    id: thermostat_humid
    entity_id: sensor.thermostat_humidity
    internal: true


### Anything in the logs that might be useful for us?

_No response_

### Additional information

_No response_
github-actions[bot] commented 1 year ago

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.