473,396 Members | 2,068 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Python on an embedded platform

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
--
Derek
Jan 19 '06 #1
7 2039
Derek wrote:
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
Jan 19 '06 #2
On 2006-01-19, Derek <dmsubs@_NOSPAM_dsl.pipex.com> wrote:
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.

--
Grant Edwards grante Yow! I guess we can live
at on his POT FARM in HADES!!
visi.com
Jan 19 '06 #3
Derek wrote:
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
--
Derek


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

Jan 19 '06 #4
On 2006-01-19, Kay Schluehr <ka**********@gmx.net> wrote:
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).


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?

--
Grant Edwards grante Yow! I decided to be JOHN
at TRAVOLTA instead!!
visi.com
Jan 19 '06 #5
Grant Edwards <gr****@visi.com> writes:
JVMs are all around also for ARM processors.

With footprints in the 100K range?


For the JVM itself, that's no big deal (look at J2ME). JVM plus
Python runtime might be harder.
Jan 19 '06 #6

Grant Edwards wrote:
On 2006-01-19, Kay Schluehr <ka**********@gmx.net> wrote:
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).
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?


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


--
Grant Edwards grante Yow! I decided to be JOHN
at TRAVOLTA instead!!
visi.com


Jan 19 '06 #7
"Kay Schluehr" <ka**********@gmx.net> writes:
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/
Jan 19 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Brandon | last post by:
Java seems to have taken off as the platform and language of choice for many embedded devices. Would it be feasible for Python(perhaps running on an embedded version of Linux) to act in such a...
4
by: Dennis Clark | last post by:
Hi all, I've looked through the threads about embedded Python that are a year and a half old, and I thought that I'd ask this question now to see if anything has changed. Has anyone, or is...
0
by: Adam Smith | last post by:
Hello, I am attempting to compile postgresql from source with python enable. I have compiled & installed python on my machine according to the instruction, installation seems fine My Platform...
20
by: Jack | last post by:
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...
31
by: stéphane bard | last post by:
hello, my boss ask me to prefer windev to python. I have to argue - python work on multiple platform (linux, mac, windows) A good point but it didn't interest him. Because we want to choose a...
2
by: Carl J. Van Arsdall | last post by:
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...
10
by: CC | last post by:
Hi: I have considerable C and assembly language experience. However, these are mostly on embedded microcontrollers since I moved away from PC programming all the way back in 1988 :-O I wish...
9
by: Ed Leafe | last post by:
On Apr 21, 2008, at 1:05 PM, Daniel Fetchinson wrote: Don't most binary distributions include SQLite itself? I installed 2.5.2 on a new WinXP VM, and SQLite is working fine. -- Ed Leafe
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.