A Scheme Interpreter for ARM Microcontrollers:
ChangeLog for Snapshot 00.0215
Changes from snapshot 00.0186:
-
One new board is supported: Olimex LPC-H2294.
It is similar to the LPC-H2214 except for FLASH handling as the board
uses Intel rather than Micron FLASH, and has more of it than the LPC-H2214.
-
On the Cortex-M3, a possible lock-up issue related to garbage collection
when new complex numbers and rationals are created has been fixed (in:
makrat, makcpx, int2rat and flt2cpx).
-
I2C communication has been repaired.
This allows remote evaluation of Scheme code on MCUs where the I2C interface
is implemented (cf. bottom of the *_init_io.s files).
-
The function defined? has been removed.
It can be implemented in user-space using catch and throw.
-
On SMALL MEMORY MCUs (LPC-H2103 and Tiny2131) the functions unlock, version and
eqv? are now included.
-
A few internal primitives (hooks) are exported to user-space to support
compiled code production and execution:
_alo, _cns, _apl, _err, _gc, _dfv, _sav and _bnc (zmaloc, cons, apply, throw, gc,
define-a-variable, save and binding-check/lookup-a-variable).
-
A new data type, compiled-procedure, has been added for compiled Scheme functions.
Compiled Scheme code is ARM or Thumb-2 machine code produced from
Scheme code by an appropriate compiler, assembler and linker.
Compiled Scheme functions consist of a header stored on the heap that
holds the closure's environment and input argument list along with a
pointer to compiled Scheme code stored above the heap or in FLASH.
-
Two new functions, add-lib and lib-erase, have been added to allow
compiled Scheme code to be stored in on-chip FLASH (for MCUs that have
on-chip FLASH space), from the top of this FLASH, down.
This compiled code is executed on startup before loading the "boot" file
and its execution is overriden if "boot" file loading is overriden.
The global vector (glv) has been extended to store information on
where this compiled code starts in on-chip FLASH and where user-file space ends
(if this space is shared).
-
New assembly switches are provided in the source code such that the user
can balance code size and performance at assembly time.
For most MCUs, the switches make it possible to:
1) inline save and cons operations for a modest speedup;
2) use balanced binary trees to store environments, for access speedup;
3) use the macro implementation of let, let*, letrec, and, or ...
which is necessary to produce compiled code on-chip (for MCUs with
sufficient RAM to run the Scheme compiler and ARMSchembly assembler)
but produces a slight performance hit;
4) store the object array (obarray) above the heap which speeds up garbage
collection and reduces heap use;
5) exclude the I2C subsystem, and;
6) exclude the reader and writer (read, parse, write, display ...).
Most of these switches should be turned off on SMALL MEMORY MCUs (LPC-H2103 and Tiny2131)
where a separate set of switches allows inclusion of either the I2C subsystem,
complex numbers, macros or taylor-series math functions.
-
The READBUFFER size has been updated to 1KB on SMALL MEMORY MCUs (LPC-H2103 and Tiny2131),
2KB on other MCUs without external RAM and 14KB or greater on MCUs with external RAM.
-
On the LPC-H2888, CS-EP9302, TCT-Hammer and TI-beagle the startup code
is now stored in a 1KB area (vs 4KB in 00.0186) such that the total
assembled code size of Armpit Scheme with any choice of assembly switches
remains below 64KB on all MCUs.
-
fillnops Used for alignment in 00.0186 have been removed.
Code assembled or compiled on an external device should now be linked
on the target (using a linker program) prior to installing it on the running
system (via (install ...)).
-
#t, #f, nan and inf are no longer variables.
They still exist but are not values bound to built-in variables as in prior versions
(eg. use (/ 1 0) to get inf, rather than typing: inf).
-
The assembly source code contains new macros (bcons, lcons, llcons) corresponding
to some common operations.
Code formerly implemented as save2 or save3 is re-implemented in terms of these new macros
or in terms of new allocation functions cons2 and cons3.
-
Other miscellaneous source code adjustments have been performed.
For example, internal functions setipr, setopr and getprt have been
made shorter via code re-use.
-
Where appropriate, program examples are under development to
illustrate the application of the new features described above.
Last updated December 12, 2009
bioe-hubert-at-sourceforge.net