<?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: Endianess Problem with 64 bit datatype in Vybrid Processors</title>
    <link>https://community.nxp.com/t5/Vybrid-Processors/Endianess-Problem-with-64-bit-datatype/m-p/242821#M679</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/ioseph_martinez"&gt;ioseph_martinez&lt;/A&gt;&amp;nbsp; / &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/juangutierrez"&gt;juangutierrez&lt;/A&gt; can you&amp;nbsp; help on this case?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 06 Aug 2013 15:06:58 GMT</pubDate>
    <dc:creator>karina_valencia</dc:creator>
    <dc:date>2013-08-06T15:06:58Z</dc:date>
    <item>
      <title>Endianess Problem with 64 bit datatype</title>
      <link>https://community.nxp.com/t5/Vybrid-Processors/Endianess-Problem-with-64-bit-datatype/m-p/242820#M678</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: Arial,Helvetica,sans-serif; font-size: 10pt;"&gt;We are developing software on vybrid processor(A5 core). We are facing issues with the 64 bit data type. When we tried to print the value using printf or sprintf, the values are printed wrongly. &lt;BR /&gt; &lt;BR /&gt;Then we had identified that it is beacause of endian problem. The Lower 32 bit value is placed in upper 32 bit place and so the it is printing big numbers even for small value &lt;BR /&gt; &lt;BR /&gt;for example when we tried to print the value 0x19 of long long int data type, it is printed as 0x1900000000. &lt;BR /&gt; &lt;BR /&gt;Please let us know , how to overcome this issue. &lt;BR /&gt; &lt;BR /&gt;Note : We are using gcc compiler&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Aug 2013 14:20:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Vybrid-Processors/Endianess-Problem-with-64-bit-datatype/m-p/242820#M678</guid>
      <dc:creator>karthigeyannata</dc:creator>
      <dc:date>2013-08-06T14:20:40Z</dc:date>
    </item>
    <item>
      <title>Re: Endianess Problem with 64 bit datatype</title>
      <link>https://community.nxp.com/t5/Vybrid-Processors/Endianess-Problem-with-64-bit-datatype/m-p/242821#M679</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/ioseph_martinez"&gt;ioseph_martinez&lt;/A&gt;&amp;nbsp; / &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/juangutierrez"&gt;juangutierrez&lt;/A&gt; can you&amp;nbsp; help on this case?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Aug 2013 15:06:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Vybrid-Processors/Endianess-Problem-with-64-bit-datatype/m-p/242821#M679</guid>
      <dc:creator>karina_valencia</dc:creator>
      <dc:date>2013-08-06T15:06:58Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Endianess Problem with 64 bit datatype</title>
      <link>https://community.nxp.com/t5/Vybrid-Processors/Endianess-Problem-with-64-bit-datatype/m-p/242822#M680</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How are you printng?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have you tried to use %llu?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf("%llu", my64var);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Aug 2013 18:56:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Vybrid-Processors/Endianess-Problem-with-64-bit-datatype/m-p/242822#M680</guid>
      <dc:creator>juangutierrez</dc:creator>
      <dc:date>2013-08-06T18:56:37Z</dc:date>
    </item>
    <item>
      <title>Re: Endianess Problem with 64 bit datatype</title>
      <link>https://community.nxp.com/t5/Vybrid-Processors/Endianess-Problem-with-64-bit-datatype/m-p/242823#M681</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You data type wouldn't happen to be IEEE754 double?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Aug 2013 22:07:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Vybrid-Processors/Endianess-Problem-with-64-bit-datatype/m-p/242823#M681</guid>
      <dc:creator>jeffreycoffman</dc:creator>
      <dc:date>2013-08-06T22:07:51Z</dc:date>
    </item>
    <item>
      <title>Re: Endianess Problem with 64 bit datatype</title>
      <link>https://community.nxp.com/t5/Vybrid-Processors/Endianess-Problem-with-64-bit-datatype/m-p/242824#M682</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think the problem is printf and not the compiler. I tried this on IAR compiler and the way words are ordered is the same as in your case.&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;tst = 0x10;&lt;/P&gt;&lt;P&gt;tst = tst + 0xffffffff;&lt;/P&gt;&lt;P&gt;tst = 0x000000010000000F&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The printf I am using does not supports printing 64 bits. Please check if in your case the printf supports that size.&lt;/P&gt;&lt;P&gt;See the attached picture of my debug session and how the 64bit integer is handled correctly.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Aug 2013 00:57:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Vybrid-Processors/Endianess-Problem-with-64-bit-datatype/m-p/242824#M682</guid>
      <dc:creator>ioseph_martinez</dc:creator>
      <dc:date>2013-08-08T00:57:52Z</dc:date>
    </item>
    <item>
      <title>Re: Endianess Problem with 64 bit datatype</title>
      <link>https://community.nxp.com/t5/Vybrid-Processors/Endianess-Problem-with-64-bit-datatype/m-p/242825#M683</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;how to fix this issue in sprintf which is library function?...&lt;/P&gt;&lt;P&gt;How to get rid of this issue?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Aug 2013 03:34:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Vybrid-Processors/Endianess-Problem-with-64-bit-datatype/m-p/242825#M683</guid>
      <dc:creator>karthigeyannata</dc:creator>
      <dc:date>2013-08-16T03:34:59Z</dc:date>
    </item>
    <item>
      <title>Re: Endianess Problem with 64 bit datatype</title>
      <link>https://community.nxp.com/t5/Vybrid-Processors/Endianess-Problem-with-64-bit-datatype/m-p/242826#M684</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/ioseph_martinez"&gt;ioseph_martinez&lt;/A&gt; can you&amp;nbsp; continue with&amp;nbsp;&amp;nbsp; the follow up of this&amp;nbsp; case?&lt;/P&gt;&lt;P&gt;This is not solved yet.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Aug 2013 13:47:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Vybrid-Processors/Endianess-Problem-with-64-bit-datatype/m-p/242826#M684</guid>
      <dc:creator>karina_valencia</dc:creator>
      <dc:date>2013-08-19T13:47:08Z</dc:date>
    </item>
    <item>
      <title>Re: Endianess Problem with 64 bit datatype</title>
      <link>https://community.nxp.com/t5/Vybrid-Processors/Endianess-Problem-with-64-bit-datatype/m-p/242827#M685</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Can you please give more details on what tool chain you are using?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Are you using Linux Timesys? OS Less or MQX&lt;/P&gt;&lt;P&gt;From which vendor/where you got your gcc-compiler?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have you check for any compiler options, flags or documentation notes? Your library seems to support at some degree or may be some port from another system.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This sounds similar: &lt;A href="http://sourceware.org/ml/libc-alpha/2005-09/msg00064.html" title="http://sourceware.org/ml/libc-alpha/2005-09/msg00064.html"&gt;Andrés Moré - Re: printf of unsigned long long in ARM processors,&lt;/A&gt; please take a look. If the issue comes from gcc codesourcery they will be the best to answer.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Aug 2013 02:22:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Vybrid-Processors/Endianess-Problem-with-64-bit-datatype/m-p/242827#M685</guid>
      <dc:creator>ioseph_martinez</dc:creator>
      <dc:date>2013-08-20T02:22:09Z</dc:date>
    </item>
    <item>
      <title>Re: Endianess Problem with 64 bit datatype</title>
      <link>https://community.nxp.com/t5/Vybrid-Processors/Endianess-Problem-with-64-bit-datatype/m-p/242828#M686</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Please find the details. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;We are using MQX and using gcc compiler version 4.5.2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Could you please provide your inputs on this ASAP?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;karthi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Aug 2013 14:47:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Vybrid-Processors/Endianess-Problem-with-64-bit-datatype/m-p/242828#M686</guid>
      <dc:creator>karthigeyannata</dc:creator>
      <dc:date>2013-08-22T14:47:11Z</dc:date>
    </item>
    <item>
      <title>Re: Endianess Problem with 64 bit datatype</title>
      <link>https://community.nxp.com/t5/Vybrid-Processors/Endianess-Problem-with-64-bit-datatype/m-p/242829#M687</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Karthi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I verified this. Is working fine on my side.&lt;/P&gt;&lt;P&gt;I am using: MQX 4.0.2 Beta 1&lt;/P&gt;&lt;P&gt;Compiler: Sourcery CodeBench Lite Edition for ARM EABI from mentor graphics&lt;/P&gt;&lt;P&gt;Example: Hello&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So please do the following:&lt;/P&gt;&lt;P&gt;- download Sourcery CodeBench Lite Edition for ARM EABI from mentor graphics GCC compiler&lt;/P&gt;&lt;P&gt;- obtain from your FAE: MQX 4.0.2 Beta 1&lt;/P&gt;&lt;P&gt;- compile hello example using gcc_cs tool chain mentioned above.&lt;/P&gt;&lt;P&gt;- modify and try using long long type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let us know your results. Again, the most important step is the toolchain. If the toolchain you are using does not supports the proper printf it will fail.&lt;/P&gt;&lt;P&gt;On my side, IAR, and gcc from CodeSourcery work correctly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Ioseph&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;code:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;unsigned long long my64var;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;void hello_task&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; (&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; uint_32 initial_data&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;{&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; my64var = 0x12345UL;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf("Hello World\n");&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf("Hello World\n");&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf("%llx", my64var);&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; _task_block();&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;output:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Hello World&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Hello World&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;12345&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Aug 2013 01:46:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Vybrid-Processors/Endianess-Problem-with-64-bit-datatype/m-p/242829#M687</guid>
      <dc:creator>ioseph_martinez</dc:creator>
      <dc:date>2013-08-24T01:46:14Z</dc:date>
    </item>
  </channel>
</rss>

