Raspberry PI Pico W not compiling since 12.0 Update

Hi, I’ve been using a Raspberry Pi Pico for months to control my garage door opener. It’s been working well, and updating wirelessly for several versions.

I recently updated to 12.x for ESPHome and I’m now on 2023.12.5. I have one ESP32 based devices, which continues to compile and update wirelessly.

Is there something wrong with my compiler?

INFO ESPHome 2023.12.5
INFO Reading configuration /config/esphome/picow-1.yaml...
INFO Generating C++ source...
INFO Compiling app...
Processing picow1 (board: rpipicow; framework: arduino; platform: https://github.com/maxgerhardt/platform-raspberrypi.git)
> --------------------------------------------------------------------------------
> HARDWARE: RP2040 133MHz, 264KB RAM, 2MB Flash
>  - framework-arduinopico @ 1.30600.0 (3.6.0) 
>  - tool-rp2040tools @ 1.0.2 
> Flash size: 2.00MB
> Sketch size: 1.00MB
> Filesystem size: 1.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
> |-- noise-c @ 0.1.4
> |-- Wire @ 1.0
> |-- MD5Builder @ 1.0.0
> |-- lwIP-Ethernet @ 1
> |-- lwIP_
CYW43 @ 1
> |-- SPI @ 1.0
> Linking .pioenvs/picow1/firmware.elf
> /data/cache/platformio/packages/toolchain-rp2040-earlephilhower/bin/../lib/gcc/arm-none-eabi/10.3.0/../../../../arm-none-eabi/bin/ld: unrecognized option '--no-warn-rwx-segments'
> /data/cache/platformio/packages/toolchain-rp2040-earlephilhower/bin/../lib/gcc/arm-none-eabi/10.3.0/../../../../arm-none-eabi/bin/ld: use the --help option for usage information
> collect2: error: ld returned 1 exit status
> *** [.pioenvs/picow1/firmware.elf] Error 1
> ========================= [FAILED] Took 24.74 seconds =========================

I’ve tried cleaning the build files, rebooting the entire Host (Raspberry Pi 4 with 2GB RAM), and I’m not sure what else to try. Any help would be appreciated.

Here is my YAML for the Garage Door (plus temperature sensor)

esphome:
  name: "picow1"

rp2040:
  board: rpipicow
  framework:
    platform_version: https://github.com/maxgerhardt/platform-raspberrypi.git

# Enable logging
# logger:

# Enable Home Assistant API
api:
  encryption:
    key: "xxxxxxhidden"

ota:
  password: "xxxxxxxhidden"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot in case wifi connection fails
  ap:
    ssid: "Picow Fallback Hotspot"
    password: "xxxxxhidden"

# I2C bus Temp and Humidity
i2c:
  sda: GPIO16
  scl: GPIO17
  scan: true
  id: bus_a

# LED Blink Code
switch:
  - platform: gpio
    pin: 32
    name: "Picow 1 LED"
    id: picow_led
    restore_mode: ALWAYS_OFF
    icon: "mdi:led-outline"

# Buzzer Code
  - platform: gpio
    pin: GPIO2
    name: "Garage Door Buzzer"
    icon: "mdi:bullhorn-outline"
    id: Buzzer
    restore_mode: ALWAYS_OFF
    on_turn_on:
      - delay: 250ms
      - switch.turn_off: Buzzer

# Relay Output for Garage
  - platform: gpio
    pin: GPIO7
    name: "Relay"
    id: Relay
    restore_mode: ALWAYS_OFF
    on_turn_on:
      - delay: 500ms
      - switch.turn_off: Relay

# Dallas Temp DS1820 - Not Activated Currently
#dallas:
#  - pin: GPIO1

sensor:
#  - platform: dallas
#    address: 0xb900000de0402828
#    name: "Picow Temp"
  - platform: aht10
    temperature:
      name: "Garage Temperature"
    humidity:
      name: "Garage Humidity"
    update_interval: 60s

# Internal Temperature - Not Activated Currently
#  - platform: adc
#    pin: TEMPERATURE
#    name: "Core Temperature"
#    unit_of_measurement: "°C"
#    filters:
#      - lambda: return 27 - (x - 0.706f) / 0.001721f;

# Garage Door Magnet
binary_sensor:
  - platform: gpio
    pin: 
      number: GPIO6
      mode: 
        input: true
        pullup: true
    name: "Garage Door Sensor"
    id: magnet_sensor
    device_class: garage_door
    filters:
      - delayed_on: 250ms
      - delayed_off: 250ms
    on_state:
      then:
        - if:
            condition:
              or:
                - binary_sensor.is_on: magnet_sensor
            then:
              - switch.turn_on: picow_led
            else:
              - switch.turn_off: picow_led

#Garage Door Code
cover:
  # This template hides both the functionality to open/close the door, as well as its current state
  # behind a single "cover"
  - platform: template
    device_class: garage
    name: "Garage Door"
    id: template_cov
    lambda: |-
      if (id(magnet_sensor).state) {
        return COVER_OPEN;
      } else {
        return COVER_CLOSED;
      }
    open_action:
      - switch.turn_on: Relay
      - delay: 0.5s
      - switch.turn_off: Relay
    close_action:
      - switch.turn_on: Buzzer
      - switch.turn_on: Relay
      - delay: 0.5s
      - switch.turn_off: Relay

Thank you, appreciate any help!

1 Like

i got exactly same error, same hardware, similar config (bunch of sensors, outputs, binary sensors, lights (rpi is the brain of light system)). Its working fine, just cant update (OTA and manual).
thanks in advance, appreciate any help.

Have either of you tried reverting back to your previous version of ESPHome? Might be worth a try if not.

Some solutions in this issues thread.

I just tried rolling back to 11.6, but I still can’t compile. Different errors now. I think I’ll have to investigate the SSH option to remove the build files.

I was not able to uninstall and reinstall and compile successfully. I moved away from using my Raspberry Pi to host ESPHome and instead setup using the Windows instructions to run locally on my laptop. With the integration running on my Home Assistant host, it works, and I’ll have to manually run updates from Windows.

Unfortunately this problem happens to me too.
Since version 12.0 I can no longer compile for RP2040.
I can do it for all other devices (e.g. esp01_1m, esp8285 ) but I can’t do it for Raspberry.
I use Home Assistant in a Hyper-V virtual machine and it has never given me problems with any device.
In my virtual machine, doing some research, I can’t find anything about “platformio”, so I don’t even know what to do.
Jrog wrote that he can compile from PC. I don’t know how to do it and I was very happy with the esphome interface inside home assistant. I hope someone can enlighten me :slight_smile:

Similar issue here. Trying to flash a clean install (no setting made yet), using a Pico WH - directly connected to an updated HA Yellow.



Any help is appreciated

You can delete the directory /data/cache/platformio.
I have also cleaned the build directory in ESPHome for the device.

Still an issue…
This is what fixed it for me.
It sort of seems like an issue with ESPHome’s Git loader, but messing with the hash triggered it to pull the required submodule.