Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
810 Views

Problem with ins_tse_mac.c --> undefined reference to `io_write'

Hello, 

 

I am using Stratix IV GX dev kit with Quartus v15.0. I would like to run simple socket server example on the design that I created (which is a tweaked version of ethernet standard design example available on altera website). Everything seems to be fine until I get the following errors while building and compiling the simple socket server example in Nios 2 SBT: 

 

Info: Linking simple_socket_server_tse_1.elf 

 

 

nios2-elf-g++ -T'../simple_socket_server_tse_1_bsp//linker.x' -msys-crt0='../simple_socket_server_tse_1_bsp//obj/HAL/src/crt0.o' -msys-lib=ucosii_bsp -L../simple_socket_server_tse_1_bsp/ -Wl,-Map=simple_socket_server_tse_1.map -O0 -g -Wall -mno-hw-div -mhw-mul -mhw-mulx -o simple_socket_server_tse_1.elf obj/default/alt_error_handler.o obj/default/iniche_init.o obj/default/led.o obj/default/network_utilities.o obj/default/simple_socket_server.o obj/default/tse_my_system.o -lm -msys-lib=m 

 

 

../simple_socket_server_tse_1_bsp/\libucosii_bsp.a(ins_tse_mac.o): In function `tse_mac_init': 

E:\tse_tutorial\software\simple_socket_server_tse_1_bsp/drivers/src/iniche/ins_tse_mac.c:267:  

E:\tse_tutorial\software\simple_socket_server_tse_1_bsp/drivers/src/iniche/ins_tse_mac.c:273: undefined reference to `io_read' 

E:\tse_tutorial\software\simple_socket_server_tse_1_bsp/drivers/src/iniche/ins_tse_mac.c:283: undefined reference to `io_read' 

E:\tse_tutorial\software\simple_socket_server_tse_1_bsp/drivers/src/iniche/ins_tse_mac.c:310: undefined reference to `io_write' 

E:\tse_tutorial\software\simple_socket_server_tse_1_bsp/drivers/src/iniche/ins_tse_mac.c:311: undefined reference to `io_write' 

E:\tse_tutorial\software\simple_socket_server_tse_1_bsp/drivers/src/iniche/ins_tse_mac.c:315: undefined reference to `io_write' 

E:\tse_tutorial\software\simple_socket_server_tse_1_bsp/drivers/src/iniche/ins_tse_mac.c:316: undefined reference to `io_write' 

E:\tse_tutorial\software\simple_socket_server_tse_1_bsp/drivers/src/iniche/ins_tse_mac.c:317: undefined reference to `io_write' 

 

 

../simple_socket_server_tse_1_bsp/\libucosii_bsp.a(ins_tse_mac.o):E:\tse_tutorial\software\simple_socket_server_tse_1_bsp/drivers/src/iniche/ins_tse_mac.c:318: more undefined references to `io_write' follow 

 

 

../simple_socket_server_tse_1_bsp/\libucosii_bsp.a(ins_tse_mac.o): In function `tse_mac_init': 

E:\tse_tutorial\software\simple_socket_server_tse_1_bsp/drivers/src/iniche/ins_tse_mac.c:374: undefined reference to `io_read' 

E:\tse_tutorial\software\simple_socket_server_tse_1_bsp/drivers/src/iniche/ins_tse_mac.c:385: undefined reference to `io_write' 

E:\tse_tutorial\software\simple_socket_server_tse_1_bsp/drivers/src/iniche/ins_tse_mac.c:388: undefined reference to `io_read' 

E:\tse_tutorial\software\simple_socket_server_tse_1_bsp/drivers/src/iniche/ins_tse_mac.c:441: undefined reference to `io_write' 

E:\tse_tutorial\software\simple_socket_server_tse_1_bsp/drivers/src/iniche/ins_tse_mac.c:442: undefined reference to `io_read' 

E:\tse_tutorial\software\simple_socket_server_tse_1_bsp/drivers/src/iniche/ins_tse_mac.c:448: undefined reference to `io_write' 

E:\tse_tutorial\software\simple_socket_server_tse_1_bsp/drivers/src/iniche/ins_tse_mac.c:454: undefined reference to `io_write' 

 

 

../simple_socket_server_tse_1_bsp/\libucosii_bsp.a(ins_tse_mac.o): In function `tse_mac_raw_send': 

E:\tse_tutorial\software\simple_socket_server_tse_1_bsp/drivers/src/iniche/ins_tse_mac.c:558: undefined reference to `io_read' 

 

 

../simple_socket_server_tse_1_bsp/\libucosii_bsp.a(ins_tse_mac.o): In function `tse_mac_rcv': 

E:\tse_tutorial\software\simple_socket_server_tse_1_bsp/drivers/src/iniche/ins_tse_mac.c:800: undefined reference to `io_write' 

E:\tse_tutorial\software\simple_socket_server_tse_1_bsp/drivers/src/iniche/ins_tse_mac.c:814: undefined reference to `io_write' 

 

 

../simple_socket_server_tse_1_bsp/\libucosii_bsp.a(ins_tse_mac.o): In function `tse_mac_close': 

E:\tse_tutorial\software\simple_socket_server_tse_1_bsp/drivers/src/iniche/ins_tse_mac.c:859: undefined reference to `io_read' 

E:\tse_tutorial\software\simple_socket_server_tse_1_bsp/drivers/src/iniche/ins_tse_mac.c:860: undefined reference to `io_write' 

collect2.exe: error: ld returned 1 exit status 

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

 

 

I checked that these are all defined in altera_eth_tse_regs.h file (which is included in ins_tse_mac.c). Somehow the compiler is not able to identify them. All these files and functions are default ones. I did not change anything in them. 

Can some one help me out here?  

 

Thank you in advance.! 

0 Kudos
1 Reply
Altera_Forum
Honored Contributor I
47 Views

I was able to remove this error.  

 

It turns out, I had given wrong path to some# include files.