Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
12 years ago

Nios II Hello World Small Build/Compilation Error

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.

2 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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!