<?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>MQX Software SolutionsのトピックRe: Legacy sscanf function doesn’t work under MQX using %u.</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/Legacy-sscanf-function-doesn-t-work-under-MQX-using-u/m-p/181319#M2790</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't know MQX, so just for the ANSI C part.&lt;/P&gt;&lt;P&gt;For %u or %i using a int (or unsigned int) type is required. Using a 8 bit variable is undefined behavior.&lt;/P&gt;&lt;P&gt;Also implicitly loosing volatile seems seems wrong to me. However a full ANSI-c version should support %u, of course.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 06 Mar 2010 11:17:50 GMT</pubDate>
    <dc:creator>CompilerGuru</dc:creator>
    <dc:date>2010-03-06T11:17:50Z</dc:date>
    <item>
      <title>Legacy sscanf function doesn’t work under MQX using %u.</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Legacy-sscanf-function-doesn-t-work-under-MQX-using-u/m-p/181318#M2789</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was trying to get the following to work :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;//Local Variablesvolatile char input_string[]= "123456789012345678901234567890";volatile uint_16 i=0, number_sscanf=0;volatile uint_8 arg1=0, arg2=0, arg3=0;{..number_sscanf = sscanf (input_string, "%s %u %u %u",command_string1, &amp;amp;arg1, &amp;amp;arg2, &amp;amp;arg3);..}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I later found out doing research on this forum that:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;a.&amp;nbsp; I have to use %i instead of %u&lt;/P&gt;&lt;P&gt;b.&amp;nbsp; I have to declare my arg variables uint_32 instead of uint_8&lt;/P&gt;&lt;P&gt;c.&amp;nbsp; I cannot use “volatile char input_string[] = …”, I have to declare it as “char input_string[] = …”&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I found my answer here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.freescale.com/message/47264#47264" rel="nofollow noopener noreferrer noopener noreferrer" target="_blank" title="https://community.freescale.com/message/47264#47264"&gt;https://community.freescale.com/message/47264#47264&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My questions:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1.&amp;nbsp; How come MQX does not support a legacy function fully like sscanf?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2.&amp;nbsp; The MQX sscanf function has limitations, so why isn’t it well documented somewhere?&amp;nbsp; I found inside io_scanf.c to see scanline.c for comments, but I couldn’t find the file.&amp;nbsp; (In contrast, the MSL_C_Reference.pdf included with Codewarrior Coldfire [when not using MQX] seems to conform to C99 and is well documented).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I am wrong in anything above, please let me know.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Juanee&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(I am using Codewarrior 7.1.2 for Coldfire (MCF52259 target), MQX 3.5).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 09:31:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Legacy-sscanf-function-doesn-t-work-under-MQX-using-u/m-p/181318#M2789</guid>
      <dc:creator>juanee</dc:creator>
      <dc:date>2020-10-29T09:31:25Z</dc:date>
    </item>
    <item>
      <title>Re: Legacy sscanf function doesn’t work under MQX using %u.</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Legacy-sscanf-function-doesn-t-work-under-MQX-using-u/m-p/181319#M2790</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't know MQX, so just for the ANSI C part.&lt;/P&gt;&lt;P&gt;For %u or %i using a int (or unsigned int) type is required. Using a 8 bit variable is undefined behavior.&lt;/P&gt;&lt;P&gt;Also implicitly loosing volatile seems seems wrong to me. However a full ANSI-c version should support %u, of course.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 06 Mar 2010 11:17:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Legacy-sscanf-function-doesn-t-work-under-MQX-using-u/m-p/181319#M2790</guid>
      <dc:creator>CompilerGuru</dc:creator>
      <dc:date>2010-03-06T11:17:50Z</dc:date>
    </item>
    <item>
      <title>Re: Legacy sscanf function doesn’t work under MQX using %u.</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Legacy-sscanf-function-doesn-t-work-under-MQX-using-u/m-p/181320#M2791</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your reply&amp;nbsp;&lt;SPAN class="lia-user-name UserName"&gt;&lt;A href="http://forums.freescale.com/t5/user/viewprofilepage/user-id/1310" target="_self"&gt;&lt;SPAN&gt;CompilerGuru&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Interesting.&amp;nbsp; My ANSI C book reference I use has an&amp;nbsp;example using int (like you said is required), but it doesn't say I can't use something else, like an&amp;nbsp;8 bit unsigned int.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you have a reference you can recommend (a book or a web link) where it specifically&amp;nbsp;specifies what&amp;nbsp;I can or cannot use for legacy functions such as sscanf using ANSI C?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;juan&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 07 Mar 2010 05:21:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Legacy-sscanf-function-doesn-t-work-under-MQX-using-u/m-p/181320#M2791</guid>
      <dc:creator>juanee</dc:creator>
      <dc:date>2010-03-07T05:21:54Z</dc:date>
    </item>
    <item>
      <title>Re: Legacy sscanf function doesn’t work under MQX using %u.</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Legacy-sscanf-function-doesn-t-work-under-MQX-using-u/m-p/181321#M2792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I can't suggest a book, but I would suggest you look at the source code for _io_scanline in the file io_scanl.c.&amp;nbsp; There you will find exactly what MQX does support.&amp;nbsp; You just can't beat having the source code available to gain a better understanding of what is happening behind the scenes&amp;nbsp;in you firmware.&amp;nbsp; Tell the guys at Freescale how much you appreciate this level of software support.&amp;nbsp; I understand they spent quite a chunk of change getting the rights to distribute MQX.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Mar 2010 19:14:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Legacy-sscanf-function-doesn-t-work-under-MQX-using-u/m-p/181321#M2792</guid>
      <dc:creator>kecart</dc:creator>
      <dc:date>2010-03-11T19:14:10Z</dc:date>
    </item>
    <item>
      <title>Re: Legacy sscanf function doesn’t work under MQX using %u.</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Legacy-sscanf-function-doesn-t-work-under-MQX-using-u/m-p/181322#M2793</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I will take a look at the scanline MQX&amp;nbsp;code you suggested.&amp;nbsp; Thank you for your recommendation kecart.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;juanee&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Mar 2010 09:29:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Legacy-sscanf-function-doesn-t-work-under-MQX-using-u/m-p/181322#M2793</guid>
      <dc:creator>juanee</dc:creator>
      <dc:date>2010-03-13T09:29:39Z</dc:date>
    </item>
  </channel>
</rss>

