PYNQ: PYTHON PRODUCTIVITY FOR ZYNQ

PYNQ Microblaze project Make error

Hi everyone,

I’m trying to build the PMOD microblaze project using the process described here:
https://pynq.readthedocs.io/en/v2.4/overlay_design_methodology/pynq_microblaze_subsystem.html

In particular, the “Building the Projects” chapter.

The “make” command ends with the following error:

‘Building target: pmod_adc.elf’
‘Invoking: MicroBlaze gcc linker’
mb-gcc -Wl,-T -Wl,…/src/lscript.ld -L…/…/bsp_iop_pmod/iop_pmoda_mb/lib -mlittle-endian -mcpu=v10.0 -mxl-soft-mul -Wl,–no-relax -o “pmod_adc.elf” ./src/ad7991.o ./src/pmod_adc.o -Wl,–start-group,-lxil,-lgcc,-lc,–end-group
c:/xilinx/sdk/2018.3/gnu/microblaze/nt/bin/…/lib/gcc/microblaze-xilinx-elf/7.3.1/…/…/…/…/microblaze-xilinx-elf/bin/ld.exe: pmod_adc.elf section .rodata' will not fit in regioniop1_mb1_lmb_lmb_bram_if_cntlr’
c:/xilinx/sdk/2018.3/gnu/microblaze/nt/bin/…/lib/gcc/microblaze-xilinx-elf/7.3.1/…/…/…/…/microblaze-xilinx-elf/bin/ld.exe: region `iop1_mb1_lmb_lmb_bram_if_cntlr’ overflowed by 4088 bytes
collect2.exe: error: ld returned 1 exit status
make[1]: *** [makefile:38: pmod_adc.elf] Error 1
make[1]: Leaving directory ‘C:/Users/…/master/pynq/lib/pmod/pmod_adc/Debug’
make: *** [makefile:34: pmod_adc.bin] Error 2

I could not find how to extract the ELF file to check the reason for the overflow.

This is the default pynq-z1 project.

  • Has anybody faced this problem?
  • I’m surprised the default project can not fit in the BRAM. The BRAM size I have in Vivado is 64K, Should I increase it, or Is there any building option to modify to have a smaller elf file?

Thanks!

You don’t need to increase BRAM size.

Add the flag
-Wl,-gc-sections

to the mb-gcc call at:

This should be fixed in image v2.5.