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.

Square Roots and Logarithms

Other Parts Discussed in Thread: TMS320F28335, CCSTUDIO

Hello,

I have been attempting to include the Fast RTS Library for my TMS320F28335 processor in Code Composer Studio 3.3, but to no avail.  Furthermore, this package does not include a natural logarithm function, which I need to use to calculate stuff for my program.

Can someone recommend a well-documented library I can include for using a sqrt() and log() function?

Thanks,

Erich

  • Hi Erich

    When you say "to no avail" can you elaborate? You can use the run time support library for natural logs and sqrt: rts2800_fpu32.lib. For CCS3.3 you can find it under C:\CCStudio_v3.3PLA\C2000\cgtools\lib. Its the standard C math lib (with floating point support) so it adheres to the calling convention set by ANSI.

     

  • Hello Vishal,

    By "to no avail" I mean adding the header and lib file, compiling, then trying to call a function resulted in the compiler not recognizing the function.. I'm missing some step in here.

    I found the rts2800_fpu32.lib file, and have added it via right clicking the library folder in CCS3.3 -> Add files to project -> selecting the library file.  It now appears under the "library" folder in my project.

    What else do I need to be able to call the sqrt(variable) function?

    Thanks,

    Erich

  • once you have the .lib in the project you have to #include <math.h> in your c code and then you can use the sqrt function. On my machine I found it under C:\CCStudio_v3.3PLA\C2000\cgtools\include. Be sure to include this path(whatever it is on your machine) in the project properties...there is a '-i' switch somewhere.

  • The -i was under Project -> Build Options -> Linker tab -> Library section.  After pointing it to the right folder and #including <math.h> I am able to use sqrt, log, etc.

    Thanks for the help!

    Erich