Embedded Systems Python?

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 anyone working with Python in an embedded Linux environment? Mine is NO where near as constrained as a cell phone since I've got plenty of memory to work with, I'm just running a Linux 2.4 kernel on an ARM9 platform.

Are there success stories for Python on embedded Linux systems today? The embedded Java JVM's seem to all be propriatary and have quite high license fees (don't mention Kaffe, it seems pretty fragile to me.)

I'm a bit of a newb when it comes to Python, is there anyone with experience compiling it on Linux platforms that can offer me pointers to try this out myself?

regards, DLC

--
============================================================================
* Dennis Clark         dlc@frii.com                www.techtoystoday.com   * 
 Click to see the full signature
Reply to
Dennis Clark
Loading thread data ...

While Python is a great language on PC's and servers, I think it's a bit heavy for most embedded systems - even powerful ones. It has a great deal of flexibility, but that comes at a cost - interpretation speed is a lot slower than running java byte code in a JVM. Often that doesn't matter too much, especially if you can make good use of features such as dicts and list comprehensions, whose implementation is extremely efficient, or if your time-consuming code is in C. But it's still a big system - expect to require a lot of disk/flash space, even when you've cut out the libraries you don't need.

That said, there was a project ("pippi", IIRC) porting python to Palm PDAs running 68k processors, and if you've got the space it is certainly possible.

Other options if you want to use java are to compile it to native code with gjc - I have no idea how well that works.

A very embedded-friendly scripting language is "lua" - I haven't used it (yet), but it might fit your needs and be easier to get running on a small system.

Reply to
David Brown

David Brown wrote: : Dennis Clark wrote: : > 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 anyone working with Python in an embedded Linux : > environment? Mine is NO where near as constrained as a cell phone since : > I've got plenty of memory to work with, I'm just running a Linux 2.4 kernel : > on an ARM9 platform. : > : > Are there success stories for Python on embedded Linux systems today? : > The embedded Java JVM's seem to all be propriatary and have quite high : > license fees (don't mention Kaffe, it seems pretty fragile to me.) : > : > I'm a bit of a newb when it comes to Python, is there anyone with experience : > compiling it on Linux platforms that can offer me pointers to try this out : > myself? : > : > regards, : > DLC

: While Python is a great language on PC's and servers, I think it's a bit : heavy for most embedded systems - even powerful ones. It has a great : deal of flexibility, but that comes at a cost - interpretation speed is : a lot slower than running java byte code in a JVM. Often that doesn't : matter too much, especially if you can make good use of features such as

Actually, the speed issue is a contendable one. I've heard exactly the opposite elsewhere. And Java has a VERY heavy footprint and usually some rather expensive licensing structures that precludes its use in a product that may only sell in the hundreds a year. Python on the other hand is completely Open System with no licensing structure at all. That latter is quite attractive.

: dicts and list comprehensions, whose implementation is extremely : efficient, or if your time-consuming code is in C. But it's still a big : system - expect to require a lot of disk/flash space, even when you've : cut out the libraries you don't need.

True, it can be tuned to leave out those bits that aren't needed.

: That said, there was a project ("pippi", IIRC) porting python to Palm : PDAs running 68k processors, and if you've got the space it is certainly : possible.

: Other options if you want to use java are to compile it to native code : with gjc - I have no idea how well that works.

: A very embedded-friendly scripting language is "lua" - I haven't used it : (yet), but it might fit your needs and be easier to get running on a : small system.

My system is not all that small, I'll have many MB's in the FLASH and several MB in system RAM, so I'm not going to be nearly as constrained as a cell phone, for instance.

As in all things, YMMV seems to be the usually consensus.

DLC

--
============================================================================
* Dennis Clark         dlc@frii.com                www.techtoystoday.com   * 
 Click to see the full signature
Reply to
Dennis Clark

I believe there are a few people using python not sure if its the embedded version or not with uclinux running on the microblaze core in xilinx fpgas.

Were a couple messages dated the 9/03/2004 and 27/05/2005 on the mailing list

The mailinglist for uclinux on microblaze

formatting link
formatting link

Alex

Reply to
Alex Gibson

experience

There's no doubt Python licensing is very nice, whereas Java's can be problematic. Footprint size will depend on the libraries installed - I don't know what is needed for Java, but Python needs a fair amount. As for speed comparisons, for some things Python is faster than Java (combined with pysco on an x86, it can be faster than C/C++ for some code), but the run-time binding and flexible types costs time. As with the library sizes, "small enough" and "fast enough" is relative to the hardware and task in hand - if your hardware is big enough and fast enough to let you write your application programs in Python, then all I can say is "lucky you!".

Reply to
David Brown

Are you doing linux things (file system/socket comm/etc) or embedded (hardware twiddling) things?

I've been playing with Quartus Forth on my palm, and it fits very nicely (as most forths do) in a cramped environment.

And unlike other compiled languages, the development can be done right onboard.

formatting link

Free evaluation, royalty free standalones if you buy it.

Rufus

Reply to
Rufus V. Smith

I'll be dealing with network sockets work, AND direct hardware access, it is after all, embedded... :). One problem that I've always had with Java is that it can't talk to hardware (serial port, bit twiddling, etc.) but Python has no such restrictions.

thanks, DLC

: Are you doing linux things (file system/socket comm/etc) : or embedded (hardware twiddling) things?

: I've been playing with Quartus Forth on my palm, and : it fits very nicely (as most forths do) in a cramped : environment.

: And unlike other compiled languages, the development : can be done right onboard.

:

formatting link

: Free evaluation, royalty free standalones if you buy it.

: Rufus

: > 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 anyone working with Python in an embedded Linux : > environment? Mine is NO where near as constrained as a cell phone since : > I've got plenty of memory to work with, I'm just running a Linux 2.4 : > kernel : > on an ARM9 platform. : >

: > Are there success stories for Python on embedded Linux systems today? : > The embedded Java JVM's seem to all be propriatary and have quite high : > license fees (don't mention Kaffe, it seems pretty fragile to me.) : >

: > I'm a bit of a newb when it comes to Python, is there anyone with : > experience : > compiling it on Linux platforms that can offer me pointers to try this out : > myself? : >

: > regards, : > DLC : > -- : > ============================================================================ : > * Dennis Clark snipped-for-privacy@frii.com

formatting link
: > * : > * "Programming and Customizing the OOPic Microcontroller" Mcgraw-Hill 2003 : > * : > ============================================================================

--
============================================================================
* Dennis Clark         dlc@frii.com                www.techtoystoday.com   * 
 Click to see the full signature
Reply to
Dennis Clark

It's available with a PPC 405GPr board,

formatting link

Only real disadvantage is that the compressed file system image zooms from

2 megs up to 13 megs when the full package is configured, so it boots up slower. You can use PTXdist to help configure the sytem.
Reply to
David Kinsell

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.