Python for Embedded Systems?

H J van Rooyen mail at microcorp.co.za
Sat Jul 15 05:06:02 EDT 2006


"Carl J. Van Arsdall" <cvanarsdall at mvista.com> Wrote:
To: <python-list at python.org>
Sent: Friday, July 14, 2006 7:36 PM
Subject: Re: Python for Embedded Systems?


| Grant Edwards wrote:
| > On 2006-07-14, Jack <nospam at invalid.com> wrote:
| >
| >> Is there a Python packaging that is specifically for
| >> embedded systems? ie, very small and configurable so the
| >> user gets to select what modules to install?
| >>
| >> For Linux-based embedded systems in particular?
| >>
| >> I'm thinking of running it on the Linksys's Linux-based open
| >> source router WRT54G. It has 4MB flash and 16MB RAM. I think
| >> another model has 16MB flash. Any possibilities of running
| >> Python on these systems?
| >>
| >
| > A few years back there was a "deeply embedded python" project,
| > but it's been dead for quite a while:
| >
| >  http://www.tucs.fi/magazin/output.php?ID=2000.N2.LilDeEmPy
| >
http://mail.python.org/pipermail/python-announce-list/1999-August/000157.html
| >
| >
| This raises a good question.  Is there a need for python to change
| somewhat to work better in an embedded profile?  Are there many people
| in the community interested in using python for embedded projects?
|

I for one would be interested in using it - if it can be made small enough - I
do not see it helping me with the nitty gritty of getting a system running on
bare metal, as the low level stuff in a small system is still best done in
assembler - but if there is a display and some sort of keyboard and you can
stick to character based stuff it will ease the "application" part of the work a
lot - its a natural for doing things like logging and simple transactions - and
if the hardware is strong enough to get IP running - then it will open up the
systems to be web based...

It will also be of use as you could prototype on a PC - emulators and simulators
of small systems are mostly a pain as it takes a lot of effort to describe the
actual hardware before these are useful...

"Small" in this context is an eight bit processor (like an 80x1 | x = 3, 5 )
with some tricks done in the hardware to expand the native 16 bit address space
to address say half a Meg of battery backed up static ram as data space, with
about 62k of code space available for the interpreter and the custom OS to run
in - (Harvard architecture, not von Neumann) - These processors have lately been
improved from the original about half a MIP to now give sustained performance of
better than 10 MIPS - So they may just be able to cripple along doing the
interpreting - But its *Quite a Challenge* to fit the interpreter in, though...

It is easily possible to expand these processor's address space to 24 bits -
that is 16 Meg - and it may be a better approach to make a 'Virtual Processor'
to run the python stuff - is there a definition for that sort of thing, akin to
Java's Virtual Processor? - It would be a better approach, as the resultant
higher level work would be more portable - to port to another class of
processor, you need merely write the Virtual Machine - in whatever Language
takes your fancy...

What is the minimum set of instructions and structure needed to make a
simplistic Python? - does anybody know?

Might just be a pipe dream...

- Hendrik van Rooyen





More information about the Python-list mailing list