eZ80 - correction [z80 vs Python thread]

J

Janusz U.

I have an idea that implements the Python interpreter for eZ80 as an
universal flexible language (like scripts) to support attached hardware.
What would it be shortest way to do it?
I think of course about C (Zilog has good support of own products...).
I wouldn't recommend this. The standard Python interpreter is quite hefty
(>700K dynamically linked), not to mention the standard libraries. Seeing
as Z80 has only 64K address space, I don't see a full implementation as
possible.

I know. Sorry, I didn't precise. I thought exactly about eZ80F91 - it's
based on Z80 but much more expanded... I will start on the module (and
deviloper kit) for that procesor. It would be independent platform for
tests software in the Python.
What you /could/ do would be to implement a (very) small subset of Python;
i.e. leave out generators, new-style class, list comprehensions, ability
to override built-in types, functions, and operators, and most of the
standard library, then you /might/ be able to fit a language with Pythonic
syntax in that address space.

I think to expand language by own library for Python - eg. control GPIO of
eZ80, read
Another issue would be speed. Z80s, though they've gotten faster over the
years, still only run at speeds on the order of 10MHz. You might be better
off writing a Z80 compiler for a Python-esque language -- this would save
both speed and memory.

speed 50MHz (or 20MHz in F92, F93...)
If you can pick a different chip, go with something like a StrongARM.
These have the power and address space necessary for Python. Plus, it's
been done before (Python runs beautifully on modern PDAs).

I have just bought the developer kit for eZ80 so I have limited way. I'd be
happy to run Python on eZ80 platform.

I'm waiting for the opinion.

The best regards
Janusz U.
 
P

Peter Hickman

Perhaps you could look at the pippy project which is python on a PDA. They will
have had to shrink python down, maybe you could use that as a starting point.
 
?

=?iso-8859-15?Q?Pierre-Fr=E9d=E9ric_Caillaud?=

Why not start from Stackless Python and thus have a multithreaded
language which is well suited to automata on your uc ?

Python won't do threads on your Z80 because it relies on the OS, and you
have no OS...
Stackless has threadlets which use little memory (you need that) !
 
J

Janusz U.

Why not start from Stackless Python and thus have a multithreaded
language which is well suited to automata on your uc ?

thanks, I'll try.
Python won't do threads on your Z80 because it relies on the OS, and you
have no OS...
Stackless has threadlets which use little memory (you need that) !

Yes, I think it maybe critical in final application.

I'll compare that. eZ80 has sometimes implemented OS like linux kernel but
I'm afraid I don't use it.

thx again
Janusz
 
P

Paul Rubin

Janusz U. said:
I have an idea that implements the Python interpreter for eZ80 as an
universal flexible language (like scripts) to support attached hardware.
What would it be shortest way to do it?
I think of course about C (Zilog has good support of own products...).

I think Python is too large a language for such a small processor.
Among embedded developers, FORTH is a favorite script language since
implementations can be extremely compact and efficient. There are
several Z80 implementations already existing. Programming in Forth is
pain compared to Python though, in my opinion.

To horrify Python and Forth fans simultaneously, I once implemented
Forth in Python, where every Forth word compiled to a Python function
closure. But on a Z80 you wouldn't do anything like that.
 
J

Janusz U.

I think Python is too large a language for such a small processor.

I know that Z80 or eZ80 aren't so powerfull like other 32-bit processors.
But eZ80 can have eg. 1MB flash memory and 512kB RAM (it has 16MB memory/IO
space!). Speed in my application isn't critical.
Among embedded developers, FORTH is a favorite script language since
implementations can be extremely compact and efficient. There are
several Z80 implementations already existing. Programming in Forth is
pain compared to Python though, in my opinion.
thx, but I think about future - compatibility... (Puthon supports a lot of
platforms)

Janusz
 
P

Peter Hansen

Janusz said:
I know that Z80 or eZ80 aren't so powerfull like other 32-bit processors.
But eZ80 can have eg. 1MB flash memory and 512kB RAM (it has 16MB memory/IO
space!). Speed in my application isn't critical.

One megabyte, eh? Python will _fill_ that up nicely. ;-)

(Actually, we were able to get a limited form down to a few hundred
kilobytes on an embedded device. Testing showed, however, that
even if speed wasn't critical, Python's speed _can_ be too slow
for certain older hardware and we gave it up. For reference, it
was a 33MHz 386-compatible processor...)

-Peter
 

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,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top