Questions and discussions about the software that runs on the TD RF module itself.
thomas110594
 
Posts: 6
Joined: Thu Jun 09, 2016 7:09 am

library math.h

by thomas110594 Wed Nov 09, 2016 10:15 am

Hi everyone,

I'm using a TD1204 and I want to use the math.h library. It seems that eclipse compile and generate the bin file, but nothing happened on the module.
How can I use the pow and sqrt function? Do I have to create approximative function?

Thank you
gideonBreo
 
Posts: 6
Joined: Mon Nov 21, 2016 3:43 pm

Re: library math.h

by gideonBreo Mon Nov 21, 2016 3:47 pm

Did you find any solution, I was thinking using the "arm-math.h" lib, but I still have some issues even with ARM_MATH_CM3 defined.

Regards
gideonBreo
 
Posts: 6
Joined: Mon Nov 21, 2016 3:43 pm

Re: library math.h

by gideonBreo Tue Nov 22, 2016 8:31 am

did you enable the FPU ?
User avatar
mstempin
 
Posts: 168
Joined: Thu May 07, 2015 9:24 am

Re: library math.h

by mstempin Mon Nov 28, 2016 2:19 pm

There is no FPU onboard.

I personally don't use the math functions at all in such a low-power embedded MCU, as they tend to increase considerably the firmware size, as software floating point functions are linked in.

If you are trying to use sqrt() for computing a vector norm, I suggest to try the fast inverse square root trick:
https://en.wikipedia.org/wiki/Fast_inverse_square_root
Return to Firmware

Who is online

Users browsing this forum: No registered users and 21 guests