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.

CCS/OMAP-L138: MATHLIB vs MATHLIB_RTS

Part Number: OMAP-L138
Other Parts Discussed in Thread: MATHLIB

Tool/software: Code Composer Studio

This URL lists both "mathlib" and "mathlib_rts"

 http ://software-dl.ti.com/sdoemb/sdoemb_public_sw/mathlib/latest/index_FDS.html

(sorry for the space, this editor does strange things with URLs)

What's the difference?  How do I know which one to use?  Or am I supposed to use both? (and in what order?)

The docs talk about adding -l mathlib.lib, but don't really give any indication about the differences between the two and whether one is better  or if you're supposed to use both.

  • Also, if I replace #include <math.h> with #include <mathlib.h> I get warnings like "function 'sqrt' declared implicitly". Am I supposed to use both includes? Does order matter?
  • *ugh* and errors "identifier fabsf is undefined"
  • Hi,

    I've notified the RTOS team. They will post their feedback directly here.

    Best Regards,
    Yordan
  • Adam,

    The library by default provides MATHLIB functions (arithmetic, trignometric,log, etc) which needs application users to modify their existing code to use MATHLIB APIs. However, there is another set of users who want use MATHLIB such that the linker overrides the symbols for math functions with MATHLIB functions whereever applicable without modification to the code.

    For the second set of customers, they have to rebuild the library with OVERRIDE_RTS function and then specify the linker order such that linker looks for symbols in MATHLIB before it tries to link in the C66 RTS library rts6600.lib from the TI C6000 compiler.

    When MATHLIB overrides the RTS library, you will see divf, sqrt, log or trig functions being used from the MATHLIB instead of RTS library. Hope this clarifies the difference. Let us know if you have any further questions on this topic.

    Regards,
    Rahul