]> git.sur5r.net Git - freertos/blob - FreeRTOS/Demo/RISC-V_RV32_SiFive_HiFive1_GCC/freedom-metal/doc/html/devguide/tty.html
Added the "full" demo to the RISC-V_RV32_SiFive_HiFive1_GCC demo - backup check in...
[freertos] / FreeRTOS / Demo / RISC-V_RV32_SiFive_HiFive1_GCC / freedom-metal / doc / html / devguide / tty.html
1
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4
5 <html xmlns="http://www.w3.org/1999/xhtml">
6   <head>
7     <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
8     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
9     <title>Standard I/O &#8212; Freedom Metal v201905 documentation</title>
10     <link rel="stylesheet" href="../_static/alabaster.css" type="text/css" />
11     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
12     <script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
13     <script type="text/javascript" src="../_static/jquery.js"></script>
14     <script type="text/javascript" src="../_static/underscore.js"></script>
15     <script type="text/javascript" src="../_static/doctools.js"></script>
16     <link rel="index" title="Index" href="../genindex.html" />
17     <link rel="search" title="Search" href="../search.html" />
18     <link rel="next" title="API Reference" href="../api.html" />
19     <link rel="prev" title="Physical Memory Protection" href="pmps.html" />
20    
21   <link rel="stylesheet" href="../_static/custom.css" type="text/css" />
22   
23   
24   <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
25
26   </head><body>
27   
28
29     <div class="document">
30       <div class="documentwrapper">
31         <div class="bodywrapper">
32           
33
34           <div class="body" role="main">
35             
36   <div class="section" id="standard-i-o">
37 <h1>Standard I/O<a class="headerlink" href="#standard-i-o" title="Permalink to this headline">¶</a></h1>
38 <p>Freedom Metal integrates with libc <code class="docutils literal notranslate"><span class="pre">STDOUT</span></code> to provide virtual terminal support.
39 The default <code class="docutils literal notranslate"><span class="pre">STDOUT</span></code> device is the first UART serial peripheral on the target.
40 If no UART serial peripheral is present, such as in the case of SiFive CoreIP
41 test harnesses, then the bytes sent to <code class="docutils literal notranslate"><span class="pre">STDOUT</span></code> are dropped.</p>
42 <div class="section" id="hello-world">
43 <h2>Hello World<a class="headerlink" href="#hello-world" title="Permalink to this headline">¶</a></h2>
44 <p>Using the virtual terminal with Freedom Metal is exactly what you might expect:</p>
45 <div class="highlight-C notranslate"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
46 2
47 3
48 4
49 5
50 6
51 7</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="cp">#include</span> <span class="cpf">&lt;stdio.h&gt;</span><span class="cp"></span>
52
53 <span class="kt">int</span> <span class="nf">main</span><span class="p">(</span><span class="kt">void</span><span class="p">)</span> <span class="p">{</span>
54    <span class="n">printf</span><span class="p">(</span><span class="s">&quot;Hello, world!&quot;</span><span class="p">);</span>
55
56    <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
57 <span class="p">}</span>
58 </pre></div>
59 </td></tr></table></div>
60 </div>
61 </div>
62
63
64           </div>
65           
66         </div>
67       </div>
68       <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
69         <div class="sphinxsidebarwrapper">
70 <h1 class="logo"><a href="../index.html">Freedom Metal</a></h1>
71
72
73
74
75
76
77
78
79 <h3>Navigation</h3>
80 <ul class="current">
81 <li class="toctree-l1"><a class="reference internal" href="../introduction.html">Introduction to Freedom Metal</a></li>
82 <li class="toctree-l1 current"><a class="reference internal" href="../devguide.html">Developer Guide</a><ul class="current">
83 <li class="toctree-l2"><a class="reference internal" href="exceptions.html">Exception Handlers</a></li>
84 <li class="toctree-l2"><a class="reference internal" href="fe310-g000-pll.html">FE310-G00 PLL</a></li>
85 <li class="toctree-l2"><a class="reference internal" href="interrupts.html">Interrupt Handlers</a></li>
86 <li class="toctree-l2"><a class="reference internal" href="itim.html">Instruction Tightly Integrated Memory</a></li>
87 <li class="toctree-l2"><a class="reference internal" href="pmps.html">Physical Memory Protection</a></li>
88 <li class="toctree-l2 current"><a class="current reference internal" href="#">Standard I/O</a></li>
89 </ul>
90 </li>
91 <li class="toctree-l1"><a class="reference internal" href="../api.html">API Reference</a></li>
92 </ul>
93
94 <div class="relations">
95 <h3>Related Topics</h3>
96 <ul>
97   <li><a href="../index.html">Documentation overview</a><ul>
98   <li><a href="../devguide.html">Developer Guide</a><ul>
99       <li>Previous: <a href="pmps.html" title="previous chapter">Physical Memory Protection</a></li>
100       <li>Next: <a href="../api.html" title="next chapter">API Reference</a></li>
101   </ul></li>
102   </ul></li>
103 </ul>
104 </div>
105 <div id="searchbox" style="display: none" role="search">
106   <h3>Quick search</h3>
107     <div class="searchformwrapper">
108     <form class="search" action="../search.html" method="get">
109       <input type="text" name="q" />
110       <input type="submit" value="Go" />
111       <input type="hidden" name="check_keywords" value="yes" />
112       <input type="hidden" name="area" value="default" />
113     </form>
114     </div>
115 </div>
116 <script type="text/javascript">$('#searchbox').show(0);</script>
117         </div>
118       </div>
119       <div class="clearer"></div>
120     </div>
121     <div class="footer">
122       &copy;2019, SiFive Inc..
123       
124       |
125       Powered by <a href="http://sphinx-doc.org/">Sphinx 1.7.5</a>
126       &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.11</a>
127       
128       |
129       <a href="../_sources/devguide/tty.rst.txt"
130           rel="nofollow">Page source</a>
131     </div>
132
133     
134
135     
136   </body>
137 </html>