We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome,
Internet Explorer 11,
Safari. Thank you!
AR# 36807: 12.1 EDK - How do I reduce the size of my ELF file?
12.1 EDK - How do I reduce the size of my ELF file?
I am getting ELF Check errors when compiling my application. How do I reduce the size of my ELF file to fit in the internal BRAM?
Note:Not all applications can be stored in the internal BRAM. Some may not fit regardless of the following recommendations.
Here are some ideas on how the code size can be reduced:
Ensure that the source files in the project include only the files that are being used. This is because if you have files or functions that are not used but listed in the source files, they will each be individually compiled generating *.o files that will be compiled in your .ELF.
Turn on optimization in the compiler options.
Check the stack and heap size and try reducing it if possible. The minimum stack and heap space will have to be determined by trial and error. Note: Your code could cease to run if adequate stack/heap sizes are not available.
Use size optimized statements if possible. For example use xil_printf() or print() instead of printf().