Damn Small Linux (DSL) Forums

Damn Small Linux => DSL Ideas and Suggestions => Topic started by: mik3ca on July 22, 2019, 04:03:16 AM



Title: Linux in real-time (like DOS)
Post by: mik3ca on July 22, 2019, 04:03:16 AM
I made special hardware for a game that can connect to the computer via serial (rs232).

I have ordered a thin client PC that I will put Damn Small Linux on since it worked OK on my other PC.

Now I haven't quite figured it out, but there is software out there (RTlinux and RTAI) that is supposed to patch a kernel so that a priority kernel exists so that if one were to access a serial port with customized C code, all other actions stop until the critical section ends. This is what I need with my hardware because I tried my hardware with a normal slackware linux setup and I constantly got poor results at high baud rates.

Anyways, whats the best way to seemlessly install RTAI or RTlinux or anything else that would allow a serial port to be accessed real-time from within a compiled C program?

I am currently using the latest DSL distro at time of this writing.


Title: Re: Linux in real-time (like DOS)
Post by: CNK on July 23, 2019, 12:05:42 AM
Actually I've been looking into Real-Time linux lately for a similar type of project, but haven't really got any further than you with it yet.

Have a look at Linux CNC (http://linuxcnc.org/) for examples, though I admit that I haven't really dug very far into that yet. The DSL kernel is V. 2.4.31, so look for patches that are compatible with that. A newer development is PREEMPT_RT, but there may not be a release of that for the V. 2.4 kernel.

For the serial port though, I do wonder if the real-time performance is actually required. The signal timing is handled in hardware, so the only reason to need real-time is if the program has to react immediately to whatever is being sent over the serial port. If that's the case, then fine.


Powered by SMF 1.1.20 | SMF © 2013, Simple Machines