EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: Using Asyn driver or modifying devLib (or related programs) of EPICSbase for any knid of cPCI cards
From: Emmanuel Mayssat <[email protected]>
To: Jenny Chen <[email protected]>
Cc: [email protected]
Date: Fri, 05 Oct 2007 09:32:00 -0700
On Fri, 2007-10-05 at 10:41 +0800, Jenny Chen wrote:
> Dear Mark,
> > A Linux driver from a vendor would typically be started once when
> Linux is booted.
>  Let me rephrase this, if what I understand is right. 
> Before doing anything, the card driver should be implemented or
> supported by the vender (xxx.ko) then should be installed once when the
> system startup. 
> . when system boot, the BIOS sees the PCI cards, it assigns the PCI card
> address. 

To find the pci address in linux, use 'lspci' as root
The PCI address is function of the hardware location (pci slot) in the
computer. So if you fiddle with the hardware that address will change.

> . insmod xxx.ko should be called once during system boot (this might not
> be correct, maybe just only once then don't have to be called
> anymore)???

Look at 'modprobe' instead of 'insmod'. Modprobe loads driver
dependencies, while insmod doesn't.
Look at /etc/modprobe.conf or /etc/modules.conf that is where the driver
configuration goes. Use 'modprobe' in /etc/rc.d/rc.local

In the modprobe/modules file, 
1/ You can alias the driver
2/ You attach/configure the driver to the card. How this is done is
driver specific, but probably in a 'post-install' configuration
directive (this also is function of your linux distribution.

In rc.local
1/ you load the driver


Once booted, use 'lsmod' to see if your driver is loaded


> . EPICS asyn driver call open/read/write/ioctl/close to access that
> card, maybe different port for different card is better
> My I right?

Write a simple C/C++  program to access the data from the shell.
Then once this program works (once you understand the linux driver
library calls), then you can port it to asyn.

Asyn is great. I use it all the time. 
But if you are new to EPICS (and not so familiar with linux), you are
hitting 3 learning curves at once.

1. linux drivers and specific of that driver 
2. epics
3. asyn

That probably will make your task a challenging one.
Approach them one by one, not all at once.

Can you tell us, what you are trying to do, and which hardware you
intend to use?

Good luck,

--
Emmanuel


Replies:
Re: Using Asyn driver or modifying devLib (or related programs) of EPICSbase for any knid of cPCI cards Jukka Pietarinen
References:
RE: Using Asyn driver or modifying devLib (or related programs) of EPICSbase for any knid of cPCI cards Jenny Chen

Navigate by Date:
Prev: RE: Use of waveform records Mark Rivers
Next: RE: Use of waveform records Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: Using Asyn driver or modifying devLib (or related programs) of EPICSbase for any knid of cPCI cards Mark Rivers
Next: Re: Using Asyn driver or modifying devLib (or related programs) of EPICSbase for any knid of cPCI cards Jukka Pietarinen
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Nov 2011 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·