After export Arduino IDE project, i have errors: .dram0.bss' will not fit in region dram0_0_seg' \ DRAM segment data does not fit \ region `dram0_0_seg' overflowed by 488 byte

I created this topic in github, but I don’t know where is best place

This project ESP32-Oscilloscope/ESP32_Oscilloscope at main · Circuit-Digest/ESP32-Oscilloscope · GitHub
, i converted to PIO format for three ways:

  1. Classic C++: created file structure with .cpp and .h files
  2. All .ino files cobine in one big .cpp file
  3. Using PIO option “Import Arduino Project”.

In all three ways, i have the same error:

Linking .pio\build\esp32dev\firmware.elf
c:/users/user/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32dev\firmware.elf section `.dram0.bss' will not fit in region `dram0_0_seg'
c:/users/user/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: DRAM segment data does not fit.
c:/users/user/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: DRAM segment data does not fit.
c:/users/user/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: region `dram0_0_seg' overflowed by 488 bytes
collect2.exe: error: ld returned 1 exit status
*** [.pio\build\esp32dev\firmware.elf] Error 1

But in Arduino IDE its project compiling and working well.

If You want to check this project, keep in mind - its project for ESP32 1.xx version. For ESP32 versions 2.xx need the little change. The line:

i2s_read_bytes(I2S_NUM_0, (char*)&i2s_buff[i * NUM_SAMPLES], NUM_SAMPLES * sizeof(uint16_t), portMAX_DELAY);

change to:

size_t bytes = 0;    
   i2s_read(I2S_NUM_0, (char*)&i2s_buff[i * NUM_SAMPLES],  NUM_SAMPLES * sizeof(uint16_t), &bytes, portMAX_DELAY); 

With which Arduino-ESP32 core version and Tools settings does it compile correctly in the Arduino IDE?

Thank You, I cheked its.
Yes, You are wright. This project compile correctly only when ESP32 core version 2.05 or lover.
With ESP32 core version 2.06 and 2.07 Arduino IDE has some errors

If 2.0.5 is fine then you could do platform = 5.2.0 in the platformio.ini.

2 Likes