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.
12409 Discussions

NIOS II HAL Device Driver example files couldn't build

Altera_Forum
Honored Contributor II
1,474 Views

Hey guys, 

 

Have you tried the NIOS II HAL Device Driver example on altera website which goes with application note 459?  

 

I simply followed the application note AN459 to build a NIOS II HAL device driver, but in step 15 on page 6 of AN459 the NIOS II command shell threw out error messages and couldn't build successfully.  

 

The error messages include "Interrupt not connected for sysclk_timer", "undefined reference to `__alt_invalid`" and "undefined reference to `alt_irq_register`". I also attached a screenshot of the command shell in this post. 

 

Any suggestion is appreciated. Thanks very much.
0 Kudos
5 Replies
Altera_Forum
Honored Contributor II
167 Views

Forgot to mention that the files I was using was downloaded directly from http://www.altera.com/support/examples/download/an459-design-files.zip, and I didn't make any change to the files.

Altera_Forum
Honored Contributor II
167 Views

All of the "alt_" files are in the HAL as far as I understand it. I know from my own recent frustrations that the "undefined reference" errors can result from using the "small C library" option in the BSP. 

 

The sysclk_timer thing I have no idea? Is that is a clock then the error makes no sense. If the component does something else, then maybe you need to specify the interrupt in Qsys/SOPC builder.
Altera_Forum
Honored Contributor II
167 Views

Now I found "Interrupt not connected for sysclk_timer" was the first error of all. But in Qsys the example file did connect the irq port of sysclk_timer to irq_input of another component called Vectored Interrupt Controller. And the tutorial didn't mention any change to that.... 

 

Can anyone provide a working version of device driver? ...
Altera_Forum
Honored Contributor II
167 Views

What version of the tools are you using? In 10.1 the vector interrupt controller caused BSP problems when it was used in Qsys. The document says you need version 11.0 SP1 or higher which I'm guessing is the first version with the fix. In a nutshell the association of the interrupt number was not being propagated into the system.h file correctly causing the driver to think it was disconnected even though it was really connected.

Altera_Forum
Honored Contributor II
167 Views

 

--- Quote Start ---  

What version of the tools are you using? In 10.1 the vector interrupt controller caused BSP problems when it was used in Qsys. The document says you need version 11.0 SP1 or higher which I'm guessing is the first version with the fix. In a nutshell the association of the interrupt number was not being propagated into the system.h file correctly causing the driver to think it was disconnected even though it was really connected. 

--- Quote End ---  

 

BadOmen, you are a genius !!! Thanks very very much!
Reply