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

NIOS II HAL Device Driver example files couldn't build

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 I
61 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 I
61 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 I
61 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 I
61 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 I
61 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!