FVM Factory is an open source project. It offers Win32 tools supporting Forth Virtual Machine (FVM) development.
Using FVM Factory, you can add a Forth-like interpreter into your embedded application. The FVM instruction set can be easily customised. You can add/remove instructions as required, while the cross-compiler (named FVM Console) will keep track of that.
The created FVM is written in ANSI C language. Tokens or pre-compiled functions (scripts) can be invoked from C code.
FVM Factory creates 16-bit FVMs with indirect threading code. FVM bytecodes can be 1-byte, 2-bytes and 3-bytes long. Typically a compiled FVM occupies about 2K of program memory.
Currently FVM Factory does not have code specific to any particular microcontroller. Thus, it is suitable for any microcontroller.
Token compiler converts token's description file into a set of C source files. It creates appropriate C function declarations and their calls. If a declared C function exists in the repository std_tokens.c, token compiler copies its content from the repository into a source file. If source files already have C code, token compiler copies matched C functions into output files; that facilitates incremental development.
Edit your custom tokens (C functions) in the generated files as required.
Source files generated by the token compiler are combined with other source files in the Console directory. Then Dev-C++ compiles them into a Windows console application FVM_console.exe. It becomes a cross-compiler and a debugger for your custom FVM.
Write your FVM scripts, compile and debug them using FVM_console.exe. Script language is a simplified Forth. FVM_console.exe has extensive error checking and an embedded help system which is aware of your custom tokens. Cast compiled scripts into a C source file as a byte array FVM_code.c.
Combine FVM source files with your application and compile them.
Read more: FVM Factory overview (pdf ~120k)
Download FVM Factory from SourceForge