diagnosing segment linking overflowing dram0_0_bss and dram0_0_seg?

tschak909
Posts: 36
Joined: Mon Oct 26, 2020 8:17 pm

diagnosing segment linking overflowing dram0_0_bss and dram0_0_seg?

Postby tschak909 » Fri Jan 15, 2021 4:47 pm

To start with, the FujiNet hardware is fully maxed out. a WROVER-E with 16MB of flash, and 8MB of PSRAM.

I have been folding a port of RunCPM into #FujiNet, so that the device can provide CP/M compatibility to an Atari 8-bit computer, alongside its other duties of being a sort of swiss army knife peripheral (more info at fujinet.online)

I have made a branch from our main repo and folded in the RunCPM code as a library, it's here:
https://github.com/FujiNetWIFI/fujinet- ... lib/runcpm

However, upon building, I am now overflowing segments:

Code: Select all

Linking .pio\build\fujinet-v1\firmware.elf
c:/users/thomc/.platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\fujinet-v1\firmware.elf section `.dram0.bss' will not fit in region `dram0_0_seg'
c:/users/thomc/.platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: DRAM segment data does not 
fit.
c:/users/thomc/.platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: DRAM segment data does not 
fit.
c:/users/thomc/.platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: region `dram0_0_seg' overflowed by 204984 bytes
I initially tried to truncate the optimization tables in https://github.com/FujiNetWIFI/fujinet- ... pm/cpu.cpp to see if that would shrink the overflow. It doesn't.

So I am scratching my head a bit, is there something obvious I am missing?

-Thom

ESP_Sprite
Posts: 9051
Joined: Thu Nov 26, 2015 4:08 am

Re: diagnosing segment linking overflowing dram0_0_bss and dram0_0_seg?

Postby ESP_Sprite » Sat Jan 16, 2021 1:43 am

Your RAM is overflowing with statically-declared variables, but you probably figured that out. If you look in the build/ directory, you'll see there is a .map file there. That shows you all symbols and how large they are; your best bet is to look for something big that is allocated int he .bss or .data segments.

Who is online

Users browsing this forum: fahirad and 268 guests