<?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>S12 / MagniV MicrocontrollersのトピックRe: Problems with vprintf, va_start, va_end</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Problems-with-vprintf-va-start-va-end/m-p/173055#M5918</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;UL&gt;&lt;LI&gt;Sometimes I'll get illegal characters on the debug result (special characters and more&lt;/LI&gt;&lt;LI&gt;characters the expected).&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Maybe you have baudrate mismatch? Also you should make sure you have enough stack space.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Second problem: I'll get compiler warning C5917 (removed dead assignment) on the line 'va_end(theArguments)'.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;va_end macro clears theArguments pointer. Of cause this assignment is not used in your code and thus is dead. You may disable compiler warning adding this line somewhere above&amp;nbsp;the va_end line&amp;nbsp;:&lt;/P&gt;&lt;P&gt;#pragma MESSAGE DISABLE C5917&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 20 Jun 2012 15:00:18 GMT</pubDate>
    <dc:creator>kef</dc:creator>
    <dc:date>2012-06-20T15:00:18Z</dc:date>
    <item>
      <title>Problems with vprintf, va_start, va_end</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Problems-with-vprintf-va-start-va-end/m-p/173054#M5917</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have&amp;nbsp;implemented a function&amp;nbsp;to output&amp;nbsp;debug messages to rs232 and/or sd-card (MC9S12XDP512):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;void WriteMonitor(char *theString, ...)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; va_list theArguments;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set_printf(PutChar);&lt;/P&gt;&lt;P&gt;&amp;nbsp; va_start(theArguments, theString);&lt;/P&gt;&lt;P&gt;&amp;nbsp; (void)vprintf(theString, theArguments);&lt;/P&gt;&lt;P&gt;&amp;nbsp; va_end(theArguments);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;static void PutChar(char theChar)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; SciDriverSendChar(theChar);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sometimes I'll get illegal characters on the debug result (special characters and more characters the expected).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Second problem: I'll get compiler warning C5917 (removed dead assignment) on the line 'va_end(theArguments)'.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any hints?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;P&gt;Marc&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jun 2012 19:58:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Problems-with-vprintf-va-start-va-end/m-p/173054#M5917</guid>
      <dc:creator>mark99</dc:creator>
      <dc:date>2012-06-19T19:58:03Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with vprintf, va_start, va_end</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Problems-with-vprintf-va-start-va-end/m-p/173055#M5918</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;UL&gt;&lt;LI&gt;Sometimes I'll get illegal characters on the debug result (special characters and more&lt;/LI&gt;&lt;LI&gt;characters the expected).&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Maybe you have baudrate mismatch? Also you should make sure you have enough stack space.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Second problem: I'll get compiler warning C5917 (removed dead assignment) on the line 'va_end(theArguments)'.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;va_end macro clears theArguments pointer. Of cause this assignment is not used in your code and thus is dead. You may disable compiler warning adding this line somewhere above&amp;nbsp;the va_end line&amp;nbsp;:&lt;/P&gt;&lt;P&gt;#pragma MESSAGE DISABLE C5917&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jun 2012 15:00:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Problems-with-vprintf-va-start-va-end/m-p/173055#M5918</guid>
      <dc:creator>kef</dc:creator>
      <dc:date>2012-06-20T15:00:18Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with vprintf, va_start, va_end</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Problems-with-vprintf-va-start-va-end/m-p/173056#M5919</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for the answer!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's no baudrate mismatch, because I have the same problem writing on a SD card. Unfortunately it's not a problem with stack space.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Very tricky...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jun 2012 13:01:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Problems-with-vprintf-va-start-va-end/m-p/173056#M5919</guid>
      <dc:creator>mark99</dc:creator>
      <dc:date>2012-06-28T13:01:41Z</dc:date>
    </item>
  </channel>
</rss>

