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.

Build compiler library

Hello,

for a project I need a compiler library with only the following modules:

ll_div32.asm
ull_div32.asm
i_div32.asm
u_div32.asm
ll_asr_t2.asm
ll_lsr_t2.asm
ll_mul_t2.asm
memcpy_t2.asm
memset_t2.asm
strncat.c
memmov.c
memcmp.c
strcat.c
strcmp.c
strchr.c
strlen.c
strcpy.c

How can I build a compiler library with only these modules/files?

best regards,

Philip Hertweck

  • You have to build an entirely custom library.

    The source code for the entire RTS library is in the zip file rtssrc.zip, which is found in the /lib directory of the compiler installation.  I presume you know how to extract specific files from a zip file.  In this case, extract them into an empty directory.  Based on your previous posts, I presume you use the TI ARM compiler.  Run commands similar to these:

    % armcl <your options> *.c *.asm
    % armar -r custom_library.lib *.obj
    

    The first command compiles all the C and assembly files.  The second command uses the archiver to create the library.  The archiver is described in the chapter titled Archiver Description in the ARM assembly language tools manual.

    If you are using an ARM compiler older the version 5.0.x, then the names of the commands shown are different.  Replace armcl with cl470 and armar with ar470.

    Thanks and regards,

    -George

  • hello George,

    thank you for the information.

    How can I find the build option for compiler lib rtsv7A8_T_le_eabi.lib?

    Best regards,

    Philip

  • I thought of a better way to do this.  Extract the object modules you want from the RTS library supplied with the compiler, then combine them together into your custom library.  Copy the compiler RTS library into an empty directory.  Then issue commands similar to these:

    % armar -x rtsv7A8_T_le_eabi.lib <list of object file names>
    % armar -r custom_library.lib <list of object file names>
    

    Philip Hertweck said:
    How can I find the build option for compiler lib rtsv7A8_T_le_eabi.lib?

    That detail is not covered in the documentation.  You could use the library rebuild procedures described in this wiki article to rebuild that RTS library, and copy the compile commands you see executed.

    Thanks and regards,

    -George

  • Hi George,

    thank you for your information.

    Best regards,

    Philip