Floating point library for embedded application

I am developing a program for Cortex-M3. It does not have a floating point coprocessor. The Standard C library can emulate floating point operations, but I do not use it because of its size.

Is there a good and free c library that can emulate floating point arithmetic aimed at ARM processors? Currently, when I use floating point operators, I have such communication errors:

undefined reference to `__adddf3'
undefined reference to `__subdf3'
undefined reference to `__divdf3'
undefined reference to `__extendsfdf2'
undefined reference to `__muldf3'

Perhaps such a library should implement them.

+3
source share
7 answers

( ) ? , . ++, ( - C).

(, ..), ​​ .

+5

, , , , , , .

, , , , , , , . , - , , .

, , , . , , , .

+3

, . libgcc ( gcc), . , .

+1

, newlib ? , gcc .

+1

, , . .

0

gcc , gcc build voodoo (multilib, thumb, thumb2 soft float), , . gcc, . , , newlib gcc, , , ​​ . , .

0

Suppose you are using gcc try compilation with the -static-libgcc flag and checking the final binary size. I do not know if the linker will optimize unused calls, but I think it will.

0
source

Source: https://habr.com/ru/post/1731091/


All Articles