On 06/27/2011 03:39 AM, David Wiebe wrote:
> I'm trying to get an spi port on the beagleboard to work in realtime.
> I didn't know there were other ioctl's. I wrote a program with ioctl, 
> tested it to make sure it worked, which it did, then changed ioctl's to 
> rt_dev_ioctl's in hopes that doing so would enable real time behaviour. 
> The program with rt_dev_ioctl's did not run as desired(no spi). I guess 
> I can't simply change ioctl's with rt_dev_ioctl's to enable real time 
> functionality? Do I have to patch xenomai to enable spi or something?

Hi,

What you have to do is to write a driver for whatever SPI controller you
are using, using the RTDM API.

>> - which driver you have written/loaded to implement this ioctl
> I thought changing ioctl for rt_dev_ioctl was all that was required to 
> implement this device in realtime mode. This device is an spi port.

No.

>> - what you mean by "my program does not perform as it should", what is
>> the return value of this rt_dev_ioctl which is supposed to work?
>>
> I watch my oscilloscope for activity on the spi port. regular ioctl 
> worked, rt_dev_ioctl did not. Both programs ran but only one worked.

There are other ways to debug software than an oscilloscope. Looking at
the functions return values when they have one is a good start.

>>> #2. rtnet. I wrote a test snippet of code to test the ethernet part.
>>> Prepended the appropriate functions with rt_dev_ and same results as in #1.
>>>
>>> I assume that if something wasn't in the library I would get compiler
>>> errors and if the code running on the beagleboard  was bad, I would get
>>> run time errors. I have seen neither.
>> Again, what driver are you trying to use? What happens when you try and
>> configure it?
>>
> So I have to patch the ethernet driver in order for it to work? I though 
> that was taken care of when I patched the kernel with xenomai.

You do not have to patch anything. Again, what you lack is probably an
ethernet driver, or simply to load and configure the rtnet driver for
the hardware you have, exactly like you do with Linux.

If you are going to write drivers, I really suggest you read "Linux
device drivers", then read the RTDM skin documentation to understand the
RTDM API. Note that most of the time, you can "port" a Linux driver to
RTDM or Rtnet, there is even a guide on how to do so for network drivers
in rtnet sources.

-- 
                                                                Gilles.

_______________________________________________
Xenomai-help mailing list
Xenomai-help@gna.org
https://mail.gna.org/listinfo/xenomai-help

Reply via email to