sodiumlb / loci-firmware

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

Current build is over RAM budget #6

Open seclorum opened 3 months ago

seclorum commented 3 months ago

A build attempt of loci-firmware/main produces a RAM over-budget build result:

/Applications/ArmGNUToolchain/13.3.rel1/arm-none-eabi/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld: loci-firmware.elf section.bss' will not fit in region RAM' /Applications/ArmGNUToolchain/13.3.rel1/arm-none-eabi/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld: region RAM overflowed /Applications/ArmGNUToolchain/13.3.rel1/arm-none-eabi/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld: section .stack1_dummy VMA [20040000,200407ff] overlaps section .bss VMA [2003b2e8,2004584f] /Applications/ArmGNUToolchain/13.3.rel1/arm-none-eabi/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld: regionRAM' overflowed by 22608 bytes collect2: error: ld returned 1 exit status m`

@sodiumlb Perhaps you can share the details for the release builds, how you build them - are there local hand-tweaks you do for a standard release build?

iss000 commented 3 months ago

I've opened and closed an issue with the same problem. Check here for easy solution: https://github.com/sodiumlb/loci-firmware/issues/4

sodiumlb commented 3 months ago

Initial support for running in XIP mode has now been pushed to branch feature/xip-execution-mode. Any time critical functions must be decorated with __not_in_flash() as execution from SPI flash does have a performance cost. I propose we keep the branch in parallel until we're happy with other stability challenges so we don't add more problems to the debug picture.

Debug build on this branch is currently at 25% RAM usage.

Memory region         Used Size  Region Size  %age Used
           FLASH:      188820 B        16 MB      1.13%
             RAM:       49128 B       192 KB     24.99%
       SCRATCH_X:          2 KB         4 KB     50.00%
       SCRATCH_Y:          0 GB         4 KB      0.00%
[100%] Built target loci-firmware