This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Compiler/AM6548: re-implement library functions(memcpy and memset)

Part Number: AM6548


Tool/software: TI C/C++ Compiler

My application is running on A53 core of AM65XX.

i want to override memcpy and memset in the application.

I found some info here but i am seeing below error while compiling

http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.faqs/ka16754.html

aarch64-elf-gcc.exe: error: unrecognized command line option '--library_interface=none'

Any help on why this issue is there and how to work it out is highly appreciated.

  • As best I can tell, the option --library_interface is not supported by any GCC ARM compiler.  The documentation for the GCC ARM compiler shipped with CCS is a PDF file with a directory location similar to ...

    C:\ti\ccs930\ccs\tools\compiler\gcc-arm-none-eabi-7-2017-q4-major-win32\share\doc\gcc-arm-none-eabi\pdf\gcc\gcc.pdf

    This manual does not document --library_interface.

    The arm-none-eabi-gcc shipped with CCS rejects --library_interface the same way your aarch64-elf-gcc rejects it.  

    I'm not sure which compiler that ARM documentation page assumes is in use.

    Thanks and regards,

    -George

  • George,

    Thanks for the response.

    SInce we can't use  --library_interface flag.

    What would be the ideal way to override library functions?

  • With TI compilers, you supply an implementation of the RTS function in the user level source files, along with all your other code.  I did a simple test with GCC, and it works the same way.  

    There must be a good reason why that ARM documentation describes that detailed method for overriding an RTS function.  But I don't know what that reason is.

    Thanks and regards,

    -George

  • George,

    Thanks for the help and taking time to look into the issue.