Nios® II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.

linker cannot find libhal_bsp

Honored Contributor I



I have an eclipse environment with a bsp project and an application project. 

My bsp project compiles normallly. So I have now a bsp library (libhal_bsp.a) that I want to link with the application project. 


Therefore I open the properties of my application project, go under the "NIOS II application path" tab, add the required directories as well as the library name: libhal_bsp. 


Now when I compile my application project, I get the following error: 

**** Build of configuration Nios II for project CMOScam **** make all Info: Building D:\alexis\CI\firmware.atr.CMOScam\dev\FPGA\CMOScam\software\CMOScam_bsp make --no-print-directory -C D:\alexis\CI\firmware.atr.CMOScam\dev\FPGA\CMOScam\software\CMOScam_bsp Info: Building ../CMOScam_bsp make --no-print-directory -C ../CMOScam_bsp Info: Linking CMOScam.elf nios2-elf-g++ -T'../CMOScam_bsp/linker.x' -msys-crt0='../CMOScam_bsp/obj/HAL/src/crt0.o' -msys-lib=hal_bsp -LD:\alexis\CI\firmware.atr.CMOScam\dev\FPGA\CMOScam\software\CMOScam_bsp -L../CMOScam_bsp -LD:\alexis\CI\firmware.atr.CMOScam\dev\FPGA\CMOScam\software\CMOScam_bsp -msmallc -msmallc -Wl, -O0 -g -Wall -EL -mno-hw-div -mhw-mul -mno-hw-mulx -EL -mno-hw-div -mhw-mul -mno-hw-mulx -o CMOScam.elf obj/CMOScam.o obj/IrDA_interface.o obj/accuLink.o obj/accuLink_cmd.o obj/commands.o obj/fifo.o obj/flash_utilities.o obj/framerates.o obj/markers_interface.o obj/motion_sensor_interface.o obj/sample_input.o obj/srec_utilities.o obj/system_module.o obj/version.o obj/wMarker_commands.o -lm -lm -llibhal_bsp c:/altera/11.0/nios2eds/bin/gnu/h-i686-mingw32/bin/../lib/gcc/nios2-elf/4.1.2/../../../../nios2-elf/bin/ld.exe: cannot find -llibhal_bsp collect2: ld returned 1 exit status make: *** Error 1I don't know why the linker cannot find the library .a file... 


thank you
0 Kudos
1 Reply
Honored Contributor I

I fixed my issue. 


In fact I had error during the compilation with the alt_ic_irq_enable() function. 


I thougth that there was a problem with the BSP library (linking problem). 


In fact, I was using legacy functions but the required define in the system.h was not used. 




I am migrating as project from Quartus 8 to Quartus 11.0 and therefore I have that kind of issues.