Problem with AVR and sqrt mathematic function

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 5.
To post in this forum you must have a registered copy of Flowcode 5 or higher.

Moderator: Benj

Post Reply
Mathy
Posts: 333
Joined: Mon Oct 05, 2009 2:39 pm
Has thanked: 30 times
Been thanked: 33 times

Problem with AVR and sqrt mathematic function

Post 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 :)
Attachments
Flowcode1.fcf_avr
(5.5 KiB) Downloaded 248 times

Mathy
Posts: 333
Joined: Mon Oct 05, 2009 2:39 pm
Has thanked: 30 times
Been thanked: 33 times

Re: Problem with AVR and sqrt mathematic function

Post 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.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Problem with AVR and sqrt mathematic function

Post 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.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Problem with AVR and sqrt mathematic function

Post 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.

Mathy
Posts: 333
Joined: Mon Oct 05, 2009 2:39 pm
Has thanked: 30 times
Been thanked: 33 times

Re: Problem with AVR and sqrt mathematic function

Post by Mathy »

Hello :)

It works now !

Thank you for your help :)

Post Reply