Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESPHOME Linking Error #80

Closed
GernotAlthammer opened this issue Sep 29, 2024 · 5 comments
Closed

ESPHOME Linking Error #80

GernotAlthammer opened this issue Sep 29, 2024 · 5 comments

Comments

@GernotAlthammer
Copy link

GernotAlthammer commented Sep 29, 2024

Linking of ESPHome project does show error

ESPHome: 2024.9.1

YAML configuration:

esphome:
  name: pico-w-1
  friendly_name: pico-w-1

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

Error-Message:

Linking .pioenvs/pico-w-1/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
@maxgerhardt
Copy link
Owner

Don't use the bleeding edge platform version with an old Arduino-Pico version. Fixate both in place. Duplicate of #75, #79, earlephilhower/arduino-pico#2502

@maxgerhardt
Copy link
Owner

maxgerhardt commented Sep 29, 2024

To be specific:

Replace

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

with

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

@GernotAlthammer
Copy link
Author

Danke Maximilian. Firmware build ist ohne Fehler durchgelaufen :)

@maxgerhardt
Copy link
Owner

FYI we've switched back to mainline Arduino-Pico, so the latest https://github.com/maxgerhardt/platform-raspberrypi.git works again with https://github.com/earlephilhower/arduino-pico.git.

If ESPHome is selecting an commit of Arduino-Pico though, you still need the older platform per above. I'm thinking about detecting the older Arduino-Pico version and using the correct older toolchain with it, aka adding backwards compatibility.

@GernotAlthammer
Copy link
Author

Hi Maximilian,
the ESPHome 2024.9.2 does fix the "behind the scenes stuff" for the users.
See ESPHome RP2040 update and recommendations:
https://esphome.io/components/rp2040.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants