esphome / issues

Issue Tracker for ESPHome
https://esphome.io/
293 stars 36 forks source link

Raspberry pi pico w fail to compile #6470

Closed freddiemare closed 6 days ago

freddiemare commented 6 days ago

The problem

After Both the Current version: 2024.11.1 and Previous version: 2024.11.0 of ESPHome fail to update my Raspberry Pi Pico W RP2040's.

Which version of ESPHome has the issue?

2024.11.0 and 2024.11.1

What type of installation are you using?

Home Assistant Add-on

Which version of Home Assistant has the issue?

Core 2024.11.2 Supervisor 2024.11.4 Operating System 13.2 Frontend 20241106.2

What platform are you using?

RP2040

Board

Raspberry Pi Pico W

Component causing the issue

Compiling

Example YAML snippet

# Full functional code. 
# This is one of my devices but I have three more Pi Pico W RP2040 devices and they all result in the same way when I try to update them. there are only two that have Display's
substitutions:
  ipaddress: 192.168.2.61
  gate_way: 192.168.2.1
  sub_net: 255.255.255.0
  dns_1: 192.168.2.1
  dns_2: 1.1.1.1
  friendly_name: Soldering Pad
  projectname: "plot35.solderingpad"
  device_name: "solderingpad"
  time_timezone: "Africa/Johannesburg"
  device_description: "Plot35 Soldering Pad V ${version}"
  created_by: "Freddie Mare 2024"
  devicename: plot35boreholepump
  wifichannel: "7"
  version: "1.0.3.8"

  # Display
  # Graphing reducing x-scale to prevent too many gridlines
  timeduration: "10min"
  xgrid: "1min"
  ygrid: "2.0"
  # Big Pad
  #pid_kp: "0.08230"
  #pid_ki: "0.00082"
  #pid_kd: "2.06166"

  #Small Pad
  pid_kp: "0.03675"
  pid_ki: "0.00062"
  pid_kd: "0.54579"

  processnoise: "0.0028"

esphome:
  name: '${device_name}'
  friendly_name: '${friendly_name}'
  comment: $device_description
  name_add_mac_suffix: false
  build_path: "../config/esphome/.esphome/${device_name}_build"
  project:
    name: "${projectname}"
    version: "${version}"
  on_boot:
    priority: -100.0
    then:
      - lambda: id(${device_name}_heater_element01_state).publish_state(false);
      - lambda: |-
          // Ensure the climate component is set to OFF and temperature is set to 27
          auto call = id(${device_name}_pid).make_call();
          call.set_mode(climate::CLIMATE_MODE_OFF);
          call.set_target_temperature(27);
          call.perform();

rp2040:
  board: rpipicow
  #restore_from_flash: true
  framework:
    # Required until https://github.com/platformio/platform-raspberrypi/pull/36 is merged
    platform_version: https://github.com/maxgerhardt/platform-raspberrypi.git

# Enable logging
logger:

safe_mode:
    disabled: false
    num_attempts: 10
    boot_is_good_after: 1min
    reboot_timeout: 5min

# Enable Home Assistant API
api:
  #encryption:
  #  key: !secret api_solderingpad_key

ota:
  - platform: esphome
    password: !secret ota_solderingpad_password

wifi:
  reboot_timeout: 0s
  output_power: 20db
  power_save_mode: none
  fast_connect: True

# Single WiFi only 
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  #bssid: 56:AF:97:A3:47:EE # Plot35
  #bssid: F4:E5:F2:AC:52:9F # Private

  manual_ip:
  # Set this to the IP of the pi pico w
    static_ip: ${ipaddress}
    # Set this to the IP address of the router. Often ends with .1
    gateway: ${gate_way}
    #The subnet of the network. 255.255.255.0 works for most home networks.
    subnet: ${sub_net}
    dns1: ${dns_1}
    dns2: ${dns_2}

  # Enable fallback hotspot in case wifi connection fails
  ap:
    ssid: '${device_name}'
    password: !secret hotspotpassword

Anything in the logs that might be useful for us?

INFO ESPHome 2024.11.1
INFO Reading configuration /config/esphome/soldering-pad.yaml...
INFO Detected timezone 'Africa/Johannesburg'
INFO Generating C++ source...
INFO Compiling app...
Processing solderingpad (board: rpipicow; framework: arduino; platform: https://github.com/maxgerhardt/platform-raspberrypi.git)
--------------------------------------------------------------------------------
HARDWARE: RP2040 133MHz, 256KB RAM, 2MB Flash
 - framework-arduinopico @ 1.30904.0 (3.9.4) 
 - tool-picotool-rp2040-earlephilhower @ 5.140200.240929 (14.2.0) 
Flash size: 2.00MB
Sketch size: 1.00MB
Filesystem size: 1.00MB
PSRAM size: 0.00MB
Maximium Sketch size: 1044480 EEPROM start: 0x101ff000 Filesystem start: 0x100ff000 Filesystem end: 0x101ff000
Dependency Graph
|-- WiFi @ 1.0.0
|-- LEAmDNS @ 1.2
|-- Updater @ 1.0
|-- SPI @ 1.0
|-- MD5Builder @ 1.0.0
|-- lwIP-Ethernet @ 1
|-- lwIP_CYW43 @ 1
Compiling .pioenvs/solderingpad/src/main.cpp.o
Linking .pioenvs/solderingpad/firmware.elf
/data/cache/platformio/packages/toolchain-rp2040-earlephilhower/bin/../lib/gcc/arm-none-eabi/14.2.0/../../../../arm-none-eabi/bin/ld: /data/cache/platformio/packages/toolchain-rp2040-earlephilhower/bin/../lib/gcc/arm-none-eabi/14.2.0/../../../../arm-none-eabi/lib/thumb/libc.a(libc_a-findfp.o): in function `std':
/workdir/repo/newlib/newlib/libc/stdio/findfp.c:93:(.text+0xda): undefined reference to `__retarget_lock_init_recursive'
/data/cache/platformio/packages/toolchain-rp2040-earlephilhower/bin/../lib/gcc/arm-none-eabi/14.2.0/../../../../arm-none-eabi/bin/ld: /workdir/repo/newlib/newlib/libc/stdio/findfp.c:93:(.text+0x124): undefined reference to `__retarget_lock_init_recursive'
/data/cache/platformio/packages/toolchain-rp2040-earlephilhower/bin/../lib/gcc/arm-none-eabi/14.2.0/../../../../arm-none-eabi/bin/ld: /workdir/repo/newlib/newlib/libc/stdio/findfp.c:93:(.text+0x17c): undefined reference to `__retarget_lock_init_recursive'
/data/cache/platformio/packages/toolchain-rp2040-earlephilhower/bin/../lib/gcc/arm-none-eabi/14.2.0/../../../../arm-none-eabi/bin/ld: /data/cache/platformio/packages/toolchain-rp2040-earlephilhower/bin/../lib/gcc/arm-none-eabi/14.2.0/../../../../arm-none-eabi/lib/thumb/libc.a(libc_a-findfp.o): in function `__sfp':
/workdir/repo/newlib/newlib/libc/stdio/findfp.c:201:(.text+0x1ea): undefined reference to `__retarget_lock_init_recursive'
collect2: error: ld returned 1 exit status
*** [.pioenvs/solderingpad/firmware.elf] Error 1
========================= [FAILED] Took 541.08 seconds =========================

Additional information

No response

ssieb commented 6 days ago

Try removing the framework: section.

freddiemare commented 6 days ago

Thank you ssieb That resolved the issue the issue on all devices.