T-Deck cannot read some functions from serial


#1

Hello,
I’ve come across this interesting bug. I’ve got two function definitions which differ in only one space. One works, the other gets stuck and the device needs to be reset.

It is T-Deck uLisp4.4e release 5

; not working
(defun clear (&optional j) (let ((c (if j #xFF 0))) (cmd CASET 0 yoff 0 (+ yoff ysize -1)) (cmd RASET 0 xoff 0 (+ xoff xsize -1)) (cmd #x3A #x03) (cmd RAMWR) (with-spi (str cs) (dotimes (p (* (/ xsize 2) ysize 3))      (write-byte c str))) (cmd #x3A #x05)))


; works
(defun clear (&optional j) (let ((c (if j #xFF 0))) (cmd CASET 0 yoff 0 (+ yoff ysize -1)) (cmd RASET 0 xoff 0 (+ xoff xsize -1)) (cmd #x3A #x03) (cmd RAMWR) (with-spi (str cs) (dotimes (p (* (/ xsize 2) ysize 3))     (write-byte c str))) (cmd #x3A #x05)))

Thank you!


#3

Unfortunately this is a known issue with the Arduino core for the ESP32-S3. See:

LilyGO T-Deck uLisp Machine - Limitations

Your function definition that works is 256 bytes long; the one that fails is 257 bytes long, and overflows the buffer. It appears to hang up because uLisp is waiting for a closing parenthesis - in this case you can avoid needing to reset the T-Deck by typing a closing parenthesis.

I have reported the problem on GitHub and Espressif have confirmed that they can reproduce the problem and will try and fix it. One workaround is to increase the size of the serial buffer in the ESP32 core.


#4

Looks like this has now been fixed:

Not sure when it will become part of the official release.


#5

Sorry I’ve overlooked the paragraph - Limitations.