Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++

ISR in uClinux

Altera_Forum
Honored Contributor II
983 Views

Dear all, 

I am using uClinux 2.4. I have written driver module for timer interrupt.  

I want to do some work in the ISR connected to this interrupt.  

The interrupt is firing correcly and the ISR is also getting executed successfully.  

 

I called user function "myFun" in this ISR. The refernce of this fuction is as extern in the driver file. 

After doing make, error is displyed as "undefined refernce to myfun". 

 

Am I doing correctly? 

How ro resolve this issue? 

 

 

Vinod 

 

0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
263 Views

<div class='quotetop'>QUOTE (vinod @ Jul 3 2009, 01:17 PM) <{post_snapback}> (index.php?act=findpost&pid=23001)</div> 

--- Quote Start ---  

I am using uClinux 2.4.[/b] 

--- Quote End ---  

 

This old version is not supperted any more. You need to use a current distribution, as described in the uClinux NIOS Wiki: http://www.nioswiki.com/operatingsystems/uclinux (http://www.nioswiki.com/operatingsystems/uclinux) . 

<div class='quotetop'>QUOTE (vinod @ Jul 3 2009, 01:17 PM) <{post_snapback}> (index.php?act=findpost&pid=23001)</div> 

--- Quote Start ---  

I have written driver module for timer interrupt.[/b] 

--- Quote End ---  

 

Linux already uses a timer. Does your programmed hardware provide a second timer that you want to deal with in a separate ISR ?  

<div class='quotetop'>QUOTE (vinod @ Jul 3 2009, 01:17 PM) <{post_snapback}> (index.php?act=findpost&pid=23001)</div> 

--- Quote Start ---  

The interrupt is firing correcly and the ISR is also getting executed successfully.[/b] 

--- Quote End ---  

 

What do you mean by this ? Did you create a Kernel module that has in initialization function that uses the appropriate Kernel space API functions to make the ISR known to the Kernel ? How do you know that the ISR gets executed ? do you use a Kernel debugger to see this ? 

<div class='quotetop'>QUOTE (vinod @ Jul 3 2009, 01:17 PM) <{post_snapback}> (index.php?act=findpost&pid=23001)</div> 

--- Quote Start ---  

I called user function "myFun" in this ISR.[/b] 

--- Quote End ---  

 

What do you mean by this ? Of course you can call a function in an ISR (if it&#39;s approproately short), but same will be executed in Kernel space and not in user land and has to be done and compiled appropriately.  

<div class='quotetop'>QUOTE (vinod @ Jul 3 2009, 01:17 PM) <{post_snapback}> (index.php?act=findpost&pid=23001)</div> 

--- Quote Start ---  

The refernce of this fuction is as extern in the driver file.[/b] 

--- Quote End ---  

 

OK the make process for the Kernel module needs to know where to find the reference. AFAIK, this make process now is very different than how it was with Kernel 2.4. Anyway I don&#39;t know how to make a Kernel Module from multiple source files, but I suppose this is possible somehow. 

-Michael
0 Kudos
Reply