sodiumlb / loci-firmware

Oric LOCI firmware
BSD 3-Clause "New" or "Revised" License
3 stars 1 forks source link

Out of RAM memory? #4

Closed iss000 closed 3 months ago

iss000 commented 3 months ago

It seems that we are running out of RAM :(

100%] Linking CXX executable loci-firmware.elf
/usr/lib/gcc/arm-none-eabi/14.1.0/../../../../arm-none-eabi/bin/ld: loci-firmware.elf section `.bss' will not fit in region `RAM'
/usr/lib/gcc/arm-none-eabi/14.1.0/../../../../arm-none-eabi/bin/ld: region RAM overflowed
/usr/lib/gcc/arm-none-eabi/14.1.0/../../../../arm-none-eabi/bin/ld: section .stack1_dummy VMA [20040000,200407ff] overlaps section .bss VMA [20033ae8,200400db]
/usr/lib/gcc/arm-none-eabi/14.1.0/../../../../arm-none-eabi/bin/ld: region `RAM' overflowed by 220 bytes
Memory region         Used Size  Region Size  %age Used
           FLASH:      159508 B        16 MB      0.95%
             RAM:      196828 B       192 KB    100.11%
       SCRATCH_X:          2 KB         4 KB     50.00%
       SCRATCH_Y:           0 B         4 KB      0.00%
collect2: error: ld returned 1 exit status
make[2]: *** [src/CMakeFiles/loci-firmware.dir/build.make:1593: src/loci-firmware.elf] Error 1

EDIT: Embedding ROM(s) makes things even worse.

iss000 commented 3 months ago

Using 'MinSizeRel' fixes this issue: cmake .. -DCMAKE_BUILD_TYPE=MinSizeRel