testing with the latest release of Vivado and MicroBlaze with the CmodA7-35t board give a compilation error in Vitis (equivalent to the new SDK of the old Vivado release), the strange things is that same design can not be fit here the compilation error:
'Invoking: MicroBlaze gcc linker'
mb-gcc -Wl,-T -Wl,../src/lscript.ld -LC:/Users/........./Xworkspace/blinkymb_wrapper/export/blinkymb_wrapper/sw/blinkymb_wrapper/standalone_microblaze_0/bsplib/lib -mlittle-endian -mcpu=v11.0 -mxl-soft-mul -Wl,--no-relax -Wl,--gc-sections -o "blinkymb.elf" ./src/bootloader.o ./src/platform.o ./src/srec.o -Wl,--start-group,-lxil,-lgcc,-lc,--end-group
c:/xilinx/vitis/2021.2/gnu/microblaze/nt/x86_64-oesdk-mingw32/usr/bin/microblaze-xilinx-elf/../../libexec/microblaze-xilinx-elf/gcc/microblaze-xilinx-elf/10.2.0/real-ld.exe: blinkymb.elf section `.text' will not fit in region `microblaze_0_local_memory_ilmb_bram_if_cntlr_Mem_microblaze_0_local_memory_dlmb_bram_if_cntlr_Mem' c:/xilinx/vitis/2021.2/gnu/microblaze/nt/x86_64-oesdk-mingw32/usr/bin/microblaze-xilinx-elf/../../libexec/microblaze-xilinx-elf/gcc/microblaze-xilinx-elf/10.2.0/real-ld.exe: region `microblaze_0_local_memory_ilmb_bram_if_cntlr_Mem_microblaze_0_local_memory_dlmb_bram_if_cntlr_Mem' overflowed by 8904 bytes
in bold the relevant part of the error message, I got an overflow error related the MicroBlaze memory occupation that is not enough (overflow of 8904 bytes), searching through the forum, from another thread, I can read this answer:
"basically you went out of space, your application does not fit into the provided BRAM memory. This is mostly because when you add the xil_printf function the implementation on the library of the printf needs some space too, when you do not use it it is optimized and removed by the linker. You need more memory on your device to fit all the drivers and BSP stuff (at least if you are using them)."
Then I've did a try avoiding the bootloader to be verbose, so into the bootloader.c source code I've commented the #define VERBOSE, the new compilation give again the memory error despite the overflow was reduced:
'Building target: blinkymb.elf'
'Invoking: MicroBlaze gcc linker'
mb-gcc -Wl,-T -Wl,../src/lscript.ld -LC:/Users/........../Xworkspace/blinkymb_wrapper/export/blinkymb_wrapper/sw/blinkymb_wrapper/standalone_microblaze_0/bsplib/lib -mlittle-endian -mcpu=v11.0 -mxl-soft-mul -Wl,--no-relax -Wl,--gc-sections -o "blinkymb.elf" ./src/bootloader.o ./src/platform.o ./src/srec.o -Wl,--start-group,-lxil,-lgcc,-lc,--end-group c:/xilinx/vitis/2021.2/gnu/microblaze/nt/x86_64-oesdk-mingw32/usr/bin/microblaze-xilinx-elf/../../libexec/microblaze-xilinx-elf/gcc/microblaze-xilinx-elf/10.2.0/real-ld.exe: blinkymb.elf section `.text' will not fit in region `microblaze_0_local_memory_ilmb_bram_if_cntlr_Mem_microblaze_0_local_memory_dlmb_bram_if_cntlr_Mem'
c:/xilinx/vitis/2021.2/gnu/microblaze/nt/x86_64-oesdk-mingw32/usr/bin/microblaze-xilinx-elf/../../libexec/microblaze-xilinx-elf/gcc/microblaze-xilinx-elf/10.2.0/real-ld.exe: region `microblaze_0_local_memory_ilmb_bram_if_cntlr_Mem_microblaze_0_local_memory_dlmb_bram_if_cntlr_Mem' overflowed by 4032 bytes
the overflow was reduced to 4032, but still present.
Someone have encoutered similar issue in porting from old Vivado to the latest release? Some hint?
Thanks and best regards.
F.
UPDATE FOR SOLUTION
Dear all,
after some searching and test I was able to compile properly the bootloader inside Vitis.
To achieve this of course we have to enlarge the BRAM into design, but this can not be achieved directly from the Block Design by working around the MicroBlaze local memory IP, you have instead to work on the Address Editor tab, looks below the final settings to do:
because the message was related the program size, we have to work on the /microblaze_0/Instruction (then the memory space reserved for the program code, about data I've changed it to 32k and I think is enough) so I've incremented this value up to 64K (with 32k the memory space error was still present).
After did this change you have to run again the bitstream generation (if you do not launch from this you got the [Board 49-67] error when you try to generate the bitstream, this is a know issue from the past Vivado release, but I confirm that is still present also into the latest Vivado 2021.2, but if you run the synthesis and implementation directly from the bitstream, so in one single passage, this warnings is not show), after the bitstream generation, if you look at the Block Manager and double click into the MicroBlaze local memory as shown below:
and then double click inside the lmb_bram block responsible for the local block memory generation inside the FPGA, you will see now that the Write Depth is increased accordling to the setting did into the Address Editor window!
After exporting the Hardware and then launch Vitis the compilation of the SREC bottoloader was fine, here below the message at the end of the bootloader compilation:
so the memory occupation overflow was not present! Yep!
Then the next step will be try to set up the classical "Hello World" application to test also the UART communication and put all into the SPI memory to have the program running at the power cycle.
PROPOSAL
Due to the Cmod A7-35t is a very nice evaluation board I kindly ask the Digilent team if is possible to update the oldest tutorial for the Cmod A7-35t and QSPI at the latest Vivado/Vitis release.
Question
BYTEMAN
Dear all,
testing with the latest release of Vivado and MicroBlaze with the CmodA7-35t board give a compilation error in Vitis (equivalent to the new SDK of the old Vivado release), the strange things is that same design can not be fit here the compilation error:
'Invoking: MicroBlaze gcc linker'
mb-gcc -Wl,-T -Wl,../src/lscript.ld -LC:/Users/........./Xworkspace/blinkymb_wrapper/export/blinkymb_wrapper/sw/blinkymb_wrapper/standalone_microblaze_0/bsplib/lib -mlittle-endian -mcpu=v11.0 -mxl-soft-mul -Wl,--no-relax -Wl,--gc-sections -o "blinkymb.elf" ./src/bootloader.o ./src/platform.o ./src/srec.o -Wl,--start-group,-lxil,-lgcc,-lc,--end-group
c:/xilinx/vitis/2021.2/gnu/microblaze/nt/x86_64-oesdk-mingw32/usr/bin/microblaze-xilinx-elf/../../libexec/microblaze-xilinx-elf/gcc/microblaze-xilinx-elf/10.2.0/real-ld.exe: blinkymb.elf section `.text' will not fit in region `microblaze_0_local_memory_ilmb_bram_if_cntlr_Mem_microblaze_0_local_memory_dlmb_bram_if_cntlr_Mem'
c:/xilinx/vitis/2021.2/gnu/microblaze/nt/x86_64-oesdk-mingw32/usr/bin/microblaze-xilinx-elf/../../libexec/microblaze-xilinx-elf/gcc/microblaze-xilinx-elf/10.2.0/real-ld.exe: region `microblaze_0_local_memory_ilmb_bram_if_cntlr_Mem_microblaze_0_local_memory_dlmb_bram_if_cntlr_Mem' overflowed by 8904 bytes
in bold the relevant part of the error message, I got an overflow error related the MicroBlaze memory occupation that is not enough (overflow of 8904 bytes), searching through the forum, from another thread, I can read this answer:
"basically you went out of space, your application does not fit into the provided BRAM memory. This is mostly because when you add the xil_printf function the implementation on the library of the printf needs some space too, when you do not use it it is optimized and removed by the linker. You need more memory on your device to fit all the drivers and BSP stuff (at least if you are using them)."
Then I've did a try avoiding the bootloader to be verbose, so into the bootloader.c source code I've commented the #define VERBOSE, the new compilation give again the memory error despite the overflow was reduced:
'Building target: blinkymb.elf'
'Invoking: MicroBlaze gcc linker'
mb-gcc -Wl,-T -Wl,../src/lscript.ld -LC:/Users/........../Xworkspace/blinkymb_wrapper/export/blinkymb_wrapper/sw/blinkymb_wrapper/standalone_microblaze_0/bsplib/lib -mlittle-endian -mcpu=v11.0 -mxl-soft-mul -Wl,--no-relax -Wl,--gc-sections -o "blinkymb.elf" ./src/bootloader.o ./src/platform.o ./src/srec.o -Wl,--start-group,-lxil,-lgcc,-lc,--end-group
c:/xilinx/vitis/2021.2/gnu/microblaze/nt/x86_64-oesdk-mingw32/usr/bin/microblaze-xilinx-elf/../../libexec/microblaze-xilinx-elf/gcc/microblaze-xilinx-elf/10.2.0/real-ld.exe: blinkymb.elf section `.text' will not fit in region `microblaze_0_local_memory_ilmb_bram_if_cntlr_Mem_microblaze_0_local_memory_dlmb_bram_if_cntlr_Mem'
c:/xilinx/vitis/2021.2/gnu/microblaze/nt/x86_64-oesdk-mingw32/usr/bin/microblaze-xilinx-elf/../../libexec/microblaze-xilinx-elf/gcc/microblaze-xilinx-elf/10.2.0/real-ld.exe: region `microblaze_0_local_memory_ilmb_bram_if_cntlr_Mem_microblaze_0_local_memory_dlmb_bram_if_cntlr_Mem' overflowed by 4032 bytes
the overflow was reduced to 4032, but still present.
Someone have encoutered similar issue in porting from old Vivado to the latest release? Some hint?
Thanks and best regards.
F.
UPDATE FOR SOLUTION
Dear all,
after some searching and test I was able to compile properly the bootloader inside Vitis.
To achieve this of course we have to enlarge the BRAM into design, but this can not be achieved directly from the Block Design by working around the MicroBlaze local memory IP, you have instead to work on the Address Editor tab, looks below the final settings to do:
because the message was related the program size, we have to work on the /microblaze_0/Instruction (then the memory space reserved for the program code, about data I've changed it to 32k and I think is enough) so I've incremented this value up to 64K (with 32k the memory space error was still present).
After did this change you have to run again the bitstream generation (if you do not launch from this you got the [Board 49-67] error when you try to generate the bitstream, this is a know issue from the past Vivado release, but I confirm that is still present also into the latest Vivado 2021.2, but if you run the synthesis and implementation directly from the bitstream, so in one single passage, this warnings is not show), after the bitstream generation, if you look at the Block Manager and double click into the MicroBlaze local memory as shown below:
and then double click inside the lmb_bram block responsible for the local block memory generation inside the FPGA, you will see now that the Write Depth is increased accordling to the setting did into the Address Editor window!
After exporting the Hardware and then launch Vitis the compilation of the SREC bottoloader was fine, here below the message at the end of the bootloader compilation:
...
'Building target: cmoda7qspi.elf'
'Invoking: MicroBlaze gcc linker'
mb-gcc -Wl,-T -Wl,../src/lscript.ld -LC:/Users/........../Xworkspace/design_1_wrapper/export/design_1_wrapper/sw/design_1_wrapper/standalone_microblaze_0/bsplib/lib -mlittle-endian -mcpu=v11.0 -mxl-soft-mul -Wl,--no-relax -Wl,--gc-sections -o "cmoda7qspi.elf" ./src/bootloader.o ./src/platform.o ./src/srec.o -Wl,--start-group,-lxil,-lgcc,-lc,--end-group
'Finished building target: cmoda7qspi.elf'
' '
'Invoking: MicroBlaze Print Size'
mb-size cmoda7qspi.elf |tee "cmoda7qspi.elf.size"
text data bss dec hex filename
14636 316 2096 17048 4298 cmoda7qspi.elf
'Finished building: cmoda7qspi.elf.size'
' '
14:33:22 Build Finished (took 2s.853ms)
so the memory occupation overflow was not present! Yep!
Then the next step will be try to set up the classical "Hello World" application to test also the UART communication and put all into the SPI memory to have the program running at the power cycle.
PROPOSAL
Due to the Cmod A7-35t is a very nice evaluation board I kindly ask the Digilent team if is possible to update the oldest tutorial for the Cmod A7-35t and QSPI at the latest Vivado/Vitis release.
Thanks for your time!!
Byteman
Edited by BYTEMANSOLUTION
Link to comment
Share on other sites
5 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now