UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Observer nvl1109
Observer
168 Views
Registered: ‎06-14-2018

SDK 2018.3 Ultrascale+ MPSOC R5 FPU enable

Hi all,

I'm using SDK 2018.3 to create an application for R5 core, FreeRTOS enabled. Everything is fine except floating point calculation. 

1. I'm unable to enable -mfloat-abi=hard in extra compiler options, I tried to append -mfloat-abi=hard into extra_compiler_flags but it is removed when I re-generate the BSP. Only -mfloat-abi=soft is accepted.

Selection_005.png

2. In code, I use atof() function to convert string into float number, but it causes un-predictable behaviour in my code flow. If I comment these atof() callings, the program works fine.

 

Do anyones has expierience about this or any idea to resolve this? Thank you so much.

Tags (4)
0 Kudos
1 Reply
Xilinx Employee
Xilinx Employee
113 Views
Registered: ‎11-02-2011

Re: SDK 2018.3 Ultrascale+ MPSOC R5 FPU enable

Hello,

 

1.  -mfloat-abi=hard is already enabled in BSP settings, that we can see in your screen shot as well (under default section). 

2. Can you tell me what is the exact error that you are facing with atof() function.

I tried below example and it is working fine:

#include <stdio.h>
#include <stdlib.h>

int main()
{
char a[10] = "3.14";
float pi = atof(a);
printf("Value of pi = %f\n", pi);
return 0;
}

If possible please share your source code so that we can debug it better.

 

Thanks,

Nagaraju

0 Kudos