ts-7000
[Top] [All Lists]

Re: [ts-7000] Re: writting interrupt request routine

To:
Subject: Re: [ts-7000] Re: writting interrupt request routine
From: Jim Jackson <>
Date: Wed, 19 Aug 2009 21:02:06 +0100 (BST)
[don't top post]

On Wed, 19 Aug 2009, moonlightshard wrote:
> --- In  Jim Jackson <> wrote:
>> On Tue, 11 Aug 2009, moonlightshard wrote:
>>
>> Get the kernel source for the version you are using and see how the kernel
>> handles the timer?
>>
>
> We've been building our own ADC sampling program for the TS 7250.  Now 
> we've been refered to Phillip McCarley's program a number of times, but 
> in the past we didn't understand nearly enough about it to try and use 
> it.  Recently we've figured out more and have gotten a lot closer to 
> getting it to compile, but we still end up with one error:

Are you trying to write an IRQ handler in userspace?
If so, give up straight away. You handle IRQ in the kernel. Phil did it in 
a kernel module which is inserted into the kernel and runs in kernel
"space".

>
>
> adc_openrelease.c:4:27: linux/jiffies.h: No such file or directory
> make: *** [obj/adc_openrelease.o] Error 1

Try just commenting the include out and try recompiling. I've checked my 
source and it's commented out.

> It looks like all we're missing is a jiffies.h file, however we can't 
> find one for the 2.4 kernal online... do you have any suggestions?
>
>
> As I said, when we started our project we didn't understand how to make 
> McCarley's code run, so we opted to try and make our own program with C.  
> However, we've run into a problem now that we can't seem to quite understand.
>
> We know that one needs to use an interrupt request in order to get a stable 
> sample frequency and are trying to do so in our C program.  By refering to 
> Phillip McCarley's code we've been trying to utilize request_irq().  We've 
> tried to use the function exactly as McCarley did, with only making changes 
> to what the handler function does.  However, we found that we probably need 
> some of the header files he's included as we got errors not understanding our 
> references to request_irq(), SA_INTERRUPT, and struct pt_regs.
>
> So we tried including some of the header files that McCarley did and this is 
> a sample of the errors after trying to compile our code on Cygwin (our 
> program is called timer3.c at the moment):
>
>
> In file included from 
> /opt/crosstool/gcc-3.3.4-glibc-2.3.2/arm-unknown-linux-gnu/arm-unknown-linux-gnu/sys-include/linux/sched.h:14,
>                 from timer3.c:2:
> /opt/crosstool/gcc-3.3.4-glibc-2.3.2/arm-unknown-linux-gnu/arm-unknown-linux-gnu/sys-include/linux/timex.h:173:
>  error: field `time' has incomplete type
> In file included from 
> /opt/crosstool/gcc-3.3.4-glibc-2.3.2/arm-unknown-linux-gnu/arm-unknown-linux-gnu/sys-include/linux/sched.h:18,
>                 from timer3.c:2:
> /opt/crosstool/gcc-3.3.4-glibc-2.3.2/arm-unknown-linux-gnu/arm-unknown-linux-gnu/sys-include/asm/semaphore.h:18:
>  error: parse error before "wait_queue_head_t"
>
>
> The actual list is MUCH longer.  For some reason it reports a bunch of errors 
> from included files from the kernel.  Some errors reporting that things have 
> been declared multiple times, some reporting that things haven't been 
> declared, some even stating systax or parse errors existing in the included 
> files.
>
> Idealy we'd much rather fix our own program, as we have it set up to do what 
> we want, but the only thing left is achieving this steady sample rate.
>
> Thanks for your help.
>
>
>
>


------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ts-7000/join
    (Yahoo! ID required)

<*> To change settings via email:
     
    

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU