So... I'm playing with "RVfplib - Optimized RISC-V FP emulation for 32-bit processors" (SOURCE)
I have the above compiled as a loadable module, and integrated into ESP-IDF in my IDE of choice. Was fiddly, but with MinGW I got it built.
If I drop the resulting files from above into an ESP-IDF project, the project will then happily compile and I can *MANUALLY* call functions from said library without error... but it's still not working how I would expect.
I'm having two problems...
- RVfplib is not available in the compiler options "compiler float lib source" on the SDK config.
- Performance is not different from libc when I call manually.
That is literally all the information there is about this on the ESP-IDF side of things. So, how do I actually get this option to populate and work? I have the library compiled and I can call it.... what else?CONFIG_COMPILER_FLOAT_LIB_FROM
Compiler float lib source
Found in: Compiler options
In the soft-fp part of libgcc, riscv version is written in C, and handles all edge cases in IEEE754, which makes it larger and performance is slow.
RVfplib is an optimized RISC-V library for FP arithmetic on 32-bit integer processors, for single and double-precision FP. RVfplib is “fast”, but it has a few exceptions from IEEE 754 compliance.
Available options:
- libgcc (COMPILER_FLOAT_LIB_FROM_GCCLIB)
- librvfp (COMPILER_FLOAT_LIB_FROM_RVFPLIB)