How to fix ld: region `drom0_0_seg' overflowed error

Drnstar
Posts: 1
Joined: Tue Jun 13, 2023 2:18 pm

How to fix ld: region `drom0_0_seg' overflowed error

Postby Drnstar » Tue Jun 13, 2023 2:32 pm

Hello,
I'm using ESP32C3 and Rust to code a small embedded application. it uses ESP-IDF 5.0, when I code more and more codes, the app size gets bigger, now when I run the "build" command, it throws the following error

Code: Select all

  = note: [ldproxy] Running ldproxy
          Error: Linker /home/<my_home>/.espressif/tools/riscv32-esp-elf/esp-2022r1-11.2.0/riscv32-esp-elf/bin/riscv32-esp-elf-gcc failed: exit status: 1
          STDERR OUTPUT:
          /home/<my_home>/.espressif/tools/riscv32-esp-elf/esp-2022r1-11.2.0/riscv32-esp-elf/bin/../lib/gcc/riscv32-esp-elf/11.2.0/../../../../riscv32-esp-elf/bin/ld: /drn/RustProjects/pomodoro/target/riscv32imc-esp-espidf/debug/deps/Pomodoro-1b9aac50edb587b3 section `.flash.rodata' will not fit in region `drom0_0_seg'
          /home/<my_home>/.espressif/tools/riscv32-esp-elf/esp-2022r1-11.2.0/riscv32-esp-elf/bin/../lib/gcc/riscv32-esp-elf/11.2.0/../../../../riscv32-esp-elf/bin/ld: region `drom0_0_seg' overflowed by 380184 bytes
          collect2: error: ld returned 1 exit status
I found some solutions for it,but it bases on arduino and C language, not rust, how to fix it?
Thank you in advance for any assistance!

Who is online

Users browsing this forum: No registered users and 56 guests