<?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>topic Re: printf problem in ColdFire/68K Microcontrollers and Processors</title>
    <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/printf-problem/m-p/200344#M9148</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes! with the following istrunction:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; stdout-&amp;gt;write_proc = Write_Display;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But teh firmware continue to call WriteUARTN and not my Write_Display function.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Where is my error????&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 20 Jul 2009 18:34:53 GMT</pubDate>
    <dc:creator>LPs1978</dc:creator>
    <dc:date>2009-07-20T18:34:53Z</dc:date>
    <item>
      <title>printf problem</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/printf-problem/m-p/200339#M9143</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; I'm in triuble with printf. I'm trying to use the printf standard funcion, but each time I want to use it the linker give me errors. It tells me that it cannot find UART function. I think that this is a problem of the console support, but I have not idea how to disable it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How I can tell toi the linker to not use UART functions?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jul 2009 20:29:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/printf-problem/m-p/200339#M9143</guid>
      <dc:creator>LPs1978</dc:creator>
      <dc:date>2009-07-17T20:29:27Z</dc:date>
    </item>
    <item>
      <title>Re: printf problem</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/printf-problem/m-p/200340#M9144</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Has someone news about my problem?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is a way to use the stdout with printf instead of console without recompile libraries?&lt;/P&gt;&lt;DIV class="message-edit-history"&gt;&lt;SPAN class="edit-author"&gt;Message Edited by LPs1978 on&lt;/SPAN&gt; &lt;SPAN class="local-date"&gt;2009-07-20&lt;/SPAN&gt; &lt;SPAN class="local-time"&gt;09:40 AM&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jul 2009 15:39:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/printf-problem/m-p/200340#M9144</guid>
      <dc:creator>LPs1978</dc:creator>
      <dc:date>2009-07-20T15:39:49Z</dc:date>
    </item>
    <item>
      <title>Re: printf problem</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/printf-problem/m-p/200341#M9145</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Macro using fprintf() function can be used as a simple workaround.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Switching stdout from UART console to another device is OS-specific. For example, well-known uC/OS uses i/O library function ReplaceStdio().&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jul 2009 16:30:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/printf-problem/m-p/200341#M9145</guid>
      <dc:creator>admin</dc:creator>
      <dc:date>2009-07-20T16:30:10Z</dc:date>
    </item>
    <item>
      <title>Re: printf problem</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/printf-problem/m-p/200342#M9146</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; my problem is to use the pritf as stadard output. In other words I need to modify the stdout-&amp;gt;write_proc to a my proprietary procedure.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What is happening to me is that I include stdio.h an when I use printf the sistem calls WriteUARTN funztion instead of my procedure.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think that the problem is that the library wants to send to UART the output instead of stdout file structure.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I can do to solve my problem??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jul 2009 16:55:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/printf-problem/m-p/200342#M9146</guid>
      <dc:creator>LPs1978</dc:creator>
      <dc:date>2009-07-20T16:55:47Z</dc:date>
    </item>
    <item>
      <title>Re: printf problem</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/printf-problem/m-p/200343#M9147</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is&amp;nbsp;overloading stdout-&amp;gt;write_proc&amp;nbsp;with your proprietary procedure succeed?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jul 2009 17:38:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/printf-problem/m-p/200343#M9147</guid>
      <dc:creator>admin</dc:creator>
      <dc:date>2009-07-20T17:38:30Z</dc:date>
    </item>
    <item>
      <title>Re: printf problem</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/printf-problem/m-p/200344#M9148</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes! with the following istrunction:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; stdout-&amp;gt;write_proc = Write_Display;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But teh firmware continue to call WriteUARTN and not my Write_Display function.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Where is my error????&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jul 2009 18:34:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/printf-problem/m-p/200344#M9148</guid>
      <dc:creator>LPs1978</dc:creator>
      <dc:date>2009-07-20T18:34:53Z</dc:date>
    </item>
    <item>
      <title>Re: printf problem</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/printf-problem/m-p/200345#M9149</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Probably I found out the problem.&lt;/P&gt;&lt;P&gt;I debugged my firmware and I saw that when the istruction&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;stdout-&amp;gt;write_proc = Write_Display;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;is executed the stdout-&amp;gt;write_proc value doesn't change and still at value 0.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The stdout structure is allocated in RAM.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What can cause this strange behaviour?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance for you support.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jul 2009 14:05:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/printf-problem/m-p/200345#M9149</guid>
      <dc:creator>LPs1978</dc:creator>
      <dc:date>2009-07-21T14:05:51Z</dc:date>
    </item>
    <item>
      <title>Re: printf problem</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/printf-problem/m-p/200346#M9150</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Some others news to stress you men.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I watch at the address of stdout-&amp;gt;write_proc using view-global variables codewarrior function the value is 0x200006E4.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my code, if I read the address using instruction&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;__io_proc *Pippo = &amp;amp;stdout-&amp;gt;write_proc;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the address is totally different. The address that I read is 8 byte more high instead of the real one:&lt;/P&gt;&lt;P&gt;0x200006EC.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Than when I the firmware executes the istruction&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;stdout-&amp;gt;write_proc = Write_Display;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;it modify another part of stdout structure.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This means that the software is compiling something different instead of stdout file structure.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have you got any idea to make me able to run the printf correctly????&lt;/P&gt;&lt;DIV class="message-edit-history"&gt;&lt;SPAN class="edit-author"&gt;Message Edited by LPs1978 on&lt;/SPAN&gt; &lt;SPAN class="local-date"&gt;2009-07-21&lt;/SPAN&gt; &lt;SPAN class="local-time"&gt;10:38 AM&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jul 2009 16:21:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/printf-problem/m-p/200346#M9150</guid>
      <dc:creator>LPs1978</dc:creator>
      <dc:date>2009-07-21T16:21:58Z</dc:date>
    </item>
    <item>
      <title>Re: printf problem</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/printf-problem/m-p/200347#M9151</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm back to stress you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;At the end I found the problem of FILE structure. In ansi_prefix_CF.size.h was defined no tiny library, but for MCF52221 is mandatory to use C_4i_CF_SZ library that is a small size one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now the write_proc is set correctly, but my write function isn't colled.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is the tiny library able to make me use printf???&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jul 2009 18:37:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/printf-problem/m-p/200347#M9151</guid>
      <dc:creator>LPs1978</dc:creator>
      <dc:date>2009-07-21T18:37:35Z</dc:date>
    </item>
  </channel>
</rss>

