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++
Announcements
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.
12435 Discussions

Nios II Hello World Small Build/Compilation Error

Altera_Forum
Honored Contributor II
2,710 Views

Hello All, 

 

I am new to using the Nios II Embedded Processor and I am trying to create a new Nios II Application with the "Hello World Small" template just to learn and get familiarized with the tool. I am currently using Nios II 13.1 Eclipse SBT version. When I tried to build the project, I got the following errors: 

 

make: *** [NiosII_Test2_HelloWorldSmall2.elf] Error 1 NiosII_Test2_HelloWorldSmall2 C/C++ Problem 

undefined reference to `ALT_MODULE_CLASS_null_write' alt_putstr.c /NiosII_Test2_HelloWorldSmall2_bsp/HAL/src line 51 C/C++ Problem 

undefined reference to `null' alt_putstr.c /NiosII_Test2_HelloWorldSmall2_bsp/HAL/src line 51 C/C++ Problem 

 

C:\...\...\...\...\...\software\NiosII_Test2_HelloWorldSmall2_bsp/HAL/src/alt_putstr.c:51: undefined reference to `null' 

C:\...\...\...\...\...\software\NiosII_Test2_HelloWorldSmall2_bsp/HAL/src/alt_putstr.c:51: undefined reference to `null' 

C:\...\...\...\...\...\software\NiosII_Test2_HelloWorldSmall2_bsp/HAL/src/alt_putstr.c:51: undefined reference to `ALT_MODULE_CLASS_null_write' 

collect2.exe: error: ld returned 1 exit status 

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

 

In my BSP>HAL>src folder, it seems that the error is flagged under the "alt_putstr.c" file with this line of code marked: return ALT_DRIVER_WRITE(ALT_STDOUT_DEV, str, strlen(str), 0); 

 

I tried referring to http://www.alteraforum.com/forum/showthread.php?t=5956, but I couldn't find the location that was specified in this thread. 

 

Thanks for the help in advance.
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
790 Views

Have you defined stdout? It could cause the issue you're seeing.

Altera_Forum
Honored Contributor II
790 Views

Hello "slacker", 

 

I fixed the issue by going to the _bsp's file's Properties>"Nios II BSP Properties">BSP Editor...>Main Tab>Advanced>Uncheck "enable_lightweight_device_driver" 

 

Thanks!
Reply