I wrote this when I got sick of fighting with minicom, not getting reasonable scrollback from it, and having it constantly corrupting its terminal whenever some junk characters got spat out the serial port during a target reboot.
It's a very very simple serial console -- just run it in your xterm or Terminal or whatnot. It'll display data from the serial port and send characters you type to the serial port.
By default it squashes most non-printables to '.' to avoid mucking up your
terminal state, but you can pass -t
(transparent) to turn that off if
the other end is spitting out ANSI color or providing interactive curses
style interfaces.
sconsole [ <option> ]* [ <serialdevice> [ <baudrate> ] ]
options: -t transparent mode (allow non-printable characters)
-c convert NL to CR on transmit
-x display characters in hex
-l log serial data: -l<filename> (default: console.log)
-b litex serial boot: -b<filename>[@<hexaddr>]
serialdevice defaults to /dev/ttyUSB0
baudrate defaults to 115200
sconsole can send binaries to the Litex serial bootloader. Use the -b
option to list one or more binaries to download. They will be downloaded
to the target in the order listed and then the target will be told to jump
to the first binary's base address. The default download address is
0x40000000 or you can specify an address after the filename with @:
$ sconsole -bbios.bin@0x40000000 -bapp.bin@0x40008000 /dev/ttyUSB0 1000000