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, Firefox, Internet Explorer 11, Safari. Thank you!

Showing results for 
Search instead for 
Did you mean: 
Registered: ‎08-05-2010

Trouble replicating an existing working MicroBlaze design.

I am an experienced Xilinx FPGA designer but have never designed with MicroBlaze.  I am currently working on a project where I have to modify existing MicroBlaze C/C++ code but I am having difficulty going through the build process error free.  My latest error is:

"Building target: FRAM_Main.elf

mb-gcc -o FRAM_Main.elf FRAM_Main.o atafs_basetemp_checker.o atafs_heaters.o atafs_mondac.o atafs_peltier.o atafs_selftest.o atafs_vcxo.o fram_logger.o kl_rave_shr_i16.o kl_trig_atan2_i16.o -lkl_library_mb_rt_debug -mno-xl-soft-mul -mxl-barrel-shift -mxl-pattern-compare -mcpu=v6.00.b -L../../microblaze_0_sw_platform/microblaze_0/lib -xl-mode-executable -L. -T../../../FRAM_Main/FRAMMain_linker_script.ld

/cygdrive/c/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze/3.4.1/../../../../microblaze/bin/ld.real:    cannot find -lkl_library_mb_rt_debug

collect2: ld returned 1 exit status

make: *** [FRAM_Main.elf] Error 1

Build complete for project FRAM_Main"


It appears the linker can not find a library.  I'm not sure whether the script is looking for the wrong library, looking in the wrong location, or is not creating the right library.  Any kind of help to resolve this problem would be greatly appreciated.



0 Kudos
3 Replies
Xilinx Employee
Xilinx Employee
Registered: ‎08-08-2007

Re: Trouble replicating an existing working MicroBlaze design.



You will need to track down that library as there is probably code in the project that depends on it.  If you are doing your s/w project inside of XPS, you can see the library settings by:


1. Right click on the s/w project in XPS and select set Compiler Options

2. Bring forward the Paths and Options tab


Your library setting should be there.  You can remove the setting and then re-compile to see if anything breaks.


0 Kudos
Registered: ‎08-05-2010

Re: Trouble replicating an existing working MicroBlaze design.

I was working in SDK.  I right clicked on the SW project name and selected Properties.  Under C/C++ Build I went to MicroBlaze C Linker/Libraries.  I deleted the library name and rebuilt.  It got past that error then encountered numerous "undefined references" and finally an "Error 1".


I have a library with a slightly different name: libkl_library_mb_rt_debug.  I tried inserting that name in the above Properties\C/C+ Build\MicroBlaze C Linker\Libraries and still got the error of "cannot find -llibkl_library_mb_rt_debug".

0 Kudos
Registered: ‎08-05-2010

Re: Trouble replicating an existing working MicroBlaze design.

Though my problem is resolved, I am puzzled as to why.  I am using ISE9.1.02/XPS9.1.02/XPS SDK9.1.01 and I was getting the library error compiling in SDK.  Without changing anything I compiled within XPS and it completed with no errors.  The missing library is listed within the compiler options but I can not find any library with that name but it compiles with no errors.


I can only guess that the software projects between XPS and XPS SDK were setup differently.  In searching through the settings and options, I don't see anything different between the 2.


0 Kudos