A Scheme Interpreter for ARM Microcontrollers:
ChangeLog for Snapshot 00.0250
Changes from snapshot 00.0241:
This snapshot supports 2 new boards: the STM32-LCD from Olimex and the Overo Tide
from Gumstix (with Thumbo carrier board).
Write functions have been modified to no longer automatically write spaces (or spaces + back-spaces)
after tokens and expressions.
This corrects a bug whereby libraries could not be imported from within a flash file
without applying an ugly kludge when the file was written
(i.e. the library name had to be written character by character to avoid the space+back-space problem).
An important implication of this modification (coupled with limitations in the reader and parser)
is that, now, spaces (or newlines) have to be explictly written to file between top-level
expressions (eg. using (write-char #\space port) or (display #\space port) or (newline port))
so that the reader can properly identify the end of such expressions when they are re-obtained
from a file.
A last-minute modification was applied on June 18, 2011 to partially mitigate this.
FAT16 SD-card support has been integrated in the system.
Communication with the cards is initialized with (sd-init) after which the SDFT port-model can be used for opening input
and output files on such cards.
The list of boards assembled with this support is provided at the end of this Log.
Support is limited to cards of 2 GB or less, 8.3 file names, and only the top directory of the card.
The display of file names (and directories) obtained from (files SDFT) has been improved relative
to the library-based implementation in 00.0241.
System 0 and Linker library functions are now integrated in the system, including such functions
as register-copy-bit, register-copy-bit-field, defined?, link, unpack-to-lib, unpack-above-heap,
libs, erase-libs, config-pin, config-power, pin-set and pin-clear among others
(cf. common/armpit_scheme_library.s and mcu_specific/*/*_system_0.s).
R6RS functions related to bytevectors and bitwise operations have been moved to common/armpit_scheme_r6rs_library.s
and fixnum functions have been added there
(fx+, fx-, fx/, fx*, fx=?, fx?, fx?, fx=?, fx=?, fxmax, fxmin).
Fixnum functions are included only if the corresponding flag is set in armpit_00.0250.s.
The OMAP3530 version (TI-Beagle and Overo Tide) is now a Live-SD version that boots from
SD-card, runs from POP RAM, with the heap in POP RAM, and does not touch POP flash.
Installation instructions have been updated accordingly in the "How To: upload, ..." page.
USB Device functionality has been added to the TI-Beagle.
Floating point coprocessors are now enabled (and used) on the OMPA3530 boards and on the CS-EP9302.
The evaluator has been modified to use type-based jump tables and inlined cons/save operations
are now generally limited to this core area.
This modification freed up space for other functions while maintaining system performance.
Additionally, the dispatch on number of input arguments has been unrolled to improve performance.
Procedure tags (full tags beyond the low 8-bits) have been extended to contain possible
default startup values (for sv4) and common startup pre-functions.
The robustness of the parser has been slightly improved by checking for a valid bottom to the parse stack.
A bug in the alignment of semi-spaces in stop-and-copy gc has been fixed (cf. common/armpit_as_constants.s).
Landing pad sizes (eg. for the call macro) have been tightened on cortex-m3 MCUs.
The interrupt number used to identify Systick interrupts on cortex-m3 MCUs has been changed from
255 to 64.
On STM32x MCUs, the i2c subsystem has been improved to make it possible to read the accelerometer
of the STM32-LCD.
On the AT91SAM7 and STR711, buffers now start higher in RAM to provide additional space for
Additionally, the AT91SAM7 isr exit has been made identical to that of the STR711.
On the CS-EP9302 and STM32-H103, the boot override function is now performed
by the onboard user button rather than by a separate pin.
Miscellaneous other source code adjustments have been performed to
maintain or enhance the compact size, functionality and performance
of the system.
Where appropriate, program examples are under development to
illustrate the application of the new features described above.
Whether SD-card support is assembled into the distribution is listed below, along with connection
type (either: on-board connector, or SPI interface and CS pin) (note: on LPC-H2214/94, connect P0.7 to 3.3 Volts):
|Board || SD-card||Board || SD-card|
|SAM7_H256 ||SPI0, CS=PA.10||CS_E9302 ||on-board (spi)|
|EVB_LM3S1968 || ||EVB_LM3S6965 ||on-board (spi)|
|IDM_LM3S1958 ||on-board (spi)||LPC_P1343 || |
|Blueboard_1768 ||SPI0, CS=P0.16||LCDDemo_2158 || |
|LPC2478_STK ||on-board (mci)||LPC_H2103 || |
|LPC_H2148 || ||LPC_H2214 ||SPI0, CS=P0.20|
|LPC_H2294 ||SPI0, CS=P0.20||SFE_Logomatic1 ||on-board (spi)|
|SFE_Logomatic2 ||on-board (spi)||TINY_2106 || |
|TINY_2131 || ||TINY_2138 || |
|LPC_H2888 || ||TI_Beagle ||on-board (mci)|
|TCT_Hammer ||on-board (spi)||STM32_DT_Board || |
|STM32_H103 || SPI1, CS=PA.8||STR_H711 ||BSPI1, CS=P1.9|
|STR91X_M || ||STM32_LCD ||on-board (mci)|
|GMX_OVERO_TIDE ||on-board (mci)|
The read buffer sizes configured in mcu-specifc header files (variable name: RBF_size)
of this snapshot are given below.
Subtract 4 bytes from these values to identify the number of characters that the buffer can
hold (eg. 2KB means space for: 2048 - 4 = 2044 characters).
|Board ||Buffer Size||Board ||Buffer Size|
|SAM7_H256 || 2 KB||CS_E9302 || 64 KB|
|EVB_LM3S1968 || 2 KB||EVB_LM3S6965 || 2 KB|
|IDM_LM3S1958 || 2 KB||LPC_P1343 || 1 KB|
|Blueboard_1768 || 4 KB||LCDDemo_2158 || 4 KB|
|LPC2478_STK || 28 KB||LPC_H2103 || 1 KB|
|LPC_H2148 || 4 KB||LPC_H2214 ||16128 Bytes|
|LPC_H2294 ||16128 Bytes||SFE_Logomatic1 || 2 KB|
|SFE_Logomatic2 || 4 KB||TINY_2106 || 2 KB|
|TINY_2131 || 1 KB||TINY_2138 || 2 KB|
|LPC_H2888 || 128 KB||TI_Beagle || 64 KB|
|TCT_Hammer || 64 KB||STM32_DT_Board || 2 KB|
|STM32_H103 || 1536 Bytes||STR_H711 || 2 KB|
|STR91X_M || 2 KB||STM32_LCD || 2 KB|
|GMX_OVERO_TIDE || 64 KB|
The status of in-core I2C support for all MCUs is shown below
(this is the high-level support, including interrupts, needed for remote-execution oriented multi-processing).
For the TINY-2131, LPC-H2103 and LPC-P1343, this support is not assembled into the distribution.
|Board ||I2C Support||Board ||I2C Support|
|SAM7_H256 || yes||CS_E9302 || |
|EVB_LM3S1968 || ||EVB_LM3S6965 || |
|IDM_LM3S1958 || ||LPC_P1343 || yes|
|Blueboard_1768 || yes||LCDDemo_2158 || yes|
|LPC2478_STK || yes||LPC_H2103 || yes|
|LPC_H2148 || yes||LPC_H2214 || yes|
|LPC_H2294 || yes||SFE_Logomatic1 || yes|
|SFE_Logomatic2 || yes||TINY_2106 || yes|
|TINY_2131 || yes||TINY_2138 || yes|
|LPC_H2888 || ||TI_Beagle || |
|TCT_Hammer || ||STM32_DT_Board || yes|
|STM32_H103 || yes||STR_H711 || yes|
|STR91X_M || yes||STM32_LCD || yes|
|GMX_OVERO_TIDE || |
A last-minute modification was made to the reader/parser to mitigate the need for explicit
spaces (or newlines) to be inserted between top-level expressions in files (especially scheme code files)
at file writing time.
A new label named rdexp4:, and two branches to that label, were added in the file
This added code is used to consider the closing parenthesis and the double-quote as valid
ends for expressions read from file (i.e. for ports where a cr or lf is not needed to terminate
The intent is that if a file contains top-level expressions that end in a closing parenthesis
or double-quote and these top-level expressions are not separated by spaces or newlines, they
will still be read correctly. An example would be: (+ 1 2)(- 4 5)"wawa"(- 2 6)"zig""zag".
This is meant particularily as a convenience for cases where a file to be read contains
only lists, strings and other such explicitly-delimited expressions at its top-level
which should be the case for a code file, for example, where all top-level expressions
would be lists such as: (define lprt gio3)(config-pin 1 5 #b01) ....
Writing such code to file should not require the explicit addition of spaces or newlines between each
top-level expression (that would have been required in 00.0250 before the modification was applied).
The modification is not smart enough to identify an opening parenthesis,
semi-colon or double-quote (i.e. characters starting a new top-level
expression) as indicating the end (+ 1 char position) of the current expression.
Accordingly, it is not able to read: 1000(+ 3 4) or 1000"wawa" from file as 2 separate
expressions (1000 and (+ 3 4) or 1000 and "wawa").
In this case, after writing 1000 to file, and before writing (+ 3 4) or "wawa", one still has to write-char
or display a #\space or newline to the file such that 1000 is properly re-extractable as a separate expression.
No unforseen problematic issues are expected to arise from this code change but, just in case,
instructions on how to revert the modification
are provided in the source code, within common/armpit_scheme_read_write.s near label rdexp4:
(9 lines to comment-out, and 2 commented lines to swap),
and, for the LPC-1343, near the top of the LPC_13xx_usb.s file (.space directives).
Last updated June 18, 2011