<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>LPCXpresso IDEのトピックredlid __getc vs newlib _read</title>
    <link>https://community.nxp.com/t5/LPCXpresso-IDE/redlid-getc-vs-newlib-read/m-p/555692#M13809</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by tridentsx on Wed Oct 12 14:11:19 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Is it possible in redlib to override stdio input primitive functions to use different file handles for different targets. I have seen examples of this using newlib.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The only example I seen for redlib is the __getc which doesnt have a file descriptor as input.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I want to be able to write stdio output to uart0 and stderr to uart1 I also want to read GPS from uart2 and read user input from uart0. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there something like newlib's_open _read _write in redlib which I could override? Is the redlib source available ?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 23:31:21 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T23:31:21Z</dc:date>
    <item>
      <title>redlid __getc vs newlib _read</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/redlid-getc-vs-newlib-read/m-p/555692#M13809</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by tridentsx on Wed Oct 12 14:11:19 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Is it possible in redlib to override stdio input primitive functions to use different file handles for different targets. I have seen examples of this using newlib.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The only example I seen for redlib is the __getc which doesnt have a file descriptor as input.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I want to be able to write stdio output to uart0 and stderr to uart1 I also want to read GPS from uart2 and read user input from uart0. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there something like newlib's_open _read _write in redlib which I could override? Is the redlib source available ?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:31:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/redlid-getc-vs-newlib-read/m-p/555692#M13809</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:31:21Z</dc:date>
    </item>
    <item>
      <title>Re: redlid __getc vs newlib _read</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/redlid-getc-vs-newlib-read/m-p/555693#M13810</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by CodeRedSupport on Wed Oct 12 23:49:39 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;See&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://"&gt;http://support.code-red-tech.com/CodeRedWiki/UartPrintf&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;CodeRedSupport&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:31:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/redlid-getc-vs-newlib-read/m-p/555693#M13810</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:31:21Z</dc:date>
    </item>
    <item>
      <title>Re: redlid __getc vs newlib _read</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/redlid-getc-vs-newlib-read/m-p/555694#M13811</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by tridentsx on Thu Oct 13 06:39:23 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: CodeRedSupport&lt;/STRONG&gt;&lt;BR /&gt;See&lt;BR /&gt; &lt;BR /&gt;&lt;A href="http://"&gt;http://support.code-red-tech.com/CodeRedWiki/UartPrintf&lt;/A&gt;&lt;BR /&gt; &lt;BR /&gt;Regards,&lt;BR /&gt;CodeRedSupport&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the reply, I have read that page before, is it possible in newlib to override read as it is in newlib&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[I]read[/I][I]Read from a file. Minimal implementation: [/I][I]int read(int file, char *ptr, int len) { return 0; }[/I]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;By overriding this function I could read from different uarts by sending different file descriptor's.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there something similar in redlib?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards /// CF&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:31:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/redlid-getc-vs-newlib-read/m-p/555694#M13811</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:31:22Z</dc:date>
    </item>
    <item>
      <title>Re: redlid __getc vs newlib _read</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/redlid-getc-vs-newlib-read/m-p/555695#M13812</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by CodeRedSupport on Thu Oct 13 09:33:24 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;If you look at the example code that the FAQ points at, you will see the __sys_write() takes a handle as its first parameter. IIRC stdout will be 1, stderr will be 2.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;CodeRedSupport.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:31:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/redlid-getc-vs-newlib-read/m-p/555695#M13812</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:31:23Z</dc:date>
    </item>
    <item>
      <title>Re: redlid __getc vs newlib _read</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/redlid-getc-vs-newlib-read/m-p/555696#M13813</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by tridentsx on Thu Oct 13 09:52:11 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Its the read part that I need, beeing able to read from multiple UARTS, I could roll my own functions but would prefer to use something builtin.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the support /// Carl&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:31:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/redlid-getc-vs-newlib-read/m-p/555696#M13813</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:31:23Z</dc:date>
    </item>
    <item>
      <title>Re: redlid __getc vs newlib _read</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/redlid-getc-vs-newlib-read/m-p/555697#M13814</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by CodeRedSupport on Thu Oct 13 12:56:46 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;[FONT=Courier New][SIZE=2]__sys_readc() [/SIZE][/FONT]reads a character from stdin.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[FONT=Courier New][SIZE=2]__sys_read() [/SIZE][/FONT]reads from the file that you pass it the handle for as the first parameter.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The spec for these functions is basically take straight from ARM's semihosting specification, as detailed:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://"&gt;http://support.code-red-tech.com/CodeRedWiki/WhatIsSemiHosting&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;CodeRedSupport&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:31:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/redlid-getc-vs-newlib-read/m-p/555697#M13814</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:31:24Z</dc:date>
    </item>
    <item>
      <title>Re: redlid __getc vs newlib _read</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/redlid-getc-vs-newlib-read/m-p/555698#M13815</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by tridentsx on Thu Oct 13 17:34:14 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Much appriciated thats what I was looking for.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;// Carl&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:31:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/redlid-getc-vs-newlib-read/m-p/555698#M13815</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:31:24Z</dc:date>
    </item>
    <item>
      <title>Re: redlid __getc vs newlib _read</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/redlid-getc-vs-newlib-read/m-p/555699#M13816</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by tridentsx on Mon Oct 24 09:43:10 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I have one more question, do I have to link the semihosting version for these functions to be called ((__sys_getc __sys_write)? I got it to work when using semihosting but not the other versions of redlib which I find peculiar?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Is that normal? Are the tops of stdio reentrant ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards /// Carl&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:31:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/redlid-getc-vs-newlib-read/m-p/555699#M13816</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:31:25Z</dc:date>
    </item>
    <item>
      <title>Re: redlid __getc vs newlib _read</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/redlid-getc-vs-newlib-read/m-p/555700#M13817</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Ex-Zero on Mon Oct 24 10:18:27 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: tridentsx&lt;/STRONG&gt;&lt;BR /&gt;Is that normal?&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Of course :eek:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;See:[U] &lt;/SPAN&gt;&lt;A href="http://"&gt;http://support.code-red-tech.com/CodeRedWiki/SwitchingCLibrary&lt;/A&gt;&lt;SPAN&gt;[/U]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:31:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/redlid-getc-vs-newlib-read/m-p/555700#M13817</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:31:26Z</dc:date>
    </item>
    <item>
      <title>Re: redlid __getc vs newlib _read</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/redlid-getc-vs-newlib-read/m-p/555701#M13818</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by tridentsx on Mon Oct 24 14:11:16 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: Zero&lt;/STRONG&gt;&lt;BR /&gt;Of course :eek:&lt;BR /&gt; &lt;BR /&gt;See:[U] &lt;A href="http://"&gt;http://support.code-red-tech.com/CodeRedWiki/SwitchingCLibrary&lt;/A&gt;[/U]&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I understand how to change between the different library versions, my question was more how much of stdio is implemented in nohost ? &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Can the __Sys_write and __sys_getc etc ... be overidden in nohost to provide custom io functionality without any of the debugging semihosting code being linked and executed ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://"&gt;http://support.code-red-tech.com/CodeRedWiki/LibraryVariants&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:31:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/redlid-getc-vs-newlib-read/m-p/555701#M13818</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:31:26Z</dc:date>
    </item>
    <item>
      <title>Re: redlid __getc vs newlib _read</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/redlid-getc-vs-newlib-read/m-p/555702#M13819</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Ex-Zero on Mon Oct 24 15:39:08 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: &lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;...to provide custom io functionality without ...semihosting... &lt;BR /&gt;&lt;/SPAN&gt;&lt;HR /&gt;&lt;SPAN&gt;What should that be? Are we talking about retargeting?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://"&gt;http://support.code-red-tech.com/CodeRedWiki/UartPrintf&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That's possible with NoHost and stdio :)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:31:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/redlid-getc-vs-newlib-read/m-p/555702#M13819</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:31:27Z</dc:date>
    </item>
  </channel>
</rss>

