[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: [rtl] how to acces files
Kay-Ulrich Scholl (Assistent) wrote:
> Hi there
>
> I want to read a .rc-file while initializing my rt-module.
> In this file I want to say what other files are to read and send to
> microcontrollers via Can-Bus where they have to be executed.
>
> Since there is no way to read or write to files directly from inside
> rt, one can think of a demon-process which looks at reserved rt-fifos
> and communicate in that way with the rt-part to access the files in
> remote way.
> Has anybody just hacked such a thing (or similar) and can I then get the
> code?
>
Your request/proposal is for a general solution to the problem of accessing
the file system from the RT side. I have no off-the-shelf solution for you
but I'll tell you my experience.
I once had for my application a (small) calibration file which was read and
parsed by the front-end linux application and whose contents were put in
shared memory.
Now I find it more convenient to put my calibration data in a C file which
is compiled and linked with the RT task. I do first a partial link without
the calibration data, so that it is not necessary to have all the sources
to recalibrate.
In this way, I also avoid to parse the file: gcc does that for me.
Regards, Daniele
--- [rtl] ---
For more information on Real-Time Linux see:
http://rtlinux.cs.nmt.edu/