Myspace Codes - Cell Phones - Loans - Loans - Mortgages
Dumb question on embedded Linux - why? [Archive] - DunLUG - Dunedin Linux Users Group

View Full Version : Dumb question on embedded Linux - why?


Gary
14-10-2005, 06:36 AM
I am seeking to get into RTOS/embedded development for reasons of
career development and general geekiness. As I look through job
listings I see mostly references to embedded linux and VxWorks.

Embedded linux seems to be a natural destination if you are already
into Linux, which I'm not, but I did just install it and it does seem
quite useful for everyday activities (e.g. things not requiring
Windows-only sw). The development environment seems abundant although
I am used to Windows stuff like Visual C++ which holds your hand quite
a bit of the way, and does have a number of useful features. One thing
I thought would be relatively easy under Linux would be to set up a
wireless MP3 player that got its media from a different server.

However, for the purposes of getting some hands-on learning in RTOS,
I'm not sure that EL (for short) is a good first step. Too much is
already accomplished so it's just a matter of putting together some
drivers and trimming down the kernel to bare minimum for the purpose at
hand.

What I'm interested in doing for the sake of education is to write some
different apps, e.g. TCP/IP routing or just some do-nothing but pass
data around apps to see how various changes in task priority affect
interrupt latency, etc.

I also looked at freeRTOS which seems interesting, though I'd have to
get a development board which also offered a C-compiler tool. freeRTOS
is more of a bottom-up, start with the skeleton and write all of your
own drivers for hardware, if any are needed (with rare exception for
one supported NIC).

Ultimately my questions are:

If you are using EL currently, was that choice made to leverage
everything that's already been accomplished for "desktop" Linux or some
other reason?

What are the reasons to choose something other than EL?

Better responsiveness?
More powerful development environment available?
Smaller resource footprint?


I realize these are wide open questions. Btw I am running Firefox
under Damn Small Linux to write this, that's pretty incredible! No
hard disk required at all. Worked the first time I tried it too!

Thanks,

Gary

Drily Lit Raga
14-10-2005, 07:03 PM
Answered most of my questions by scouting the WWW for awhile.

Now I don't know why you would NOT want to use EL.

> What are the reasons to choose something other than EL?
>
> Better responsiveness?
> More powerful development environment available?
> Smaller resource footprint?

Grant Edwards
15-10-2005, 03:04 AM
On 2005-10-14, Drily Lit Raga <midicad2001@yahoo.com> wrote:
> Answered most of my questions by scouting the WWW for awhile.
>
> Now I don't know why you would NOT want to use EL.

1) Lack of resources? [It's pretty hard to run Linux with 40KB of
RAM and 132KB of ROM.]

2) It's not real-time?

3) You've got application code that was written for another
OS?

4) You don't want to deal with distributing source code for
GPL'ed software?

--
Grant Edwards grante Yow! Gibble, Gobble, we
at ACCEPT YOU...
visi.com

Drily Lit Raga
15-10-2005, 01:35 PM
Grant Edwards wrote:
> On 2005-10-14, Drily Lit Raga <midicad2001@yahoo.com> wrote:
> > Answered most of my questions by scouting the WWW for awhile.
> >
> > Now I don't know why you would NOT want to use EL.
>
> 1) Lack of resources? [It's pretty hard to run Linux with 40KB of
> RAM and 132KB of ROM.]

Seems like 2 MB ROM and 16 MB RAM practical minimum for EL from what
I've read?

> 2) It's not real-time?

It's not a pre-emptive multitasker? Or is there some other specific
aspect of it that prevents it from being RT (trying to learn all this)?

>
> 3) You've got application code that was written for another
> OS?

OK.

> 4) You don't want to deal with distributing source code for
> GPL'ed software?

Will look into what this means.

Thanks,

DLR

Grant Edwards
15-10-2005, 03:32 PM
On 2005-10-15, Drily Lit Raga <midicad2001@yahoo.com> wrote:

>> 1) Lack of resources? [It's pretty hard to run Linux with 40KB of
>> RAM and 132KB of ROM.]
>
> Seems like 2 MB ROM and 16 MB RAM practical minimum for EL from what
> I've read?

That sounds about right.

>> 2) It's not real-time?
>
> It's not a pre-emptive multitasker?

Yes.

> Or is there some other specific aspect of it that prevents it
> from being RT (trying to learn all this)?

Linux doesn't guarantee latencies between events and the
handling of those events. The latencies caused by the kernel
have been greatly improved recently, but it's still not
suitable for hard, low-latency, real-time projects.

--
Grant Edwards
grante@visi.com

Paul Taylor
15-10-2005, 10:39 PM
On Fri, 14 Oct 2005 17:35:17 -0700, Drily Lit Raga wrote:

>
>> 4) You don't want to deal with distributing source code for
>> GPL'ed software?
>
> Will look into what this means.
>

If you change any GPL software, or link to GPL libraries, you need to make
your software sources available to others. Also, if you write any device
drivers for custom hardware, you *might* have to make those sources
available too (this is a bit of a grey area).

If the above causes any problems, you could look at one of the BSDs,
for example NetBSD, which has been ported to a lot of different platforms.

HTH

Paul.

--
Remove _rem_ before replying by email.

Grant Edwards
16-10-2005, 09:25 AM
On 2005-10-15, Drily Lit Raga <midicad2001@yahoo.com> wrote:

>> >> 2) It's not real-time?
>>
>> Linux doesn't guarantee latencies between events and the
>> handling of those events. The latencies caused by the kernel
>> have been greatly improved recently, but it's still not
>> suitable for hard, low-latency, real-time projects.
>
> But it still gets used in "real-time" applications,

It's good enough for some applications, not for others. A
buddy of mine recently worked on a project where they had to
ditch Linux because the latencies were just too large. IIRC
they switched to LynxOS.Since it has a Linux-compatible ABI,
they could just re-compile the applications and go.

> being "good enough" because a modern-day CPU has plenty of raw
> speed.

That depends on the application and on the CPU.

> Of course if you want that on a PIC I don't know....

No, I wasn't expecting to run Linux on a PIC.

--
Grant Edwards grante Yow! ... A housewife
at is wearing a polypyrene
visi.com jumpsuit!!

giangiammy@gmail.com
19-10-2005, 08:37 PM
by the way there is a realtime extension for Linux:
I personally never tested it, but it stay in a layer
under the kernel.

bye
giammy
--
Gianluca Moro http://groups.yahoo.com/group/embeddeditalia/
ISCRIVITI alla Mailing List Italiana su LINUX EMBEDDED
giangiammy@yahoo.com Visit http://ilpinguino.altervista.org/