473,702 Members | 2,453 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 22514
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*********@mvi sta.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*********@mv ista.comWrote:
To: <py*********@py thon.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 "applicatio n" 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

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

Similar topics

12
2976
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 dependent. You have to create macros , use casting and use indirect addressing (pointers) to read or write to memory mapped I/O. 2) C does not support real time interrupts. The interrupt vectoring is compiler dependent.
49
8939
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 algorithms/methods' reenterable/reentrant? * What is the cost to provide continuity of vectors in memory? Any other problems? -- Alex Vinokur
10
2513
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 to allocate the requested memory // We can do something relevant.
2
1306
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 infm reg this.can anyone guide me reg this? regards deivanayagam
27
2080
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 file being written to. Right now I've got it hard coded to the exact location where I want it, but that's not very portable. Is there some way in C to retrieve the absolute path name of the current directory, so that I could use that in my code...
14
1887
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 there that do 8-Bit arithmetic faster than 16-Bit arithmetic, and so on these systems char is faster than int. Standarising C in such a way that int is at least 16-Bit, has this made C both slow and memory-hungry for embedded systems programming?
20
2040
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: memset(data,-1,sizeof data)
30
4291
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
8738
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8652
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8979
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8939
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7829
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4412
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4667
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3104
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2399
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.