1850645_en-US

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

1850645_en-US

1850645_en-US

Using the memmove function provided by the libc99 library gives an error result in S32 DS USING 5744

Hi NXP experts,

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.

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 libc99.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.

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?

We are in urgent need of your help. Project is attached.

Thanks!!! 

zhaoning_0-1713524575116.png


zhaoning_1-1713524575149.png


zhaoning_2-1713524575128.png


zhaoning_3-1713524575125.png


zhaoning_4-1713524575249.png


zhaoning_5-1713524575135.png

zhaoning_6-1713524625706.png





Thanks!

Re: Using the memmove function provided by the libc99 library gives an error result in S32 DS USING

Hi, 

I already put answer to your original thread - https://community.nxp.com/t5/MPC5xxx/mpc5744-facing-a-memmove-function-bug/m-p/1850679#M2534

タグ(1)
評価なし
バージョン履歴
最終更新日:
‎11-21-2025 03:56 PM
更新者: