Python on an embedded platform

D

Derek

Hi,

I am looking to port Python to an embedded platform (an ARM7 device with
fairly limited memory, capable of running an RTOS, but not an OS, such as
Linux). I came across DePython from a few years ago, but it seems to have
died a death.

Does anybody have advice? I am looking for any tricks, features I can
disable, etc so I can get the python core to be a small as possible (<100k
would be good).

Thanks
 
?

=?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=

Derek said:
Does anybody have advice? I am looking for any tricks, features I can
disable, etc so I can get the python core to be a small as possible (<100k
would be good).

Please start with describing how far you got. What did you already do,
and how far did it get you?

My first recommendation is to disable all modules which you don't need...

Regards,
Martin
 
G

Grant Edwards

I am looking to port Python to an embedded platform (an ARM7
device with fairly limited memory, capable of running an RTOS,
but not an OS, such as Linux). I came across DePython from a
few years ago, but it seems to have died a death.

The other project you might want to take a look at is pippy:
http://pippy.sourceforge.net/. It's python 1.5.2 running on
PalmOS. The memory size is quite a bit less constrained that
the DePython project, but there might be some useful info.
Does anybody have advice? I am looking for any tricks,
features I can disable, etc so I can get the python core to be
a small as possible (<100k would be good).

At one point I was interested in doing something similar:
running Python on an ARM7 w/o virtual memory under eCos in
something on the order of 1MB. After looking at the DePython
and Pippy sites, I decided it was going to require more work
than I could justify.
 
K

Kay Schluehr

Derek said:
Hi,

I am looking to port Python to an embedded platform (an ARM7 device with
fairly limited memory, capable of running an RTOS, but not an OS, such as
Linux). I came across DePython from a few years ago, but it seems to have
died a death.

Does anybody have advice? I am looking for any tricks, features I can
disable, etc so I can get the python core to be a small as possible (<100k
would be good).

Thanks

Have you thought about using a JVM as the Python runtime? AFAIK the
PyPy team already uses a restricted subset of Python ( called RPython )
to translate type annotated RPython flowgraphs to several backends
including Java. Therefore it seems not necessary to write a new Jython
compiler or CPython runtime. JVMs are all around also for ARM
processors.

Kay
 
G

Grant Edwards

Have you thought about using a JVM as the Python runtime? AFAIK the
PyPy team already uses a restricted subset of Python ( called RPython )
to translate type annotated RPython flowgraphs to several backends
including Java. Therefore it seems not necessary to write a new Jython
compiler or CPython runtime. JVMs are all around also for ARM
processors.

With footprints in the 100K range?
 
K

Kay Schluehr

Grant said:
With footprints in the 100K range?

Yes, definitely. The smallest JVM I've seen was dedicated for an 8-Bit
AVR with 8 KByte EEPROM ( or was it Flash? ) and a 768 byte sized heap.
JVMs are also a common technology on SmartCards but those are not open
source.

Kay
 
P

Paul Rubin

Kay Schluehr said:
Yes, definitely. The smallest JVM I've seen was dedicated for an 8-Bit
AVR with 8 KByte EEPROM ( or was it Flash? ) and a 768 byte sized heap.

That sounds like Javacard, which is a subset of a JVM (e.g. a minimal
Javacard implementation doesn't need garbage collection). JVM's can
be quite small, but not THAT small.

Actually you might mean this:

http://www.harbaum.org/till/nanovm/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,139
Latest member
JamaalCald
Top