Is anyone using Python for embedded applications?

Hendrik van Rooyen mail at microcorp.co.za
Wed Dec 13 01:05:57 EST 2006


 "Carl J. Van Arsdall" <cvanarsdall at mvista.com> wrote:


> I'm aware of a couple python projects for embedded systems.  I am 
> currently considering using Python on an embedded platform to develop a 
> simple application as a personal project, mostly to see if it will 
> work.  I was wondering if anyone here was using python for anything of 
> that nature?  For those that are involved in these types of projects, 
> how does development in python differ for embedded projects versus a 
> non-embedded project?  Is there a community standard technique or style 
> for this type of development (i.e. heavy in OO design? commonly used 
> patterns?)  Are there any good tools to assist for this type of 
> development environment? 
> 
> Oh, and if anyone has opinions/facts on why python should not be used in 
> an embedded platform, I'd like to know that too.  I'm somewhat familiar 
> with pythons needs on a system, but there are a number of things I am 
> not aware of. 
> 
> Thanks to everyone for their input!
> 

It depends a *lot* on what is meant by "embedded" :

This definition seems to cover everything from:
    - a cut down PC in a non standard box, through
    - a processor in a Washing Machine, to
    - a bare PIC processor in a Burglar Alarm...

I think the main hassles are that you need something big enough
to run a reasonable OS in, and it must support being programmed in C,
(which most things do), and it must have some MegaBytes of RAM 
loose for the Python. (where more is merrier)

Trying to run this on say an AVR or 8031 with a 64k address space and
a scarcity of RAM, will, to say the least, be a bit of a challenge...

As far as the OS goes, Linux is probably the best bet, if you can get it to
fit in your hardware - It has been ported to ARM type processors from
various companies (Atmel springs to mind), and is free, which is a help
in a personal project.  You could of course also roll your own kernel, 
which will be good practice, as with a limited set of peripherals its not 
THAT hard to do, but its a bit far away from Python -   :- )

What display device are you going to use, or is it going to be a webserver
sitting on a power over ethernet link?

I haven't actually taken the plunge myself yet to put Python on any of the 
hardware we make, as it seems to add a lot of overhead to a simple device 
- but I come from the bottom up, as it were, and the idea is intriguing, 
as I in fact discovered Python because it is embedded in a GPS module 
we were evaluating for building into a device - so I will follow your 
progress with interest...

- Hendrik




More information about the Python-list mailing list