how to Square Root function in flowcode AVR (ATMEG328P)

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

imtiaz9
Posts: 15
Joined: Sat Aug 10, 2013 7:16 am
Been thanked: 1 time
Contact:

how to Square Root function in flowcode AVR (ATMEG328P)

Postby imtiaz9 » Wed May 23, 2018 12:23 pm

Hi, in "Flowcode AVR" the Square Root function is simulate very well and give accurate result. but when compile to Hex, it give an error message.
any solution to solve this?? i'm using ATMEG328P chip...
Attachments
Main.fcf_avr
(6 KiB) Downloaded 12 times

mnf
Posts: 193
Joined: Wed May 31, 2017 11:57 am
Has thanked: 23 times
Been thanked: 88 times
Contact:

Re: how to Square Root function in flowcode AVR (ATMEG328P)

Postby mnf » Wed May 23, 2018 1:01 pm

Compiles OK for me - what version of Flowcode are you using - and what errors are you getting?

Martin
These users thanked the author mnf for the post:
Benj (Wed May 23, 2018 4:42 pm)
Rating: 5.88%
 

imtiaz9
Posts: 15
Joined: Sat Aug 10, 2013 7:16 am
Been thanked: 1 time
Contact:

Re: how to Square Root function in flowcode AVR (ATMEG328P)

Postby imtiaz9 » Thu May 24, 2018 10:42 am

Version I use is Flowcode AVR V5.3.0
Error code is here,
"Main.c:(.text+0x2bc): undefined reference to `float32_sqrt'

Error returned from [avr-gcc.exe]
Return code = 1
Flowcode was unable to compile the flowchart's C code due to the following errors:


If your flowchart contains C code, please review this carefully. If your flowchart contains no C-code or you have thoroughly reviewed the code, contact Technical Support."

mnf
Posts: 193
Joined: Wed May 31, 2017 11:57 am
Has thanked: 23 times
Been thanked: 88 times
Contact:

Re: how to Square Root function in flowcode AVR (ATMEG328P)

Postby mnf » Fri May 25, 2018 6:11 pm

- that's a job for Matrix's boffins....

I can offer a sqrt macro that will do the job in the meantime:

sqrt.fcfx
(11.22 KiB) Downloaded 8 times


The demo (main) code just displays the sqrt of 100 randomish numbers...

Martin

imtiaz9
Posts: 15
Joined: Sat Aug 10, 2013 7:16 am
Been thanked: 1 time
Contact:

Re: how to Square Root function in flowcode AVR (ATMEG328P)

Postby imtiaz9 » Sun May 27, 2018 8:00 am

now I convert my file into Flowcode 6 and it compile all OK.
thanks for replay.... :)
These users thanked the author imtiaz9 for the post:
Benj (Tue May 29, 2018 5:19 pm)
Rating: 5.88%