Re: Embedding and C API

95 views
Skip to first unread message

crc

unread,
Aug 12, 2013, 4:18:56 PM8/12/13
to retr...@googlegroups.com
The compiler can't be discarded; it's necessary to build the language up. But it's not a significant amount of code.

It is possible to build an image without all the additional vocabularies and extended functionality. In the upcoming (end of the month or before) 11.6 release, there is a "make tinyimage" that builds an image with just the kernel functionality. This is ~12k cells at present. Also added is a "make smallimage" that builds an image without the docstrings, yielding ~32k cells.

I have been sporadically working on a more modular image source that should be better suited to embedded targets, but this won't be finished for a few more months at least. See https://code.launchpad.net/~crc-x/retro-language/sketches for the branch where this work is taking place.

There is an Ngaro implementation with some API in vm/complete/libretro.c. An example using this is in extensions/lua-bindings/luaretro.c

-- crc

On Wednesday, April 3, 2013 11:11:40 AM UTC-4, r0pegig wrote:
Hello!

I'm new to Retro and Forth itself.

I want to embed Ngaro VM to the firmware of my device and to execute some data processing on it. The key feature is that scripts can be loaded dynamically without need to rebuild firmware. I.e. Ngaro will play a role of scripting environment.
Can I execute some Retro code from the rest of my firmware using C API?

On-board resources as usual are limited.
Is it possible not to embed compiler and other OS features like filesystem support to image file?

Thanks,
Oleg Kovalev
Reply all
Reply to author
Forward
0 new messages