Scripting engine

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Hi

I'm looking for a small scripting engine to embed on typically a Mega128
processor.  I'm only looking for something simple, maybe a simple C-type
interpreter that allows rudimantary constructs: loops, function calls, etc.

Here's what I want to do: we have an instrument based on an ATMega128, with
a LCD, keypad and MMC flash disk.  I would like to implement user defined
data capture capability.  The idea is to write some LCD, keypad and disk
API's that can be accessed from a user defined script, to implement the
actual functionality, e.g define screens with some data entry widgets,
buttons, etc and be able to controll the user input with the script, making
the data-entry procedure configurable.

Any pointers appreciated.

Pierre



Re: Scripting engine
says...
Quoted text here. Click to load it

Small maybe?

http://www.compuphase.com/small.htm

Robert

Re: Scripting engine
Quoted text here. Click to load it
etc.

Forth?

Wim



Re: Scripting engine

Quoted text here. Click to load it

I've never looked at Forth so maybe a few questions:

I use C for the main part of the firmware, so is there a Forth interpreter
written in C around.  Can I, from interpreted Forth, call back into already
compiled code (C) to provide the API's to the Forth script, passing data
to/from?

Pierre



Re: Scripting engine
Quoted text here. Click to load it
Mega128
C-type
Quoted text here. Click to load it
already
I am not a Forth user, but a quick Google showed various implementations for
the AVR, and in some you can do a  call to anywhere. Forth interpreters are
usually written in Forth with a small bit of assembler.

Wim



Re: Scripting engine
On Wed, 26 Jan 2005 12:25:17 +0200, "Pierre de Vos"

Quoted text here. Click to load it

Yes. Usually a Forth system in C is larger than a custom
Forth and the code it compiles is slower. Talk to me by
email if you like. We do lots of embedded Forth systems.

If you want to see what a big Forth system can do, see
   www.ccssa.com
who are in Cape Town.

Stephen

--
Stephen Pelc, snipped-for-privacy@INVALID.mpeltd.demon.co.uk
MicroProcessor Engineering Ltd - More Real, Less Time
We've slightly trimmed the long signature. Click to see the full one.
Re: Scripting engine

Quoted text here. Click to load it

Last time I looked into this, kforth seemed like a nicely built
kernel-embeddable FORTH interpreter/compiler.

- FChE

Re: Scripting engine
Quoted text here. Click to load it
Mega128
C-type
Quoted text here. Click to load it
calls, etc.
ATMega128, with
defined
disk
the
widgets,
making

Years ago (late 80s?) I played around with a very small c-like
interpreter from the c users group (they distributed it on a cd of
theirs). It was called something like tiny c (but I keep finding a
compiler by that name using google).

It would probably be perfect for what you are doing. It did functions,
loops, etc. I seem to recall it didn't support structures. It was
possible to add calls to existing libraries by extending the
interpreter. It was not real fast, it worked by parsing the text of
your script. It was very small, just a few hundred lines of c code.

If you can't find it somewhere on-line, drop me an email and I'll try
to dig up the cd. I still have it somewhere.

Mark


Re: Scripting engine
Quoted text here. Click to load it

I have not used it, and know nothing more about it, but:

http://eic.sourceforge.net/overview/

--
Nicholas O. Lindan, Cleveland, Ohio
Consulting Engineer:  Electronics; Informatics; Photonics.
We've slightly trimmed the long signature. Click to see the full one.
Re: Scripting engine
On Tue, 25 Jan 2005 20:56:06 +0200, "Pierre de Vos"

Quoted text here. Click to load it

Look at http://www.lua.org
Whether it is small enough to fit into an ATmega128 is a
different matter.

Regards
   Anton Erasmus



Site Timeline