[<<][staapl][>>][..]
Sun Jul 27 12:07:27 CEST 2008

offline compilation example

What is necessary is a script that compiles a PIC18F1220 application
from an input forth file, including a monitor and a proper boot
sequence.

This means:
  * read input arguments
  * create namespace with instantiated monitor
  * instantiate the script
  * add a simplified boot mechanism
  * dump out .hex and .dict

Added staapl/prj/pic18f1220-serial wich loads the 18f1220 defs and the
monitor code.

NEXT: need to solve the path issues with 'load'. But where? For
convenience i'm going to put it in the lexer module, but it should
really be somewhere else..

Yes. This is not trivial, since the path needs to be available at
compile time.

Currently:
 - lexer is free of paths
 - relative paths come from rpn-search-path parameter in parser-tx
 - pic18 path is encoded in parser-tx
 - that can move to forth-begin, where the param can be set

Problem: how to make the load path available at compile-time? More
specifically, how to set the parameter rpn-search-path? Simply setting
it at runtime doesn't work since it's a different instance. Maybe
using 'eval' helps?

Hmm... this is a can of worms. Maybe a way out is to add a form that
sets the load path, just like before. This works.

Remaining question: should this be a permanent state? Also, what with
modules? Requiring a module will already use load-relative i
think. YES.

So, the remaining problems are purely about interactive
'include'. This means it can probably be best solved there.

The remaining question is wether in parser-tx.ss, the search path
should be reset on each compilation.




[Reply][About]
[<<][staapl][>>][..]