Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++

BSP Build Error

Altera_Forum
Honored Contributor II
1,217 Views

I am trying to build a project in NIOS but it is giving "undefined reference to `tse_mac_device' " error. I am using NIOS II-Eclipse, Quartus 15.1 and Altera's DE2-115 board.  

 

The error occurred in two files generated by Eclipse: 

 

error in 'altera_avalon_tse' line 119 

tse_mac_device[tse_system_count].tse_mac_base = pmac->tse_mac_base + (i * 0x400); 

 

error in 'ins_tse_mac file' line 342 

if(tse_mac_device.tse_mac_base == p_driver_data->hw_mac_base_addr)  

psys_info = &tse_mac_device

 

Here is the error report from NIOS when I tried to build the project: 

 

 

20:02:08 **** Incremental Build of configuration Nios II for project OpenTOF **** 

make all  

Info: Building ../OpenTOF_bsp/ 

C:/altera_lite/15.1/nios2eds/bin/gnu/H-x86_64-mingw32/bin/make --no-print-directory -C ../OpenTOF_bsp/ 

[BSP build complete] 

Info: Linking OpenTOF.elf 

nios2-elf-g++ -T'../OpenTOF_bsp//linker.x' -msys-crt0='../OpenTOF_bsp//obj/HAL/src/crt0.o' -msys-lib=ucosii_bsp -L../OpenTOF_bsp/ -Wl,-Map=OpenTOF.map -O0 -g -Wall -mno-hw-div -mhw-mul -mno-hw-mulx -o OpenTOF.elf obj/default/OpenTOF_lib.o obj/default/main.o obj/default/network.o -lm -msys-lib=m 

../OpenTOF_bsp/\libucosii_bsp.a(ins_tse_mac.o): In function `altera_eth_tse_init': 

C:\Users\achoo\Desktop\OpenTOFv2.2\OpenTOFv2.2\Firmware\OpenTOF_bsp/drivers/src/iniche/ins_tse_mac.c:119: undefined reference to `tse_mac_device' 

C:\Users\achoo\Desktop\OpenTOFv2.2\OpenTOFv2.2\Firmware\OpenTOF_bsp/drivers/src/iniche/ins_tse_mac.c:119: undefined reference to `tse_mac_device' 

C:\Users\achoo\Desktop\OpenTOFv2.2\OpenTOFv2.2\Firmware\OpenTOF_bsp/drivers/src/iniche/ins_tse_mac.c:120: undefined reference to `tse_mac_device' 

C:\Users\achoo\Desktop\OpenTOFv2.2\OpenTOFv2.2\Firmware\OpenTOF_bsp/drivers/src/iniche/ins_tse_mac.c:120: undefined reference to `tse_mac_device' 

../OpenTOF_bsp/\libucosii_bsp.a(altera_avalon_tse.o): In function `alt_tse_system_add_sys': 

C:\Users\achoo\Desktop\OpenTOFv2.2\OpenTOFv2.2\Firmware\OpenTOF_bsp/drivers/src/altera_avalon_tse.c:342: undefined reference to `tse_mac_device' 

../OpenTOF_bsp/\libucosii_bsp.a(altera_avalon_tse.o):C:\Users\achoo\Desktop\OpenTOFv2.2\OpenTOFv2.2\Firmware\OpenTOF_bsp/drivers/src/altera_avalon_tse.c:342: more undefined references to `tse_mac_device' follow 

collect2.exe: error: ld returned 1 exit status 

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

 

 

20:02:09 Build Finished (took 1s.425ms)
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
447 Views

Review the Simple Socket Server example. tse_mac_device is a structure you define in your application project files.

0 Kudos
Altera_Forum
Honored Contributor II
447 Views

Have you searched for all Build.err and Build.log files under the 

PLATFORM directory and compared the contents of files of the same 

directories for (a) build from the original BSP versus (b) build from 

the cloned, failing BSP? Very often one of these log files will 

provide you with the clue that you need.
0 Kudos
Reply