Description
So, when testing the OTA example from last ADF (2.6), compiled alone (all other sources in the project are disabled by preprocessor defines) it cannot build due to the IRAM being overflown by 664 byte.
There must be a bug somewhere, furthermore that we use ESP32D0QDR2 which has 2 MB internal PSRAM, and it is enabled in sdkconfig, along with all optimisations related to SPIRAM.
In SDKConfig i also have the BT dual mode enabled, because the product uses both A2DP and BLE for provisioning. But we can run wifi, BT and BLE at the same time without getting out of IRAM, with the actual firmware, so i am not sure how the OTA example, running standalone could use all the IRAM.
If i clean, and then build, it can build (once), but as soon as i try to upload, it fails with the IRAM overflow message. Which doesnt make much sense either.
after upload or upload and monitor
Linking .pio\build\esp32dev\firmware.elf
c:/users/xxxx/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/11.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: missing --end-group; added as last command line option
c:/users/xxxx/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/11.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio/build/esp32dev/firmware.elf section `.iram0.text' will
not fit in region `iram0_0_seg'
c:/users/xxxx/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/11.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: IRAM0 segment data does not fit.
c:/users/xxxx/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/11.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: region `iram0_0_seg' overflowed by 664 bytes
collect2.exe: error: ld returned 1 exit status
*** [.pio\build\esp32dev\firmware.elf] Error 1
after clean, then build (but trying upload after that, will fail with IRAM overflow).
c:/users/xxxx/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/11.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: missin
g --end-group; added as last command line option
Retrieving maximum program size .pio\build\esp32dev\firmware.elf
Checking size .pio\build\esp32dev\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [= ] 8.6% (used 28248 bytes from 327680 bytes)
Flash: [==== ] 37.3% (used 1245365 bytes from 3342336 bytes)
Building .pio\build\esp32dev\firmware.bin