53 lines
2.4 KiB
Plaintext
53 lines
2.4 KiB
Plaintext
From: wware-nospam at world.std.com (Will Ware)
|
|
Date: Sat, 10 Apr 1999 23:17:29 GMT
|
|
Subject: Python for embedded controllers?
|
|
References: <F9HuLr.KwL@world.std.com> <370de606.77891472@news.oh.verio.com> <F9xpnF.GFq.0.spadina@torfree.net>
|
|
Message-ID: <F9zy15.8F@world.std.com>
|
|
Content-Length: 2085
|
|
X-UID: 954
|
|
|
|
Ken McCracken (aa175 at torfree.net) wrote:
|
|
: Neal Bridges in Toronto, Ont. has been developing an onboard Forth
|
|
: compliler for the Pilot for a while. People seem pretty well enthused
|
|
: about it and it is making converts to the Forth language and reattracting
|
|
: programmers who had given up on Forth.
|
|
|
|
The two things I like about Forth are (1) the interactivity, and (2) the
|
|
interpreter is incredibly simple to understand; a bonehead like me can
|
|
code one up. I very much applaud the work Mike Gorlick's group is doing,
|
|
but it won't be interactive.
|
|
|
|
Well, it won't be interactive out of the box, but interactivity could
|
|
perhaps be added to it. An obvious approach is to implement a little
|
|
language in Python, compile the little langugage interpreter, and load
|
|
it onto the target board.
|
|
|
|
I can imagine another possible approach, but I'm not clever enough to
|
|
know if it's really feasible. Mike et al. are working on an implementation
|
|
of the Python virtual machine, to run on a target board. Maybe a Python
|
|
variant running on a host could have the parser and compiler without the
|
|
VM, and run all its compiled code on the target's VM.
|
|
|
|
The appeal of interactivity could be circumvented if one were to write
|
|
Python classes that adequately simulated the target board (and where,
|
|
necessary, the inputs and outputs from the real world). One could then
|
|
interact with a simulation on the host, and in a perfect world, the
|
|
code above the hardware simulation layer should port directly to the
|
|
target board. Mike's team's effort would apply directly to this
|
|
appproach.
|
|
|
|
If one went with this development model, it would make sense to maintain
|
|
the simulation and improve its accuracy as one developed one's application
|
|
code, and had to find and fix progressively subtler bugs. In the
|
|
aforementioned perfect world, there would be large open-source simulation
|
|
libraries for popular microcontrollers' on-chip
|
|
peripherals.
|
|
--
|
|
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
Will Ware email: wware[at]world[dot]std[dot]com
|
|
PGP fp (new key 07/15/97) 67683AE2 173FE781 A0D99636 0EAE6117
|
|
|
|
|
|
|
|
|