esp-idf: IRAM0 segment data does not fit (IDFGH-11114)
Answers checklist.
- I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
- I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
- I have searched the issue tracker for a similar issue and not found a similar issue.
IDF version.
v4.4.5
Operating System used.
Windows
How did you build your project?
Command line with idf.py
If you are using Windows, please specify command line type.
None
Development Kit.
ESP32 Wrover Module
Power Supply used.
External 3.3V
What is the expected behavior?
In my project, I successfully utilized several ICs that communicate via I2C, as well as a camera. Additionally, the project incorporated both Wi-Fi and Bluetooth functionality. However, when building the project into the ESP-IDF, an IRAM error is encountered.
What is the actual behavior?
IRAM0 segment data does not fit
Steps to reproduce.
i just turn on BLE functionality and i wrote some functions and tried to test ended up with this error
Debug Logs.
[1/9] Performing build step for 'bootloader'
[1/1] cmd.exe /C "cd /D C:\Espressif\frameworks\esp-idf-v4.4.5\workspace\GAZZELE_MINI\build\bootloader\esp-idf\esptool_py && C:\Espressif\python_env\idf4.4_py3.11_env\Scripts\python.exe C:/Espressif/frameworks/esp-idf-v4.4.5/components/partition_table/check_sizes.py --offset 0x8000 bootloader 0x1000 C:/Espressif/frameworks/esp-idf-v4.4.5/workspace/GAZZELE_MINI/build/bootloader/bootloader.bin"
Bootloader binary size 0x6ae0 bytes. 0x520 bytes (5%) free.
[2/7] Building CXX object esp-idf/main/CMakeFiles/__idf_main.dir/main.cpp.obj
C:/Espressif/frameworks/esp-idf-v4.4.5/workspace/GAZZELE_MINI/main/main.cpp:73:14: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
char* host = "192.168.149.237";
^~~~~~~~~~~~~~~~~
[5/7] Linking CXX executable GAZZELE_MINI.elf
FAILED: GAZZELE_MINI.elf
cmd.exe /C "cd . && C:\Espressif\tools\xtensa-esp32-elf\esp-2021r2-patch5-8.4.0\xtensa-esp32-elf\bin\xtensa-esp32-elf-g++.exe -mlongcalls -Wno-frame-address @CMakeFiles\GAZZELE_MINI.elf.rsp -o GAZZELE_MINI.elf && cd ."
c:/espressif/tools/xtensa-esp32-elf/esp-2021r2-patch5-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: GAZZELE_MINI.elf section `.iram0.text' will not fit in region `iram0_0_seg'
c:/espressif/tools/xtensa-esp32-elf/esp-2021r2-patch5-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: IRAM0 segment data does not fit.
c:/espressif/tools/xtensa-esp32-elf/esp-2021r2-patch5-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: region `iram0_0_seg' overflowed by 18216 bytes
collect2.exe: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
* The terminal process "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -Command ninja " terminated with exit code: 1.
More Information.
when ever i commented bluetooth part and tried to build its getting build
About this issue
- Original URL
- State: closed
- Created 9 months ago
- Comments: 19 (1 by maintainers)
@Abhay-2412
This doesn’t mean your overall binary size is too large. It just means that your binary uses too much IRAM. By default, most of your binary (i.e., functions) will be stored in flash memory. However, certain functions are placed in IRAM for performance or behavioral reasons.
You can use
idf.py size-componentsandidf.py size-filesto get a summary of IRAM usage on a per-component and per-file level respectively. This should help you track down which feature is using the most IRAM.To reduce IRAM usage, please see the optimizing IRAM usage doc. This should list the various menuconfig options to move particular component functions from IRAM back into flash memory, thus saving some IRAM.