Scripting engine

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

Reply to
Pierre de Vos
Loading thread data ...

Small maybe?

formatting link

Robert

Reply to
R Adsett

etc.

Forth?

Wim

Reply to
Wim Ton

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

Reply to
Pierre de Vos

Mega128

C-type

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

Reply to
mhahn

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

formatting link

--
Nicholas O. Lindan, Cleveland, Ohio
Consulting Engineer:  Electronics; Informatics; Photonics.
 Click to see the full signature
Reply to
Nicholas O. Lindan

Mega128

C-type

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

Reply to
Wim Ton

Look at

formatting link
Whether it is small enough to fit into an ATmega128 is a different matter.

Regards Anton Erasmus

Reply to
Anton Erasmus

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

- FChE

Reply to
Frank Ch. Eigler

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

formatting link
who are in Cape Town.

Stephen

-- Stephen Pelc, snipped-for-privacy@INVALID.mpeltd.demon.co.uk MicroProcessor Engineering Ltd - More Real, Less Time

133 Hill Lane, Southampton SO15 5AF, England tel: +44 (0)23 8063 1441, fax: +44 (0)23 8033 9691 web:
formatting link
- free VFX Forth downloads
Reply to
Stephen Pelc

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.