Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase in BIOS+firmware size increase with latest LiteX revision #371

Closed
mithro opened this issue Feb 1, 2020 · 4 comments
Closed

Increase in BIOS+firmware size increase with latest LiteX revision #371

mithro opened this issue Feb 1, 2020 · 4 comments

Comments

@mithro
Copy link
Collaborator

mithro commented Feb 1, 2020

As of 3350d33 (see timvideos/litex-buildenv#314) - the LiteX-BuildEnv is showing a lot of failures see https://travis-ci.com/timvideos/litex-buildenv/builds/146976853

This seems to be a result of BIOS / firmware seeming to use a lot more SRAM. This seems to affect all of lm32, mor1kx and vexriscv configurations;

lm32 example

cp /home/travis/build/timvideos/litex-buildenv/third_party/litex/litex/soc/software/bios/boot-helper-lm32.S boot-helper-lm32.S
 CC       boot-helper-lm32.o
 LD       firmware.elf
lm32-elf-ld: firmware.elf section `.bss' will not fit in region `sram'
lm32-elf-ld: region `sram' overflowed by 10136 bytes

vexriscv example

https://travis-ci.com/timvideos/litex-buildenv/jobs/282427202

 CC       /home/travis/build/timvideos/litex-buildenv/build/arty_base_vexriscv/software/include/../..//software/firmware/version_data.o
 CC       /home/travis/build/timvideos/litex-buildenv/build/arty_base_vexriscv/software/include/../..//software/firmware/hdmi_in1.o
cp /home/travis/build/timvideos/litex-buildenv/third_party/litex/litex/soc/software/bios/boot-helper-vexriscv.S boot-helper-vexriscv.S
 CC       boot-helper-vexriscv.o
 LD       firmware.elf
riscv32-unknown-elf-ld: firmware.elf section `.bss' will not fit in region `sram'
riscv32-unknown-elf-ld: region `sram' overflowed by 10136 bytes
/home/travis/build/timvideos/litex-buildenv/firmware/Makefile:93: recipe for target 'firmware.elf' failed
make[1]: *** [firmware.elf] Error 1

mor1kx example

https://travis-ci.com/timvideos/litex-buildenv/jobs/282427196

 CC       boot.o
 LD       bios.elf
or1k-elf-ld: bios.elf section `.text' will not fit in region `rom'
or1k-elf-ld: region `rom' overflowed by 6424 bytes
/home/travis/build/timvideos/litex-buildenv/third_party/litex/litex/soc/software/bios/Makefile:27: recipe for target 'bios.elf' failed
make[1]: *** [bios.elf] Error 1
@mithro
Copy link
Collaborator Author

mithro commented Feb 3, 2020

The issue seems to actually be 83a7225 when combined with 7a05353 that causes this problem. The code in LiteX-BuildEnv does the following;

        if 'integrated_rom_size' not in kwargs:
            kwargs['integrated_rom_size']=0x8000
        if 'integrated_sram_size' not in kwargs:
            kwargs['integrated_sram_size']=0x8000

@enjoy-digital
Copy link
Owner

enjoy-digital commented Mar 4, 2020

@mithro, @mateusz-holenko: is it now resolved in litex-buildenv?

@mateusz-holenko
Copy link
Collaborator

I prepared a PR that fixes buildenv's platforms after bumping to the current LiteX: timvideos/litex-buildenv#348.

It reworks the way LiteX-BuildEnv configures integrated rom/sram size and it should solve the issue.

@enjoy-digital
Copy link
Owner

From the recent discussions, it seems to be related to the way the arguments are handled in litex-buildenv, so we can probably close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants