A Scheme Interpreter for ARM Microcontrollers:
ChangeLog for Version 00.0160
Changes from version 00.0152:
-
Five new boards are supported: SparkFun Logomatic V2.0 (NXP LPC2148),
Olimex LPC2478-STK (NXP LPC2478), TinCan Tools Hammer (Samsung S3C2410),
Luminary Micros LM3S6965 Evaluation Board (Stellaris LM3S6965) and
Luminary Micros Intelligent Display Module IDM-L35 (Stellaris LM3S1958).
-
The source code has been separated into one main file of essentially MCU
independent code (Armpit Scheme source) and MCU-specific header and source
files stored in subdirectories by MCU family (eg. LPC_2000, LPC_2800, ...).
This should help extension to new boards by modifying MCU specific files
only (though some aspect of the main source may also need update in some cases)
once MCU specific files are properly documented.
It also makes the main code easier to browse (as it skips over lengthy MCU specific
portions, replaced by appropriate .include statements).
-
The system has been updated to use carriage-return only as newline indicator.
This slightly simplifies the uart and usb interrupt service routines but mostly
makes uart transfer of inbound long expressions more stable and accurate
such that a long input expression can be pasted in a single chunk rather than
broken up into 4-line sub-chunks.
The issue of prior versions was that explicitly sending a linefeed after carriage
return (when a cr was received) produced overrun errors on inbound traffic.
Importantly, the new, carriage-return only approach in this version, requires
that the communcation program running on the PC host (minicom, hyperterminal)
be configured to add linefeeds to inbound traffic (eg. ctrl-a z a for minicom,
properties->settings->ASCII setup->ASCII receiving->append linefeeds to incoming
line ends for hyperterminal).
-
The bug whereby the #\space scheme character produced a TAB has been corrected.
-
A bug that prevented stable redefinition of the (current-input-port) and
(current-output-port) in snapshot 00.0152 (and possibly 00.0137 as well)
has been corrected.
-
Padding with nops has been added around .ltorg statements and around the
remaining MCU specific statements in the main source such that
built-in functions start at the same address on ARM7TDMI and ARM920T
MCUs when Armpit Scheme is assembled with stop-and-copy garbage collection
(default).
This is designed to make user-defined assembled install code vectors
transferrable (eg. produced on an ARM920T and then installed on an ARM7TDMI).
-
Four modifications were made to improve the performance of the system.
The address of the top of the current heap is now stored in the global
vector to help speed up memory allocation slightly.
Memory allocation functions (internal: cons, list, save) were shortened slightly
to take advantage of the fact that we know in advance that they allocate 8 bytes
and to take advantage of the current heaptop now stored on the global scheme vector.
Eval was modified such that, in the case of application, the input arguments
are evaluated directly if immediate, and faster than before if variables
(labels evlarg:, evlarb:, evlarc:).
Bindings within an environment frame are now sorted in ascending order of the bound
variable IDs and searched accordingly.
The first 2 modifications lead to a performance improvement of the order of 5%
(they affect, for example, the ARMSchembly version of the tak function discussed in
the Performance web page).
The entire set of modifications (and especially the 4th) leads to improvements
that can approach 100% (eg. in the performance of make-maze).
The reason is that where code execution involves many nested environments (eg.
in make-maze) a lot of time can be spent looking through all bindings in all frames
to find the current definition of a variable or function and the use of
sorted bindings speeds up this process, especially where a built-in variable/function
(with MCU-ID 0 at the top of the variable ID) is concerned.
-
Where appropriate, program examples are under development to
illustrate the application of the new features described above.
Last updated February 6, 2009
bioe-hubert-at-sourceforge.net