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/TMS320F28335: What is #include "C28x_FPU_FastRTS.h" for?

Part Number: TMS320F28335
Other Parts Discussed in Thread: CONTROLSUITE

Tool/software: Code Composer Studio

Hi TI experts,

I am looking at the FastRTS example provided by ControlSuite.

C:\ti\controlSUITE\libs\math\FPUfastRTS\V100\examples_ccsv4\2833x_fastRTS

// $TI Release: FastRTS library V1.00$
// $Release Date: June 15, 2010 $

Everything works fine, and the .map file below shows that it is using FastRTS instead of normal RTS.

SECTION ALLOCATION MAP
 output                                  attributes/
section   page    origin      length       input sections
--------  ----  ----------  ----------   ----------------
codestart
*          0    00000000    00000002    
                  00000000    00000002     CodeStartBranch.obj (codestart)
.cinit     0    00008000    0000001a    
                  00008000    0000000e     rts2800_fpu32.lib : exit.c.obj (.cinit)
                  0000800e    00000005                       : _lock.c.obj (.cinit:__lock)
                  00008013    00000005                       : _lock.c.obj (.cinit:__unlock)
                  00008018    00000002     --HOLE-- [fill = 0]
FPUmathTables
*          0    003febdc    000006a0     NOLOAD SECTION
                  003febdc    000006a0     rts2800_fpu32_fast_supplement.lib : FPUmathTables.obj (FPUmathTables)
.text      0    00009000    0000030e    
                  00009000    00000134     fastRTS_sample.obj (.text)
                  00009134    00000056     rts2800_fpu32.lib : boot28.asm.obj (.text)
                  0000918a    0000004a     rts2800_fpu32_fast_supplement.lib : atan_f32.obj (.text)
                  000091d4    00000034                                       : cos_f32.obj (.text)
                  00009208    00000034                                       : sin_f32.obj (.text)
                  0000923c    00000029     rts2800_fpu32.lib : exit.c.obj (.text)
                  00009265    00000024                       : cpy_tbl.c.obj (.text)
                  00009289    00000021     rts2800_fpu32_fast_supplement.lib : sqrt_f32.obj (.text)
                  000092aa    0000001e     rts2800_fpu32.lib : memcpy.c.obj (.text)
                  000092c8    00000019                       : args_main.c.obj (.text)
                  000092e1    00000019     rts2800_fpu32_fast_supplement.lib : div_f32.obj (.text)
                  000092fa    00000009     rts2800_fpu32.lib : _lock.c.obj (.text)
                  00009303    00000008     CodeStartBranch.obj (.text)
                  0000930b    00000002     rts2800_fpu32.lib : pre_init.c.obj (.text)
                  0000930d    00000001                       : startup.c.obj (.text)
However, according to the document (C28x Floating Point Unit fastRTS Library Module User’s Guide C28x Foundation Software V1.00 SPRCA75 June 16, 2010):
"Use the same header files you would for the standard RTS library. For functions that are not part of the standard RTS library, use the included C28x_FPU_FastRTS.h header file."
So I comment out the line (#include "C28x_FPU_FastRTS.h") in the main file, and it seems it does not impact the .map file.
My questions is:
(1) If I use fastRTS for my own project, do I need to include the file (C28x_FPU_FastRTS.h)? It seems that it is not necessary?
(2) On which occasion is it necessary to include?
(3) What does the description ("Use the same header files you would for the standard RTS library. For functions that are not part of the standard RTS library, use the included C28x_FPU_FastRTS.h header file.") mean? Does it mean that if I only need sin(), cos(), tan(), and atan(), in my project, I do not need to include the file (C28x_FPU_FastRTS.h)?
  • Hi Ivan,

    "C28x_FPU_FastRTS.h" contains prototypes (not definitions) for functions not found in the standard headers like "math.h". So if you look into the C28x_FPU_FastRTS header, only two function prototypes are present i.e. "isqrt(float32 X)", "sincos(float32 radian, float32* PtrSin, float32* PtrCos)"

    Now coming to your questions :

    (1) If I use fastRTS for my own project, do I need to include the file (C28x_FPU_FastRTS.h)? It seems that it is not necessary?

    Ans : It is necessary only when you plan to use "isqrt" or "sincos" function, rest all are considered as standard math functions.

    Regards

    Himanshu