cancel
Showing results for 
Search instead for 
Did you mean: 

Does Atollic True Studio run project on FPU Mode? (STM32F401)

miracaydogan
Associate II
Posted on June 17, 2016 at 10:41

Hi guys ,

I'm not sure that my project runs on FPU with free version True Studio. I set it for FPU and Hardware implementation and all other config in my code . But when i debug the project i see that math operations codes are so long in disassembly view.

 for example;

abcd = abcd + 0.1234;  this operation's disassembly code is least 25 lines.

if i compare same code on Keil, it is 2-3 lines.

it must be short that if i use FPU.

What is wrong of TS here ??

#fpu #stm32f4
2 REPLIES 2
AvaTar
Lead
Posted on June 17, 2016 at 12:00

Can't you present the resulting assembler code ?

> abcd = abcd + 0.1234;  this operation's disassembly code is least 25 lines.

 

Even if ''

abcd

'' is a float, ''

0.1234

'' is not, thus the resulting operation is promoted to double, and cast back to float. Try ''

0.1234

f

'' instead.

miracaydogan
Associate II
Posted on June 17, 2016 at 13:39

it works !!!!!

Thank you AvaTar,

when i write '' 0.1234f ''  it worked well :*