<?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 mpc5744 facing a memmove function bug in MPC5xxx</title>
    <link>https://community.nxp.com/t5/MPC5xxx/mpc5744-facing-a-memmove-function-bug/m-p/1846464#M25287</link>
    <description>&lt;P&gt;Hi NXP experts,&lt;/P&gt;&lt;P&gt;Recently we are using mpc5744 with S32 Design Studio for Power Architecture Version 2017.R1 to compile the project. Now we are facing a memmove function problem.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The project in the attachment is modified based on "hello world" and can reproduce the issue we encountered. We defined a 40-byte array of type U8 as the data source, used 0x4001268e as the data destination, called the memmove function to copy data, but found that the last 6 bytes of the destination data were not copied correctly. Upon analyzing the standard C code, we discovered that the issue might be related to the macro replacement of deref_auto_inc in __copy_long_mem.c. The memmove.o included in libc9&lt;/SPAN&gt;&lt;SPAN&gt;9.a should have enabled #define deref_auto_inc(p) *++(p), but it was incorrectly enabled as #define deref_auto_inc(p) *(p)++. We want to confirm if this issue is caused by a bug in the default lib library provided by s32DS or an default method we have usd.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="zhaoning_0-1712998982707.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/273554i6C0AB18B189C8D42/image-size/medium?v=v2&amp;amp;px=400" role="button" title="zhaoning_0-1712998982707.png" alt="zhaoning_0-1712998982707.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="zhaoning_1-1712998990493.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/273555i0CF359F9FEAB274D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="zhaoning_1-1712998990493.png" alt="zhaoning_1-1712998990493.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="zhaoning_2-1712999027531.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/273556i641269473936D904/image-size/medium?v=v2&amp;amp;px=400" role="button" title="zhaoning_2-1712999027531.png" alt="zhaoning_2-1712999027531.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="zhaoning_3-1712999034247.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/273557i1E511A2B66301541/image-size/medium?v=v2&amp;amp;px=400" role="button" title="zhaoning_3-1712999034247.png" alt="zhaoning_3-1712999034247.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="zhaoning_4-1712999116916.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/273558i4A9D8ED4D9E4B215/image-size/medium?v=v2&amp;amp;px=400" role="button" title="zhaoning_4-1712999116916.png" alt="zhaoning_4-1712999116916.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="zhaoning_5-1712999183536.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/273559i0D25F6AB00F9DC99/image-size/medium?v=v2&amp;amp;px=400" role="button" title="zhaoning_5-1712999183536.png" alt="zhaoning_5-1712999183536.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 13 Apr 2024 09:06:46 GMT</pubDate>
    <dc:creator>zhaoning</dc:creator>
    <dc:date>2024-04-13T09:06:46Z</dc:date>
    <item>
      <title>mpc5744 facing a memmove function bug</title>
      <link>https://community.nxp.com/t5/MPC5xxx/mpc5744-facing-a-memmove-function-bug/m-p/1846464#M25287</link>
      <description>&lt;P&gt;Hi NXP experts,&lt;/P&gt;&lt;P&gt;Recently we are using mpc5744 with S32 Design Studio for Power Architecture Version 2017.R1 to compile the project. Now we are facing a memmove function problem.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The project in the attachment is modified based on "hello world" and can reproduce the issue we encountered. We defined a 40-byte array of type U8 as the data source, used 0x4001268e as the data destination, called the memmove function to copy data, but found that the last 6 bytes of the destination data were not copied correctly. Upon analyzing the standard C code, we discovered that the issue might be related to the macro replacement of deref_auto_inc in __copy_long_mem.c. The memmove.o included in libc9&lt;/SPAN&gt;&lt;SPAN&gt;9.a should have enabled #define deref_auto_inc(p) *++(p), but it was incorrectly enabled as #define deref_auto_inc(p) *(p)++. We want to confirm if this issue is caused by a bug in the default lib library provided by s32DS or an default method we have usd.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="zhaoning_0-1712998982707.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/273554i6C0AB18B189C8D42/image-size/medium?v=v2&amp;amp;px=400" role="button" title="zhaoning_0-1712998982707.png" alt="zhaoning_0-1712998982707.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="zhaoning_1-1712998990493.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/273555i0CF359F9FEAB274D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="zhaoning_1-1712998990493.png" alt="zhaoning_1-1712998990493.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="zhaoning_2-1712999027531.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/273556i641269473936D904/image-size/medium?v=v2&amp;amp;px=400" role="button" title="zhaoning_2-1712999027531.png" alt="zhaoning_2-1712999027531.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="zhaoning_3-1712999034247.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/273557i1E511A2B66301541/image-size/medium?v=v2&amp;amp;px=400" role="button" title="zhaoning_3-1712999034247.png" alt="zhaoning_3-1712999034247.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="zhaoning_4-1712999116916.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/273558i4A9D8ED4D9E4B215/image-size/medium?v=v2&amp;amp;px=400" role="button" title="zhaoning_4-1712999116916.png" alt="zhaoning_4-1712999116916.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="zhaoning_5-1712999183536.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/273559i0D25F6AB00F9DC99/image-size/medium?v=v2&amp;amp;px=400" role="button" title="zhaoning_5-1712999183536.png" alt="zhaoning_5-1712999183536.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 13 Apr 2024 09:06:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/mpc5744-facing-a-memmove-function-bug/m-p/1846464#M25287</guid>
      <dc:creator>zhaoning</dc:creator>
      <dc:date>2024-04-13T09:06:46Z</dc:date>
    </item>
    <item>
      <title>Re: mpc5744 facing a memmove function bug</title>
      <link>https://community.nxp.com/t5/MPC5xxx/mpc5744-facing-a-memmove-function-bug/m-p/1846467#M25288</link>
      <description>&lt;P&gt;Project is attached, the problem is very urgent, please reply soon.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 13 Apr 2024 09:15:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/mpc5744-facing-a-memmove-function-bug/m-p/1846467#M25288</guid>
      <dc:creator>zhaoning</dc:creator>
      <dc:date>2024-04-13T09:15:01Z</dc:date>
    </item>
    <item>
      <title>Re: mpc5744 facing a memmove function bug</title>
      <link>https://community.nxp.com/t5/MPC5xxx/mpc5744-facing-a-memmove-function-bug/m-p/1846599#M25292</link>
      <description>&lt;P&gt;&lt;SPAN&gt;We also found in the map file that the memmove function is not compiled from the C source code but rather uses library functions from libc99.a. This means that we cannot solve this problem by modifying the C source code, is that correct? How should we go about resolving this issue then?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;We are in urgent need of your help.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thanks!!!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="zhaoning_0-1713145143097.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/273606iF99E84CEA8AD2658/image-size/medium?v=v2&amp;amp;px=400" role="button" title="zhaoning_0-1713145143097.png" alt="zhaoning_0-1713145143097.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Apr 2024 01:48:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/mpc5744-facing-a-memmove-function-bug/m-p/1846599#M25292</guid>
      <dc:creator>zhaoning</dc:creator>
      <dc:date>2024-04-15T01:48:16Z</dc:date>
    </item>
    <item>
      <title>Re: mpc5744 facing a memmove function bug</title>
      <link>https://community.nxp.com/t5/MPC5xxx/mpc5744-facing-a-memmove-function-bug/m-p/1848555#M25319</link>
      <description>&lt;P&gt;Can someone reply my problem?&amp;nbsp; It's really urgent.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Apr 2024 01:01:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/mpc5744-facing-a-memmove-function-bug/m-p/1848555#M25319</guid>
      <dc:creator>zhaoning</dc:creator>
      <dc:date>2024-04-17T01:01:37Z</dc:date>
    </item>
    <item>
      <title>Re: mpc5744 facing a memmove function bug</title>
      <link>https://community.nxp.com/t5/MPC5xxx/mpc5744-facing-a-memmove-function-bug/m-p/1849383#M25326</link>
      <description>&lt;P&gt;Can someone test this project? W&lt;SPAN&gt;e would like to know if the issue is due to our incorrect usage or if memmove function itself has a bug in S32DS?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;We are eagerly awaiting your response.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Apr 2024 01:23:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/mpc5744-facing-a-memmove-function-bug/m-p/1849383#M25326</guid>
      <dc:creator>zhaoning</dc:creator>
      <dc:date>2024-04-18T01:23:16Z</dc:date>
    </item>
    <item>
      <title>Re: mpc5744 facing a memmove function bug</title>
      <link>https://community.nxp.com/t5/MPC5xxx/mpc5744-facing-a-memmove-function-bug/m-p/1850664#M25341</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm looking at you project right now, I'll be back later today with more info.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Apr 2024 11:42:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/mpc5744-facing-a-memmove-function-bug/m-p/1850664#M25341</guid>
      <dc:creator>jiri_kral</dc:creator>
      <dc:date>2024-04-19T11:42:17Z</dc:date>
    </item>
    <item>
      <title>Re: mpc5744 facing a memmove function bug</title>
      <link>https://community.nxp.com/t5/MPC5xxx/mpc5744-facing-a-memmove-function-bug/m-p/1850679#M25343</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can reproduce the issue and can confirm that it is a bug in EWL C standard C library. Thanks for report!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Unfortunately S32DS for PA v2017.R1 is no more maintained and the bug will not be fixed for this S32DS version.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This bug is already fixed in S32DS for PA v2.1 and you can use this S32DS version.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you need to use S32DS PA v2017 - you have couple options. You can Switch STD C library from EWL C to NewLIB in project properties.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Other possibility is use memcpy instead of memmove, memcpy works as expected.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Apr 2024 12:18:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/mpc5744-facing-a-memmove-function-bug/m-p/1850679#M25343</guid>
      <dc:creator>jiri_kral</dc:creator>
      <dc:date>2024-04-19T12:18:29Z</dc:date>
    </item>
    <item>
      <title>Re: mpc5744 facing a memmove function bug</title>
      <link>https://community.nxp.com/t5/MPC5xxx/mpc5744-facing-a-memmove-function-bug/m-p/1851113#M25349</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Can you tell me how can I s&lt;SPAN&gt;witch STD C library from EWL C to NewLIB in project properties? Can you show me the process? Maybe some screenshots can be showed.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Apr 2024 02:49:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/mpc5744-facing-a-memmove-function-bug/m-p/1851113#M25349</guid>
      <dc:creator>zhaoning</dc:creator>
      <dc:date>2024-04-22T02:49:19Z</dc:date>
    </item>
    <item>
      <title>Re: mpc5744 facing a memmove function bug</title>
      <link>https://community.nxp.com/t5/MPC5xxx/mpc5744-facing-a-memmove-function-bug/m-p/1851155#M25350</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;right click on project name -&amp;gt; Properties -&amp;gt; C/C++ Build -&amp;gt; Settings:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jiri_kral_0-1713760849005.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/274842i7D2600F62370C107/image-size/large?v=v2&amp;amp;px=999" role="button" title="jiri_kral_0-1713760849005.png" alt="jiri_kral_0-1713760849005.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Apr 2024 04:41:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/mpc5744-facing-a-memmove-function-bug/m-p/1851155#M25350</guid>
      <dc:creator>jiri_kral</dc:creator>
      <dc:date>2024-04-22T04:41:00Z</dc:date>
    </item>
  </channel>
</rss>

