Forcing use of my own memcpy() function

Technical Note 17095



9/7/2015 2:19 PM


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


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():

  • 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.
  • Override the AEABI implementations __aeabi_memcpy(), __aeabi_memcpy4(), and __aeabi_memcpy8(), which are the implementations used by the compiler and libraries.


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

Related Tech Notes

© IAR Systems 1995-2021 - All rights reserved.

We use cookies on this website to provide you with a better experience. You need to accept cookies to continue using this site. Cookies