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

"IRAM0 segment data does not fit" #20

Closed
alorbach opened this issue Dec 3, 2020 · 3 comments
Closed

"IRAM0 segment data does not fit" #20

alorbach opened this issue Dec 3, 2020 · 3 comments

Comments

@alorbach
Copy link

alorbach commented Dec 3, 2020

Not sure if this is the right location for this issue.
I am able to build based on esp-idf 3.2 and arduino-esp32 tag 1.0.4.

I incremented some WIFI buffers to this:
CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM=32
CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM=32
CONFIG_ESP32_WIFI_TX_BA_WIN=12
CONFIG_ESP32_WIFI_RX_BA_WIN=16

Now when I build for a PSRAM enabled device (With Camera Support), I get this error:
Controller.ino.elf section .iram0.text' will not fit in region iram0_0_seg'
xtensa-esp32-elf/bin/ld.exe: IRAM0 segment data does not fit.
xtensa-esp32-elf/bin/ld.exe: region `iram0_0_seg' overflowed by 2188 bytes

Is there anything I can to avoid this problem?
CONFIG_ESP32_WIFI_IRAM_OPT and CONFIG_ESP32_WIFI_RX_IRAM_OPT are already disabled.

@me-no-dev
Copy link
Member

why not use 3.3 and master of this repo? Try with BT disabled (if it's enabled).

@alorbach
Copy link
Author

alorbach commented Dec 3, 2020

See #19
3.3 is not stable with my Sketch, I may try it again soon.

I have workaround somehow for now by disabling CONFIG_SPIRAM_CACHE_WORKAROUND for now, see my settings:
alorbach@8f9ccd4

It freed up enough IRAM memory so I can build by sketch again for esp32 cam modules.
However I would rather find another solution or perhaps increase / double IRAM memory size if that makes sense?

I am using a lot of PSTR() to store debug printfs into flash memory. And my sketch has been grown alot, could this be related?

Regarding BT, I could disable it but I may use it in my project at a later step. I have set Bluetooth to CONFIG_BTDM_CONTROLLER_MODE_BLE_ONLY though as I thought this could free up some mem and I don't need BT Classic.

@alorbach
Copy link
Author

FYI: Fixed by building with esp-idf v3.3

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