<?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: mc9s12dt256b reentrant sprintf issue in S12 / MagniV Microcontrollers</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/mc9s12dt256b-reentrant-sprintf-issue/m-p/147259#M4050</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;HAh1!!! it works! I can't believe it. I didn't thin it would actually work. Thank yoou.&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 29 Jan 2009 09:08:21 GMT</pubDate>
    <dc:creator>Franklin</dc:creator>
    <dc:date>2009-01-29T09:08:21Z</dc:date>
    <item>
      <title>mc9s12dt256b reentrant sprintf issue</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/mc9s12dt256b-reentrant-sprintf-issue/m-p/147255#M4046</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hi,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I am using sprintf to write a 68 char array, and have a 10ms timer interrupt running. I believe the interrupt is interrupting sprintf, and beacuse its not reentrant, crashing. (illegal bp)&lt;BR /&gt;&lt;BR /&gt;I read that there's a way to use a reentrant version of sprintf here:&amp;nbsp; &lt;A _jive_internal="true" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fforums.freescale.com%2Ffreescale%2Fboard%2Fmessage%3Fboard.id%3D16BITCOMM%26message.id%3D1824%26query.id%3D100659%23M1824" rel="nofollow" target="_blank"&gt;http://forums.freescale.com/freescale/board/message?board.id=16BITCOMM&amp;amp;message.id=1824&amp;amp;query.id=100659#M1824&lt;/A&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;but couldn't make it work. When I add PRINTF.c to the linker files, and -DLIBDEF_REENTRANT_PRINTF to the compiler directives, I get a lot of compiler errors complaining about problems in stdio, and PRINTF.c, starting at the #if reentrant part. I am lost, but hope the solution is simple...&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jan 2009 07:11:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/mc9s12dt256b-reentrant-sprintf-issue/m-p/147255#M4046</guid>
      <dc:creator>Franklin</dc:creator>
      <dc:date>2009-01-29T07:11:32Z</dc:date>
    </item>
    <item>
      <title>Re: mc9s12dt256b reentrant sprintf issue</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/mc9s12dt256b-reentrant-sprintf-issue/m-p/147256#M4047</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Did you define a value for LIBDEF_REENTRANT_PRINTF?&lt;BR /&gt;E.g. Did you use:&lt;BR /&gt;-dLIBDEF_REENTRANT_PRINTF=1&lt;BR /&gt;&lt;BR /&gt;Just defining the macro with no value does not build.&lt;BR /&gt;&lt;BR /&gt;Also make sure to move printf.c in the link order before the ansi library (and ignore the warnings about the second printf implementation in the ansi library)&lt;BR /&gt;&lt;BR /&gt;Daiel&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jan 2009 07:58:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/mc9s12dt256b-reentrant-sprintf-issue/m-p/147256#M4047</guid>
      <dc:creator>CompilerGuru</dc:creator>
      <dc:date>2009-01-29T07:58:30Z</dc:date>
    </item>
    <item>
      <title>Re: mc9s12dt256b reentrant sprintf issue</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/mc9s12dt256b-reentrant-sprintf-issue/m-p/147257#M4048</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;And BTW. As long as your interrupt handler is not using any of the printf like functions there should be no problem. Printf is using a lot of stack, I would suggest that you are checking that not experiencing a stack overflow.&lt;BR /&gt;Using printf functions in interrupt handlers is possible if you recompile it to be reentrant and if you allocate enough stack space, but even then the execution may just take to long to be acceptable.&lt;BR /&gt;&lt;BR /&gt;Daniel&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jan 2009 08:03:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/mc9s12dt256b-reentrant-sprintf-issue/m-p/147257#M4048</guid>
      <dc:creator>CompilerGuru</dc:creator>
      <dc:date>2009-01-29T08:03:46Z</dc:date>
    </item>
    <item>
      <title>Re: mc9s12dt256b reentrant sprintf issue</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/mc9s12dt256b-reentrant-sprintf-issue/m-p/147258#M4049</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;how do I assign more stack space?&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jan 2009 08:55:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/mc9s12dt256b-reentrant-sprintf-issue/m-p/147258#M4049</guid>
      <dc:creator>Franklin</dc:creator>
      <dc:date>2009-01-29T08:55:21Z</dc:date>
    </item>
    <item>
      <title>Re: mc9s12dt256b reentrant sprintf issue</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/mc9s12dt256b-reentrant-sprintf-issue/m-p/147259#M4050</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;HAh1!!! it works! I can't believe it. I didn't thin it would actually work. Thank yoou.&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jan 2009 09:08:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/mc9s12dt256b-reentrant-sprintf-issue/m-p/147259#M4050</guid>
      <dc:creator>Franklin</dc:creator>
      <dc:date>2009-01-29T09:08:21Z</dc:date>
    </item>
    <item>
      <title>Re: mc9s12dt256b reentrant sprintf issue</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/mc9s12dt256b-reentrant-sprintf-issue/m-p/147260#M4051</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;And what was the actual issue? Stackspace?&lt;BR /&gt;&lt;BR /&gt;Daniel&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jan 2009 12:22:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/mc9s12dt256b-reentrant-sprintf-issue/m-p/147260#M4051</guid>
      <dc:creator>CompilerGuru</dc:creator>
      <dc:date>2009-01-29T12:22:26Z</dc:date>
    </item>
    <item>
      <title>Re: mc9s12dt256b reentrant sprintf issue</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/mc9s12dt256b-reentrant-sprintf-issue/m-p/147261#M4052</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;I don't know. How do you increase stack space?&lt;BR /&gt;&lt;BR /&gt;making sprintf reentrant, solved the issue i was having, but now I am having other problems with functions being interrupted, and my program crashing.&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jan 2009 01:35:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/mc9s12dt256b-reentrant-sprintf-issue/m-p/147261#M4052</guid>
      <dc:creator>Franklin</dc:creator>
      <dc:date>2009-01-30T01:35:05Z</dc:date>
    </item>
  </channel>
</rss>

