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.

TMS320F28379D: Floating Point Questions

Part Number: TMS320F28379D
Other Parts Discussed in Thread: C2000WARE

Firstly, when writing a floating point algorithm, I have been using the "float" type. I note that a lot of the TI example code uses "float32_t". What are the practical differences between a float and a float32_t when used on a floating point processor like the F28379D?

float a = 10.78;

//versus

float32_t a = 10.78;

Secondly, what additional steps are required to make use of the F28379D floating point capabilities? I have set "--float_support" to "fpu32" and "--fp_mode" to "relaxed" and it seems to work. Is there anything else that needs to be done?

This thread https://e2e.ti.com/support/microcontrollers/c2000/f/171/t/621876?TMS320F28379D-Floating-point-operations-time-profiling-question shows these additional steps:

EALLOW;
Flash0EccRegs.ECC_ENABLE.bit.ENABLE = 0;
EDIS;

FPU_initSystemClocks();

FPU_initEpie();

And the document at file:///C:/ti/c2000/C2000Ware_3_02_00_00/libraries/math/FPUfastRTS/c28/docs/FASTRTS_SW_LIB_UG.pdf seems to show a different thing entirely. Can you clear this up for me? I think I might be overcomplicating the thing by looking at documentation for different things or even things that are now obsolete.

  • Euan, float32_t is a typedef for float. Your steps are sufficient. Only other thing is to include the right run time support library (RTS). In the project's linker settings, if you include "libc.a", it will include the right RTS library (e.g. rts2800_fpu32_eabi.lib). Whatever else needs to be done is done by device_init() within C2000Ware for the specific device. The additional steps and e2e links you show are not required.

  • Thanks very much for this. Could I just ask what the reason is for typedef-ing "float" to "float_t"? Is this so that you know that any datatype with a _t after it is safe for use on your device, rather than using a C datatype that's not supported?

    Also, it looks like libc.a and RTS2800 are both included by default so I should be good to go!

  • Just for portability purposes - for example double is 32-bits in Coff format, and 64-bits in EABI format.