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.

ARM-CGT: Float operation on R4 or M4 core

Part Number: ARM-CGT
Other Parts Discussed in Thread: TMS570LS2124, TMS570LS1224

Hello All,

In previous follow up I was told to include the option --float_support=VFPv3D16 to have the compilation of Code on R4F, My complete options are 

'Invoking: ARM Compiler'
"E:/ti-cgt-arm_16.9.6.LTS/bin/armcl" -mv7R4 --code_state=16 --float_support=VFPv3D16 -me --include_path="E:/ti-cgt-arm_16.9.6.LTS/include" --include_path="E:/XXXX_R4" --define=PREPROC_SW_TEST_ENABLED -g --diag_warning=225 --diag_wrap=off --display_error_number --enum_type=packed --abi=eabi --preproc_with_compile --preproc_dependency="YYY/XXXXX.pp" --obj_directory="YYY" "../YYY/XXXX_R4.c"

Now I am facing problem in basic floating point operation like multiply\divide

for eg

uint64_t u40PowerInLinSum; 

float fRecipEnerLinSum,dRangeOffset, dVelocityOffset;

fRecipEnerLinSum = (float)((float)1.0 /(float)u40PowerInLinSum); //u40PowerInLinSum value is 1612388

dxxOffset = (float)si32xx * fRecipEnerLinSum; //si32xx -687948
dyyOffset = (float)si32yy * fRecipEnerLinSum; //si32yy 640046

Result of above operation is fRecipEnerLinSum is 0, dxxOffset and dyyOffset 0x20202020, I checked these result in watch and also in the memory as sometime the watch shows wrong result

All this result is resulting in junk results.

I saw during compilation I use --float_support=VFPv3D16 what is the meaning of this and will this enables the floating point operations or not?

Or I am doing something wrong

Br

Deepak Joshi