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.

FPU Instruction Library(rts) for Tiva C Series in Code Composer Studio

Hello

In my first works, I used driverlib/fpu libray for single precision floating point instructions. But It seems like instructions takes huge time than expected. For example sqrtf(float) function takes 400ns in max speed of CPU!!!

Recently I added rts library to my workspace and used __sqrtf(float) function and instruction cycles decreased so much. But multiply, divide and other instructions takes so much time. How can I enable rts library for all FPU instructions. For example I don't know how to use fabsf(float) instruction in rtc libray.

Or Do you suggest other effective libraries ?

I need your advices.

Thanks in advance

dredg

  • This is my test result.

    First transition is with 10 times sqrtf(float) instruction and second transition is 10 times __sqrtf(float) instruction.

    As you can see instruction cycles deacreases %50.

    But each instruction of __sqrtf(float) is apprx. 400ns. I think it is big time. Am I right in this case ?

  • Make sure you are using the --float_support option to enable the appropriate compiler mode for your device. Make sure you are using the optimizer. Consider using --fp_mode=relaxed. In your linker command file, link against libc.a to let the compiler choose the best RTS library to match your options.