Overcoming a 256 bytes console/uart limit

Ian Caddy ianc at goanna.iinet.net.au
Thu Aug 27 00:40:36 UTC 2020


Hi,

On 26/08/2020 5:36 pm, Schweikhardt, Jens (TSPCE3-TL4) wrote:
>
> Hello world\n
>
> I’m observing a 256 byte input limit with RTEMS 5 on riscv that I 
> don’t know how to overcome.
>
> We are using the RTEMS console driver and newlib stdio.
>
> The effect is that an fgets() appears to only accept 256 characters, 
> specifically if we connect via
>
> picocom on a Linux box, we can type exactly 256 chars and then no more 
> characters are accepted.
>
> My first guess was that stdio buffers are 256 byte by default, which 
> they seem to be judging from
>
> grepping for BUFSIZ. Then using setvbuf should be the way to increase 
> their size. But setvbuf had no effect.
>
> Next guess was that it is a limit of picocom. So we tried using Python 
> with pyserial to send data.
>
> Same problem.
>

Not sure if is the best practice, but we override the size of the 
buffers in:

rtems-5/cpukit/libcsupport/src/termios.c:87

|static size_t rtems_termios_cbufsize = 1024; static size_t 
rtems_termios_raw_input_size = 1024; static size_t 
rtems_termios_raw_output_size = 1024; This overrides the raw input and 
output and the cooked buffer. Hope this helps. regards, Ian Caddy Goanna 
Technologies Pty Ltd |

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20200827/5c10846f/attachment.html>


More information about the users mailing list