Mon Mar 7 12:44:55 EST 2011

Staapl code on PIC18

Trivially compiling picstamp.fm, the file usb.f is missing.  I have no
idea where this went.

Last code doing something[1] (It works "a bit"..).

Todo: rewrite the whole .fm file into a Scheme module file.  No Forth
syntax for the driver.  This is going to take a while as the `load'
word is not supported in Scheme, and needs to be replaced with units.

The 2 words that need to be plugged in are:
  - fosc
  - baud

These are grabbed from the global context in monitor-serial-core.f and
then passed on as parameters to the lower level modules.

That seems to be a good idea: keep as much as possible in module form,
using lexical parameters, and use "integration units" to pass
parameters around.

Is there a problem with p18f2550.f ?

Currently it only includes p18f2550.f
It's probably simplest to start at that file.

Best would be something that can work directly from the header file.

EDIT: added staapl/pic18/genheader.ss to compile an INC file to a
scheme module.  This triggers a problem with units:

  - fix header file parsing DONE
  - fix low-level pic18 const dependenices (exercise for general unit problems)
  - fix p18f2550.f
  - fix monitor-serial-core.f

[1] entry://../staapl/20090215-181941
[2] entry://../staapl/20110307-191827