<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
</head>
<body>
<p>Hi,<br>
</p>
<div class="moz-cite-prefix">On 26/08/2020 5:36 pm, Schweikhardt,
Jens (TSPCE3-TL4) wrote:<br>
</div>
<blockquote type="cite"
cite="mid:6b855b433e06472faacb7fc03988264a@BK99MAIL02.bk.local">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
span.E-MailFormatvorlage17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal">Hello world\n<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I’m observing a 256 byte input limit with
RTEMS 5 on riscv that I don’t know how to overcome.<o:p></o:p></p>
<p class="MsoNormal">We are using the RTEMS console driver and
newlib stdio.<o:p></o:p></p>
<p class="MsoNormal">The effect is that an fgets() appears to
only accept 256 characters, specifically if we connect via<o:p></o:p></p>
<p class="MsoNormal">picocom on a Linux box, we can type exactly
256 chars and then no more characters are accepted.<o:p></o:p></p>
<p class="MsoNormal">My first guess was that stdio buffers are
256 byte by default, which they seem to be judging from<o:p></o:p></p>
<p class="MsoNormal">grepping for BUFSIZ. Then using setvbuf
should be the way to increase their size. But setvbuf had no
effect.<o:p></o:p></p>
<p class="MsoNormal">Next guess was that it is a limit of
picocom. So we tried using Python with pyserial to send data.<o:p></o:p></p>
<p class="MsoNormal">Same problem.</p>
</div>
</blockquote>
<p><br>
</p>
<p>Not sure if is the best practice, but we override the size of the
buffers in:</p>
<p>rtems-5/cpukit/libcsupport/src/termios.c:87</p>
<pre><code>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
</code></pre>
</body>
</html>