Page 1 of 1

Problem with AVR and sqrt mathematic function

Posted: Tue Jun 25, 2013 2:40 pm
by Mathy
Hello !

I'm trying before buy Flowcode 5 for AVR free edition.
I will need for my next project square root function on ATMEGA2560 MCU.

This MCU isn't available in the free edition but I think the problem is not here.

Impossible to compile. Is it a problem on the free edition or on the commercial licence too ?

How to solve this problem ?
Thank you for your help :)

Re: Problem with AVR and sqrt mathematic function

Posted: Wed Jun 26, 2013 1:37 pm
by Mathy
Hello :)

I tried with my Flowcode 5.5 for PIC licence and it compile well. I don't know if the computation works in the real life but it works in simulation.
So I think it is a problem with the AVR release.

Re: Problem with AVR and sqrt mathematic function

Posted: Thu Jun 27, 2013 5:07 pm
by Benj
Hello,

No there does seem to be an issue with compilation even on the pro license. I will investigate and see if it is a quick fix.

Re: Problem with AVR and sqrt mathematic function

Posted: Thu Jun 27, 2013 5:13 pm
by Benj
Adding this to the defines section of the supplementary code should resolve the issue.

#define float32_sqrt sqrt

I'll see if I can find a more elegant fix to get this bug wrapped up.

Re: Problem with AVR and sqrt mathematic function

Posted: Sun Jun 30, 2013 7:53 pm
by Mathy
Hello :)

It works now !

Thank you for your help :)