Hello again,
Thanks for the response, and sorry for the vagueness, we'll try to clarfiy what
we've been trying. I hope you'll have the patience to read what I've written.
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:
adc_openrelease.c:4:27: linux/jiffies.h: No such file or directory
make: *** [obj/adc_openrelease.o] Error 1
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.
--- In Jim Jackson <> wrote:
>
>
>
>
> On Tue, 11 Aug 2009, moonlightshard wrote:
>
> > Hi
> >
> > I'm trying to write a IRQ handler routine in C to catch a IRQ request
> > generated by an on board timer.
> >
> > It's my first time writting a IRQ handler, any suggestions to what i
> > should do?
>
> Do some more research?
>
> Be more specific about what platform and which kernel version you are
> using?
>
> Get the kernel source for the version you are using and see how the kernel
> handles the timer?
>
------------------------------------
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/
|