Characters are lost in serial REPL output on a Teensy 4.1


#1

Hello,

Just got started using ulisp; I’m trying out the latest version on a Teensy 4.1.

When connecting to the serial, whether it’s via screen or other methods (tycommander/arduino ide), characters are randomly lost when interacting with the REPL.

For example, here’s some output when repeatedly sending (+ 2 3) to the serial:

59999> (+ 2 3)
5

59999> (+ 2 3)
5

59999> 2 3)
5

Is there a way to make this consistent so it stops dropping characters? I’ve tried messing with the baud rate and it doesn’t seem to make a difference.

I haven’t made any changes/extensions to the ulisp source code.

Thanks!


#2

I haven’t seen this behaviour before. Can you give some more information - what version of the Arduino IDE are you using, what platform are you on, and what release of uLisp is it?


#3

Thanks:

  • Linux/Fedora 40
  • Arduino IDE 2.3.2
  • uLisp 4.5a

#4

Just tried older versions of uLisp up until 3.6 and the issue was present there too. I have an old raspberry pico laying around, I’ll try it later when I get the chance to see if it’s a teensy-specific thing.


#5

Ok I set up uLisp on an rpi pico, and the serial output does not get cut off. It seems like the issue is specific to the Teensy. Just in case I tried setting it up again and same results.


#6

I’ve only tried the Teensy with Arduino IDE 1.8.19 (Teensyduino), and didn’t find any problem there.


#7

Was it a 4.0 or 4.1?


#8

I’ve tried both.


#9

I’ve just tried it with a Teensy 4.0 board on a MacBook Pro, Arduino 1.8.19, and Serial seems fine:

uLisp 4.5a 
59999> (+ 2 3)
5

59999> (+ 2 3)
5

59999> (+ 2 3)
5

59999> (+ 2 3)
5

59999>

In the Teensyduino core I had USB Type set to Serial. Is that the option you were using?