473,398 Members | 2,368 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,398 software developers and data experts.

Python for Embedded Systems?

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?

If Python is not the best candidate for embedded systems because
of the size, what (scripting) language would you recommend?

PHP may fit but I don't quite like the language. Anything else?
Loa is small but it does not seem to be powerful enough.
Jul 14 '06 #1
20 22458
On 2006-07-14, Jack <no****@invalid.comwrote:
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.ph...0.N2.LilDeEmPy
http://mail.python.org/pipermail/pyt...st/000157.html

--
Grant Edwards grante Yow! My BIOLOGICAL ALARM
at CLOCK just went off... It
visi.com has noiseless DOZE FUNCTION
and full kitchen!!
Jul 14 '06 #2
Grant Edwards wrote:
On 2006-07-14, Jack <no****@invalid.comwrote:
>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.ph...0.N2.LilDeEmPy
http://mail.python.org/pipermail/pyt...st/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?

--

Carl J. Van Arsdall
cv*********@mvista.com
Build and Release
MontaVista Software

Jul 14 '06 #3
Jack wrote:
...snip...
If Python is not the best candidate for embedded systems because
of the size, what (scripting) language would you recommend?
TCL is fairly popular in the embedded space. Fairly small footprint.
The syntax is not to everyone's taste.

Jul 14 '06 #4
Here's an URL to a project that appears to be dated from 2004 -->
http://skreak.com/wrt54g/python.php.

Jack 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?

If Python is not the best candidate for embedded systems because
of the size, what (scripting) language would you recommend?

PHP may fit but I don't quite like the language. Anything else?
Loa is small but it does not seem to be powerful enough.
Jul 14 '06 #5
Jack 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?

If Python is not the best candidate for embedded systems because
of the size, what (scripting) language would you recommend?

PHP may fit but I don't quite like the language. Anything else?
Loa is small but it does not seem to be powerful enough.
python on palmos - latest version was below 1.5.2 - but is quite interesting
has small fotoprint, is fast and usefull
but isn't maintained by years

mak

Jul 14 '06 #6
Or Python on the Zaurus, which I used to develop a wifi CRM app on a
group of refurb Sharp Zaurus SL-5500 units. Here's a link to the Python
implementation on the Z --http://starship.python.net/~hinsen/Zaurus/.

Grzegorz Makarewicz wrote:
Jack 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?

If Python is not the best candidate for embedded systems because
of the size, what (scripting) language would you recommend?

PHP may fit but I don't quite like the language. Anything else?
Loa is small but it does not seem to be powerful enough.

python on palmos - latest version was below 1.5.2 - but is quite interesting
has small fotoprint, is fast and usefull
but isn't maintained by years

mak
Jul 14 '06 #7

"Carl J. Van Arsdall" <cv*********@mvista.comWrote:
To: <py*********@python.org>
Sent: Friday, July 14, 2006 7:36 PM
Subject: Re: Python for Embedded Systems?
| Grant Edwards wrote:
| On 2006-07-14, Jack <no****@invalid.comwrote:
| >
| >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.ph...0.N2.LilDeEmPy
| >
http://mail.python.org/pipermail/pyt...st/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
Jul 15 '06 #8
Jack a écrit :
If Python is not the best candidate for embedded systems because
of the size, what (scripting) language would you recommend?

PHP may fit but I don't quite like the language. Anything else?
Loa is small but it does not seem to be powerful enough.
You mean Lua ? Not powerful enough ? What do you mean by
that ? Lua is great IMHO. Sure it does not come with thousands
of libraries, but the language design is extremely clean, the
language constructs powerful and the footprint very small.

16kloc of C code can't hurt your embedded device can they ? ;)

Please tell us what kind of limitation you find in Lua ...

Cheers,

SB

Jul 15 '06 #9
"H J van Rooyen" <ma**@microcorp.co.zawrites:
What is the minimum set of instructions and structure needed to make a
simplistic Python? - does anybody know?
There have been lots of Lisps for the PDP-11 and comparable machines.
Python's runtime semantics are close enough to Lisp that you could
probably get something Python-like running in that kind of machine,
maybe not exactly Python. You would probably want to use small-Lisp
implementation techniques like BIBOP ("big bag of pages", Google for
it) memory organization. But I don't think any of those Lisps were
really all that useful. They were written mostly as toys.

SIOD was a well known very small Scheme interpreter that you might
like to play with:

http://en.wikipedia.org/wiki/SIOD
Jul 15 '06 #10
Paul Rubin <http://ph****@NOSPAM.invalidwrites:
SIOD was a well known very small Scheme interpreter that you might
like to play with:

http://en.wikipedia.org/wiki/SIOD
Here's another one that I like. I haven't actually used it but
studied it for possible integration in an embedded project that I
worked on but that got cancelled. It seems very good for this type of
thing. The runtime system is just 20k bytes or so:

http://hedgehog.oliotalo.fi/

Picolisp is also pretty neat but maybe not aimed the same way:

http://software-lab.de/down.html

Take the challenge: it is very impressive. Of course they tailored it
to Pico Lisp's capabilities, but you can see the challenge problem is
very sensible, and the Pico Lisp solution is much easier to get to
than a Python solution:

http://software-lab.de/succ.html
Jul 15 '06 #11
Jack 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?
You might also look at the gumstix embedded system, Linux running on an
ARM processor in an extremely small form factor.
(http://www.gumstix.net/)

And here is a page with a link to a gumstix Python binary:
http://cs.gmu.edu/~eclab/projects/ro...?n=Main.Python

I'm trying this out as soon as I get home!

-- Paul

Jul 15 '06 #12
Jack 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?
Here's another recently announced hobbyist microcontroller system:
http://makezine.com/controller/

Uses Atmel SAM7X processor, ARM7, 32-bit, 256K Flash, 64K SRAM, up to
55MHz.

On-board Ethernet and CAN (Controller Area Network - wireless)

Various I/O blocks and on-board sensors

~US$150

Start shipping Aug 1st.

No Python binary yet, but cross-platform tools are available. The guys
at this magazine could really get a jump with a Python build. Here's a
related site for this kit: www.uCHobby.com

-- Paul

Jul 15 '06 #13
>
On-board Ethernet and CAN (Controller Area Network - wireless)
Ooops, my bad - CAN is not wireless, it is a serial network
specifically for linking with other ucontroller boards.

I was thinking of the onboard Bluetooth of the gumstix boards.

-- Paul

Jul 15 '06 #14
Yes, I mean Lua, not Loa :-p

Lua is a nice language. Like you said, it doesn't have many libraries
as Python does. Plus, it's still evolving and the libraries are changing.
I found a few functions not working last time I tried kepler libraries.
It's good for embedded systems though because of its small footprint.
Extensions implemented in C makes it possible that the installation size
doesn't blow up when new stuff is added, like in Python.

But I still like Python better for its power and for the style of the
language
itself. And I was hoping to find a Python implementation that bears the
principles of Lua to make it suitable for embedded systems :)
>PHP may fit but I don't quite like the language. Anything else?
Loa is small but it does not seem to be powerful enough.
>You mean Lua ? Not powerful enough ? What do you mean by
that ? Lua is great IMHO. Sure it does not come with thousands
of libraries, but the language design is extremely clean, the
language constructs powerful and the footprint very small.
>16kloc of C code can't hurt your embedded device can they ? ;)
>Please tell us what kind of limitation you find in Lua ...
>Cheers,
>SB

Jul 15 '06 #15
In article <n7******************************@comcast.com>,
Jack <no****@invalid.comwrote:
>Yes, I mean Lua, not Loa :-p

Lua is a nice language. Like you said, it doesn't have many libraries
as Python does. Plus, it's still evolving and the libraries are changing.
I found a few functions not working last time I tried kepler libraries.
It's good for embedded systems though because of its small footprint.
Extensions implemented in C makes it possible that the installation size
doesn't blow up when new stuff is added, like in Python.

But I still like Python better for its power and for the style of the
language
itself. And I was hoping to find a Python implementation that bears the
principles of Lua to make it suitable for embedded systems :)
>>PHP may fit but I don't quite like the language. Anything else?
Loa is small but it does not seem to be powerful enough.
>>You mean Lua ? Not powerful enough ? What do you mean by
that ? Lua is great IMHO. Sure it does not come with thousands
of libraries, but the language design is extremely clean, the
language constructs powerful and the footprint very small.
>>16kloc of C code can't hurt your embedded device can they ? ;)
>>Please tell us what kind of limitation you find in Lua ...
Jul 15 '06 #16
In article <ma***************************************@python. org>,
Carl J. Van Arsdall <cv*********@mvista.comwrote:
Jul 15 '06 #17
cl****@lairds.us (Cameron Laird) writes:
Yes and no. Python could thrive for the next decade while
utterly surrendering the small-and-embedded domain to Forth,
Lua, Tcl, Scheme, and so on, so, no, there's no *need* for a
TinyPython. On the other hand, yes, there are at least several
of us with an interest and occasional opportunities for Python
in such applications.
I think we should see what happens with PyPy, which might be easier to
target at embedded platforms than CPython is. Main thing needed would
be a static compiler--I haven't followed PyPy enough to know if it
relies on having Psyco at runtime.
Jul 15 '06 #18
In article <7x************@ruckus.brouhaha.com>,
Paul Rubin <http://ph****@NOSPAM.invalidwrote:
>cl****@lairds.us (Cameron Laird) writes:
>Yes and no. Python could thrive for the next decade while
utterly surrendering the small-and-embedded domain to Forth,
Lua, Tcl, Scheme, and so on, so, no, there's no *need* for a
TinyPython. On the other hand, yes, there are at least several
of us with an interest and occasional opportunities for Python
in such applications.

I think we should see what happens with PyPy, which might be easier to
target at embedded platforms than CPython is. Main thing needed would
be a static compiler--I haven't followed PyPy enough to know if it
relies on having Psyco at runtime.
PyPy indeed presents exciting prospects.
Jul 16 '06 #19
Carl J. Van Arsdall wrote:
This raises a good question. Is there a need for python to change
somewhat to work better in an embedded profile?
When I asked this question last on python-dev, there was exactly one
response, and that was "yes, it needs to change".

The natural question then is "in what way?". To this, the answer
was surprising: It needs better support for cross-compilation.
Apparently, cross-compiling Python is very painful, and I guess
cross-compiling distutils-based packages even more so.

Contributions in that direction are welcome.

Regards,
Martin
Jul 16 '06 #20
JIs there a Python packaging that is specifically for
Jembedded systems? ie, very small and configurable so the
Juser gets to select what modules to install?

JFor Linux-based embedded systems in particular?

JI'm thinking of running it on the Linksys's Linux-based open
Jsource router WRT54G. It has 4MB flash and 16MB RAM. I think
Janother model has 16MB flash. Any possibilities of running
JPython on these systems?

You can run Python on the NSLU2 (Slug)
http://www.nslu2-linux.org/

sw packages:
http://www.nslu2-linux.org/wiki/Unslung/Packages

the best (IMHO) firmware:
http://www.nslu2-linux.org/wiki/DebianSlug/HomePage
Jul 17 '06 #21

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

Similar topics

12
by: Bill Hanna | last post by:
C is inadequate for embedded systems for the following reasons: 1) Direct addressing of memory mapped I/O is not supported simply and easily. You have to find work-arounds that are compiler...
49
by: Alex Vinokur | last post by:
Are there any restrictions/problems for use of C++ STL in development in embedded systems? In particular: * Does STL require too much space/memory? * Is 'implementation of STL...
10
by: Alex Vinokur | last post by:
The memory allocation issue in embedded systems is usually critical.. How can one manage that? 1. Via 'new' char* p = new (nothrow) char ; if (p == 0) { // He we know that it is impossible...
2
by: pdeivanayagam | last post by:
hi i hav cmpltd my engg.i am thnkng of doing an embedded systems. course...can i knw abt prospect of embedded systems?wut will be the oppurtunities available in embedded systems?i want some...
27
by: kvnsmnsn | last post by:
I've written a piece of code that interfaces with Postgres. It needs to write a Postgres table to disk, which it does with the <COPYcom- mand. That command requires the absolute file name of the...
14
by: Martin Wells | last post by:
When I want to store a number, I use "unsigned". I go with unsigned because it's the natural type for the system, and so should be the fastest. However, there are 8-Bit microcontrollers out...
20
by: =?ISO-8859-1?Q?Tom=E1s_=D3_h=C9ilidhe?= | last post by:
There are a few guarantees I exploit in the C Standard. For instance, I might write (unsigned)-1 to get the maximum value for an unsigned integer. Also, I might rely on things such as: ...
30
by: =?ISO-8859-1?Q?Tom=E1s_=D3_h=C9ilidhe?= | last post by:
Let's say we had a simple function for returning the amount of days in a month: unsigned DaysInMonth(unsigned const month) { switch (month) { case 8: case 3: case 5:
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.