Xilinx Vitis编译出错提示BRAM不够了

本文详细描述了如何在Vitis编译工程时遇到BRAM空间不足的问题,包括查看BRAM资源、修改Linker Script增大空间、重新编译并调整成功的过程。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1、错误现象:
在用Vitis编译工程文件的时候,提示application工程失败,BRAM空间不够了,生成xx.elf失败…

在这里插入图片描述
错误提示:
‘Invoking: MicroBlaze gcc linker’
mb-gcc -Wl,-T -Wl,…/src/lscript.ld -LE:/fpga_projects/test4/microblaze_test/export/microblaze_test/sw/microblaze_test/standalone_domain/bsplib/lib -mlittle-endian -mcpu=v11.0 -mxl-soft-mul -Wl,–no-relax -Wl,–gc-sections -o “bootloader.elf” ./src/bootloader.o ./src/platform.o ./src/srec.o -Wl,–start-group,-lxil,-lgcc,-lc,–end-group -Wl,–start-group,-lxilisf,-lxil,-lgcc,-lc,–end-group
c:/xilinx/vitis/2020.1/gnu/microblaze/nt/x86_64-oesdk-mingw32/usr/bin/microblaze-xilinx-elf/…/…/libexec/microblaze-xilinx-elf/gcc/microblaze-xilinx-elf/9.2.0/real-ld.exe: bootloader.elf section .stack' will not fit in regionmicroblaze_0_local_memory_ilmb_bram_if_cntlr_Mem_microblaze_0_local_memory_dlmb_bram_if_cntlr_Mem’
c:/xilinx/vitis/2020.1/gnu/microblaze/nt/x86_64-oesdk-mingw32/usr/bin/microblaze-xilinx-elf/…/…/libexec/microblaze-xilinx-elf/gcc/microblaze-xilinx-elf/9.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 744 bytes
collect2.exe: error: ld returned 1 exit status
‘Finished building target: bootloader.elf’

2、查看BRAM空间大小:
选择自己的application工程,然后右键,选择【Generate Linker Script】,点击进去;查看Vivado设置的BRAM空间大小;

在这里插入图片描述

在这里插入图片描述

这时,需要回到Vivado工程里面,在Block Design中将分配的BRAM空间大小改大。具体方法如下。

3、修改BRAM空间大小:
(1):进入IP INTEGRATOR的Address Edditor:
在这里插入图片描述

(2):修改BRAM空间大小,由16KB改为32KB(可以根据实际情况来修改空间大小),保存,然后重新生成bit文件。

在这里插入图片描述

(3):生成完bit文件后,重新导出xsa文件:
在这里插入图片描述

4、回到Vitis里面,重新导入xsa文件:

5、查看新导入的xsa文件里面的BRAM空间大小:
在这里插入图片描述

6、重新编译application工程,查看结果。
在这里插入图片描述

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值