ginlong-solis icon indicating copy to clipboard operation
ginlong-solis copied to clipboard

ESPHome 2024.5.0 linker error: .ram_heap.data will not fit in region BD_RAM

Open helmuteke opened this issue 1 year ago • 8 comments

Hello

in receive next error when i compile , someone ?, Someone who can help ?

/data/cache/platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld: .pioenvs/solis-emw3080/raw_firmware.ota1.elf section .ram_heap.data' will not fit in region BD_RAM' /data/cache/platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld: region `BD_RAM' overflowed by 224 bytes

collect2: error: ld returned 1 exit status

|-- Generated file not found: .pioenvs/solis-emw3080/raw_firmware.ota1.elf *** [.pioenvs/solis-emw3080/raw_firmware.elf] Error 1

helmuteke avatar May 17 '24 05:05 helmuteke

I can reproduce the problem locally with the newest (2024.5.0) ESPHome version. It seems that they changed something so the project does not fit into RAM anymore -- which is strange. This needs further investigation.

If you have the chance to compile the project with some older ESPHome version this might be a solution. As far as I know there is no (easy) way to downgrade the HA add-on.

hn avatar May 17 '24 10:05 hn

ESPHome 2024.5.0 might be broken in a more general aspect, people even suggest to revoke this version

hn avatar May 17 '24 12:05 hn

so i have to wait i think ?

helmuteke avatar May 17 '24 12:05 helmuteke

I

ESPHome 2024.5.0 might be broken in a more general aspect, people even suggest to revoke this version

I have rolled back my docker to 2024.4.1 and disabled automatic update through Portainer, other people called version 2024.5.0 as a royal PITA

Solong.B

bandit7311 avatar May 17 '24 14:05 bandit7311

Same on my side, I rolled back ESPHome from 2024.5.0 to 2024.4.1 and reinstalled hn's ginlong-solis file on my ESP8266. Afterwards all was working fine again.

carstengl avatar May 17 '24 14:05 carstengl

Can someone point me how to downgrade , i use esphome in HA

helmuteke avatar May 17 '24 16:05 helmuteke

Can someone point me how to downgrade , i use esphome in HA

I am using ESPHome in HA as well and before installing an update for addons HA is creating a new Backup when you have selected the checkbox.

In "Settings->System->Backups" you should then see a backup called like "addon_xxxxx_esphome_2024.4.1". Click on it, set the checkbox and restore it, afterwards everthing should work again normal.

Screenshot_20240517-221230_Home Assistant

carstengl avatar May 17 '24 20:05 carstengl

This version was first instll 🙁

helmuteke avatar May 18 '24 06:05 helmuteke

They released 2024.5.1. I see no relevant changes for this problem in the changelog and people are still complaining about defunct devices. Did not try to compile solis-emw3080.yaml yet, but probably not worth a try.

hn avatar May 20 '24 18:05 hn

someone a other solution for this problem ?

helmuteke avatar May 21 '24 12:05 helmuteke

someone a other solution for this problem ?

Just downgrade esphome.. i have other products which have stopped working with latest esphome.. now i keep older version and don't upgrade

geduxas avatar May 21 '24 13:05 geduxas

someone a other solution for this problem ?

Just downgrade esphome.. i have other products which have stopped working with latest esphome.. now i keep older version and don't upgrade

But how can i downgrade please . . . it's HA addon

helmuteke avatar May 21 '24 13:05 helmuteke

  • Setup Build environment (Python for Windows, Debian in a VM/WSL, a Raspberry Pi or whatever you like)
  • Install ESPHome manually but make sure you use pip3 install esphome==2024.4.1 for the older version, double-check afterwards with esphome version
  • esphome compile solis-emw3080.yaml
  • If successful, the UF2 image can be found somewhere in path ./.esphome/build/ ... /.pioenvs/ ...

(not tested, surely something is missing ...)

hn avatar May 21 '24 13:05 hn

i found this handy repo : just compiled my uf2

https://github.com/khenderick/esphome-legacy-addons?tab=readme-ov-file

helmuteke avatar May 21 '24 13:05 helmuteke

Still an issue in 2024.5.2 My last working update was in 2024.4.2

|-- Image 1: raw_firmware.ota1.elf
/config/.esphome/platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld: .pioenvs/solis-emw3080/raw_firmware.ota1.elf section `.ram_heap.data' will not fit in region `BD_RAM'
/config/.esphome/platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld: region `BD_RAM' overflowed by 408 bytes
collect2: error: ld returned 1 exit status
|-- Generated file not found: .pioenvs/solis-emw3080/raw_firmware.ota1.elf
*** [.pioenvs/solis-emw3080/raw_firmware.elf] Error 1
========================= [FAILED] Took 64.84 seconds =========================

image

My Slimmelezer+ was sucessfully updated to 2024.5.2

TheGroundZero avatar May 23 '24 12:05 TheGroundZero

To fix this I removed the webportal access, it seems to bring down the firmware size enough to fix the issue. So not a fix for those who reley on the webportal, but for those using ESP home/Home Assistant it works fine.

# captive_portal:

timh77 avatar May 27 '24 06:05 timh77

Thanks @timh77 :) I personally don't like these kinds of workarounds, but this is probably the best option we have today.

hn avatar May 27 '24 09:05 hn

2024.5.5 seems to work (even with captive_portal=enabled) again. I haven't investigated this in detail to see if this is a coincidence or if there was a specific fix for it.

hn avatar Jun 06 '24 11:06 hn

I guess it's related to this change in 2024.5.4 (May 28)

[web_server_base] Bump ESPAsyncWebServer-esphome to 3.2.2 [esphome#6797](https://github.com/esphome/esphome/pull/6797) by [@jesserockz](https://github.com/jesserockz)

Previously it used version 3.2.0. Just a minor change was included, but I guess that resulted in a much smaller filesize.

timh77 avatar Jun 06 '24 12:06 timh77