Forcing use of my own memcpy() function

Technical Note 17095

Arkitekturer:

Arm

Komponent:

compiler

Uppdaterad:

2016-08-19 15:56

Introduction

This Technical Note describes how to force your application to use your function for copying data.

Discussion

You want the application to use a memcpy() function that you have defined, instead of using the memcpy(), __aeabi_memcpy(), __aeabi_memcpy4() or __aeabi_memcpy8() functions from the runtime library.

There are two recommended ways to override memcpy():

  • Override the AEABI implementations __aeabi_memcpy(), __aeabi_memcpy4(), and __aeabi_memcpy8(), which are the implementations used by the compiler and libraries.
    • Template for version 8.50.9 is found here.
  • Use your own function name, for example my_memcpy().
    • Note that the library contains calls to __aeabi_memcpy(), __aeabi_memcpy4() and __aeabi_memcpy8(), which will not be replaced.

Conclusion

There might be other ways to force the use of your own memcpy(), but note that these two ways are the recommended ways of forcing the usage.

All product names are trademarks or registered trademarks of their respective owners

Det här innehållet finns tyvärr inte på svenska.

Vår webbplats finns främst på vårt koncernspråk engelska, förutom det innehåll för investerare som vi är lagstadgade att kommunicera på svenska. Vi rekommenderar att du besöker vår globala webbplats på engelska för att få en bättre upplevelse.

Vi stöder inte längre Internet Explorer. För att få bästa möjliga upplevelse av iar.com rekommenderar vi att du uppgraderar till en modern webbläsare som Chrome eller Edge.