> Hello,
> 
> I am working on a project in which I must use RTLinux as real time support to 
> implement a modem. I have already made a program working on "normal" linux 
> which simulates the process and now I must port it to RTLinux. I will use 
> dac/adc boards to get data in and out the pc. The modulator must periodically 
> generate some data, map it on some kind of signal symbols and write the simbols 
> in the dac channel. The demodulator must read the symbols from the adc channel 
> and invert the process. 
> 
> In the porting to RTlinux two questions arise:
> 
> 1)We must buy the dac/adc boards: What do I need for them to be able to work in 
> RTlinux? Can a Linux driver do? Or does the driver have to be specially 
> implemented for RTLinux? And if this is the case, do vendors provide that kind 
> of drivers? Are they easy to find by other means if they don`t? Does anyone 
> know about some specific board model which can work in RTlinux without many 
> problems?

There are vendors that provide RTLinux drivers - but generally writing a ad/da
driver for RTLinux is not a big deal if you get proper (and corect documentation from 
the vendor...) 
Concerning the special implementation of RTLinux drivers - they are structured 
completly different and generally will be simpler than Linux drivers. One of the 
concepts is to have a rtlinux module that just provides low level analog_get 
analog_put digital_get and config functions like chanel select etc. these low level 
functions generally will be a few inb/outb instructions and then are called by a 
rt_thread that does the processing or the comunictaion to the non-rt side. There is no 
need to implement read/write/select/mmap/open/releas methods for Linux - init module 
simply will register the device and put it into some sane state - the actual data 
sampling is then done with the low level functions from the rt-thread.

Concerning boards that should be easy to write drivers for you would need to specify a 
bit more details of what this board needs to provide, interrupt driven or polling how 
many chanels in what bit-width etc.

> 
> 2)In the porting of the c code: Will I have severe limitations in trying to put 
> my code into the kernel modules and the RTtasks?I mean, will I be able to use 
> in RTLinux all the functions I use in mi Linux made code? I have read that 
> functions like printf or some math functions canīt be called from a module. Why 
> is this? What kind of code do they execute for them not to be able to be called 
> from a module?

You can't use printf in your kernel module - you can print to the console thoughor to 
the kernels ring buffer.

There are no real limitations that you would not find in a normal linux kernel module 
- if you need floating point math in a module you need to folow the proceedure 
outlined in the example/fp/ directory - the modules will tend to be large as you need 
to statically link libm but other than that there are not fundamental limitations.

hofrat
-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
--
For more information on Real-Time Linux see:
http://www.rtlinux.org/

Reply via email to