Just for the record, I was able to build/install/test the RTAI/Adeos
function for ts11 with the following set of files:
tskernel-2.4.26-ts11-src.tar.gz
rt-tskernel-2.4.26-tsX-adeos.patch
rtai-3.2-magma-src.tar.gz
The only issue was very small and involved the patch file,
specifically patching the Makefile. The version info and path to the
cross compiler toolchain didn't match my particular setup, but
examining the Makefile.rej file, as directed, pretty clearly pointed
that out.
Initial tests show RTAI works really well for my application, even
when the rest of Linux is loaded down and running at 0% idle.
Thanks again for the help.
jw
--- In "jywmpg" <> wrote:
>
> That was it! Thanks so much!
>
> I added '| O_SYNC' to the open call, and the crash went away.
>
> I uncommented out the remaining code (that actually toggled the DIO
> pins) and now things are working perfectly.
>
>
> Thanks again!
>
> jw
>
>
>
>
> --- In sjanisch@ wrote:
> >
> > I use 'O_RDWR | O_SYNC' in the open statement
> > e.g. int fd = open( "/dev/mem", O_RDWR | O_SYNC) ;
> >
> > Also try taking out the call to mlockall.. perhaps you have not
> properly
> > set up the required memory before the call.
> >
> >
> > wrote on 04/11/2007 09:37:28 AM:
> >
> > > Hi all,
> > >
> > > I am trying to use the RTAI extensions to control some DIO pins in a
> > > hard real time process. I am new to RTAI and running into a problem
> > > making this work
> > >
> > > I have built and installed the RTAI extensions and run the latency
> > > test from the test suite and get what appear to be reasonable
results.
> > >
> > > I am now trying to morph the latency test program into one that also
> > > toggles a DIO bit twice a second with as low a max latency as
> possible.
> > >
> > > I have updated the latency program to run at the desired
interval, but
> > > when I try to do the mmap to get access to the DIO pins, the system
> > > crashes. I do this prior to making the mlockall call:
> > >
> > >
> > > // get access to DIO pins
> > > int fd = open("/dev/mem", O_RDWR);
> > > unsigned char *start;
> > > start = mmap(0, getpagesize(), PROT_READ|PROT_WRITE, MAP_SHARED, fd,
> > > 0x80840000);
> > >
> > > <rt mailbox and task init calls>
> > >
> > > // lock all memory
> > > mlockall(MCL_CURRENT | MCL_FUTURE);
> > >
> > >
> > > Adding the above mmap call triggers the system crash. Removing it
> > > (and all subsequent references) allows the program to run on the
> > > desired schedule.
> > >
> > > Any idea that am I doing wrong?
> > >
> > > I need to figure out how to get more diagnostic info out before the
> > > crash, but thought I would ask in case the problem was obvious to
> > someone.
> > >
> > >
> > > Regards,
> > >
> > > jw
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > Yahoo! Groups Links
> > >
> > >
> > >
> >
>
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/
|