uLisp on Teensy 4.0


#1

Hi,
I did a few tests running ulisp on the new Teensy-4.0 board (I already wrote about it in this forum a few days ago, see: Suggested boards for running uLisp?)
Using the arm port of ulisp-2.8, it was easy to get ulisp compiled and running (link below).

Here are a few specifications of the Teensy-4.0 board (took from the PJRC Teensy-4.0 page):

  • ARM Cortex-M7 at 600 MHz (can be changed from software) (NXP iMXRT1062 chip)
  • 1024K RAM (512K is tightly coupled)
  • 2048K Flash (64K reserved for recovery & EEPROM emulation)
  • USB, I2S, I2C, SPI, SDIO, Serial
  • Hardware floatingpoint unit, RTC
  • input current: ~ 100mA (from homepage, I didn’t do own measurements)
    and much more. See PJRC page for more details.

Here are some ulisp outputs:

uLisp 2.8 
51199> (defun tak (x y z)   
       (if (not (< y x))
            z
            (tak (tak (1- x) y z)
                 (tak (1- y) z x)
                 (tak (1- z) x y))))
tak               
51151> (tak 18 12 6)
7
51151> (for-millis () (tak 18 12 6))
419
51151> (for-millis () (princ (tak 18 12 6)))
7
420
51151> 

As you can see the board runs ulisp very fast ;-) (and I made no board-specific optimizations to ulisp!).

The board price is around $20 (I got mine from esp-tech (.de)).

I just did a few tests, some basic functions are untested (i2c, spi, probably many more) or missing (save-image, …), but I think most will work with small changes (defining pins, write to flash or eeprom etc.).

To use this board you’ll need the arduino-ide and the Teensyduino add-on. You can download my test-version of ulisp from my github page: https://github.com/Kaef/ulisp-teensy4, which uses a workspace-size of 48k lisp cells (for the output above I had a little bigger workspace-size).

Anyone interested?

Regards,
Kaef


uLisp on Teensy-4.1
#2

TOTALLY INTERESTED.

https://www.pjrc.com/teensy-4-0/

Looks awesome, but save-image MUST be somehow possible!


#3

Based on https://forum.pjrc.com/threads/57377-TEENSY-4-0-EEPROM-amp-RAM-Questions?highlight=teensy-4.0+write+flash the usable EEPROM size on Teensy-4.0 is only 1080 Bytes. EEPROM is emulated in flash memory, so wear leveling is used by the eeprom lib.
I don’t know if we can write to the flash memory directly, I think this would be a great solution because there are 2MB (minus program size) available.
Soldering and using an sd-card should be possible too, at least soldering it seems rather difficult (I think a adapter is needed).

Regards,
Kaef