A Scheme Interpreter for ARM Microcontrollers: Bugs and "Features"
Known Bugs and "Features"
- General:
Versions: 00.0215, 00.0186 (corrected in 00.0225).
The most negative integer that the system can operate on is -536870912 however
this number cannot be typed directly at the REP
(the most negative integer for string->number is -536870911).
A workaround is to use (ash 1 29) to get -536870912.
- Float comparisons:
Versions: 00.0215, 00.0186 (corrected in 00.0225).
In snapshots 00.0215 and 00.0186, comparison of floats of differing signs
could produce erroneous results (eg. comparing -5. to 5. with less-than or greater-than).
This has been fixed in this snapshot (and was correct in snapshots prior to 00.0186).
- User-Compiled Code in FLASH:
Versions: 00.0215, 00.0225.
On MCUs with on-chip FLASH but no external FLASH, user-compiled code stored in a
"library" shares the FLASH space with user files.
The function (unpack ... -1) (formerly add-lib)
does not automatically relocate user files (crunch) and hence to have
as much "library" space as possible one may want to erase user files prior to
adding user-compiled code in FLASH (unless it is clear that no user file has
been erased and/or re-written several times which makes it slowly move up in FLASH space).
In release 00.0225, the (erase) function can be used to erase a single flash sector
and (fpgw) can be used to write a single page of flash so that it should be possible
to implement file crunching in user space.
- Library and list constants:
Versions: 00.0225.
In this snapshot it is possible to store list constants in library flash
(eg. (define a (unpack (pack '(1 2 3)) -1))) however the system's built-in
list? primitive does not recognize them as lists because they are outside
of RAM (eg. (list? a) -> #f).
The cause is in the macro inRAMp (in armpit_as_macros.s) that is used by list?
and also affects pair?, length and string->symbol when applied to constants
stored in flash.
These functions however do work properly with lists stored in heap and non-heap RAM
(eg. (define b (unpack (pack '(1 2 3)) 1)) ; (list? b) -> #t).
This bug was uncovered when storing the compile ARMSchembler in library FLASH
and the workaround in this case was to replace constants like
'(a 2 x) with (list 'a 2 'x).
- General:
Versions: 00.0225.
There are no other known new Bugs and "Features" (or corrected bugs)
in this release relative to release 00.0215.
Please consult the Change Log to identify other bugs that may have been fixed.
Last updated May 16, 2010
bioe-hubert-at-sourceforge.net