Hello,
I’m trying to print a float value by assigning a task in freertos using Polarfire RISCV board, but it’s not working, I’m always getting 0.00.
Can anyone please guide me how can i configure RISCV for floating point.
I’m Using Softconsole from Microsemi.
Thanks in Advance.
Are you using the 64 or 32-bit core?
Does it have a floating point unit or are you configuring the compiler to emulate floating point?
Are you using the FreeRTOS risc-v port from the last FreeRTOS release, the head revision in our source repository, or from Microsemi - if the latter please link to the code.
If you are using a toolchain including newlib, read this:
http://www.nadler.com/embedded/newlibAndFreeRTOS.html
Hello Richard.
I’m using 32 bit core and i got the solution by changing the portBYTE_ALIGNMENT from 4 to 8 byte in portmacro.h.
is it okay with 32bit system or it may creat some problem later in future…???
Thank you.
Addition:
portBYTE_ALIGNMENT needs to be 8.
Hello Richard,
yes it has floating point and i’m using the latest release of FreeRtos.
Thank you.
The current FreeRTOS release doesn’t support hardware floating point, basically because none of the MCUs we have run the code on had a floating point unit. The port is under constant development, so we will add floating point support at some point, but for now you can set the compiler to use emulated floating point and just leave the floating point hardware disabled.
Thank you Richard…