A Scheme Interpreter for ARM Microcontrollers: Bugs and "Features"
Known Bugs and "Features"
- First Use:
Versions: 00.0241.
On MCUs supporting flash libraries, it may be necessary to erase all library
flash on first use after this snapshot has been installed (before adding
new libraries to the system). This can be done with the command (erase -536870912).
If the system was used before, with a previous version of ArmPit Scheme, it may
also be necessary to erase all file flash, with: (erase) if those files encroached
into the top of the library space (for systems where files and libraries share a
single flash space).
- Erasing Flash Libraries:
Versions: 00.0241.
When erasing flash libraries using (erase -1), (erase -2) ... (erase -536870912) on a
running system (on MCUs supporting such libraries), it is recommended
to first de-import all imported libraries by using: (import). The remaining (non-erased)
libraries can then be re-imported, preferrably after a system reset.
- Unpacking to FLASH:
Versions: 00.0225 (corrected in 00.0241).
On MCUs supporting unpacking objects to FLASH, if the unpacked size of the object is exactly
equal to the flash page size (typically 256 or 512 bytes), nothing is written.
- User-Compiled Code in FLASH:
Versions: 00.0215, 00.0225 (corrected in 00.0241).
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 (corrected in 00.0241).
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.0241.
There are no other known new Bugs and "Features" (or corrected bugs)
in this release relative to release 00.0225.
Please consult the Change Log to identify other bugs that may have been fixed.
Last updated January 13, 2011
bioe-hubert-at-sourceforge.net