hn / ginlong-solis

Solis inverter ESP8266 data logger, S3 WiFi stick reverse engineering and ESPhome firmware
88 stars 15 forks source link

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

Closed helmuteke closed 4 months ago

helmuteke commented 5 months ago

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 regionBD_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

hn commented 5 months ago

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 commented 5 months ago

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

helmuteke commented 5 months ago

so i have to wait i think ?

bandit7311 commented 5 months ago

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

carstengl commented 5 months ago

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.

helmuteke commented 5 months ago

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

carstengl commented 5 months ago

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

helmuteke commented 5 months ago

This version was first instll 🙁

hn commented 5 months ago

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.

helmuteke commented 5 months ago

someone a other solution for this problem ?

geduxas commented 5 months ago

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

helmuteke commented 5 months ago

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

hn commented 5 months ago

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

helmuteke commented 5 months ago

i found this handy repo : just compiled my uf2

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

TheGroundZero commented 5 months ago

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

timh77 commented 5 months ago

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:

hn commented 5 months ago

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

hn commented 4 months ago

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.

timh77 commented 4 months ago

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.