summaryrefslogtreecommitdiff
path: root/nuttx
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx')
-rw-r--r--nuttx/ChangeLog5
-rw-r--r--nuttx/Documentation/NuttxPortingGuide.html3
-rw-r--r--nuttx/configs/README.txt1
-rw-r--r--nuttx/configs/amber/hello/defconfig1
-rwxr-xr-xnuttx/configs/avr32dev1/nsh/defconfig1
-rwxr-xr-xnuttx/configs/avr32dev1/ostest/defconfig1
-rw-r--r--nuttx/configs/c5471evm/httpd/defconfig1
-rw-r--r--nuttx/configs/c5471evm/nettest/defconfig1
-rw-r--r--nuttx/configs/c5471evm/nsh/defconfig1
-rw-r--r--nuttx/configs/c5471evm/ostest/defconfig1
-rw-r--r--nuttx/configs/compal_e88/nsh_highram/defconfig1
-rw-r--r--nuttx/configs/compal_e99/nsh_compalram/defconfig1
-rw-r--r--nuttx/configs/compal_e99/nsh_highram/defconfig1
-rwxr-xr-xnuttx/configs/demo9s12ne64/ostest/defconfig1
-rw-r--r--nuttx/configs/ea3131/nsh/defconfig1
-rw-r--r--nuttx/configs/ea3131/ostest/defconfig1
-rw-r--r--nuttx/configs/ea3131/pgnsh/defconfig1
-rw-r--r--nuttx/configs/ea3131/usbserial/defconfig1
-rw-r--r--nuttx/configs/ea3131/usbstorage/defconfig1
-rw-r--r--nuttx/configs/ea3152/ostest/defconfig1
-rw-r--r--nuttx/configs/eagle100/httpd/defconfig1
-rw-r--r--nuttx/configs/eagle100/nettest/defconfig1
-rw-r--r--nuttx/configs/eagle100/nsh/defconfig1
-rw-r--r--nuttx/configs/eagle100/nxflat/defconfig1
-rw-r--r--nuttx/configs/eagle100/ostest/defconfig1
-rw-r--r--nuttx/configs/eagle100/thttpd/defconfig1
-rw-r--r--nuttx/configs/ekk-lm3s9b96/nsh/defconfig1
-rw-r--r--nuttx/configs/ekk-lm3s9b96/ostest/defconfig1
-rw-r--r--nuttx/configs/ez80f910200kitg/ostest/defconfig1
-rw-r--r--nuttx/configs/ez80f910200zco/dhcpd/defconfig1
-rw-r--r--nuttx/configs/ez80f910200zco/httpd/defconfig1
-rw-r--r--nuttx/configs/ez80f910200zco/nettest/defconfig1
-rw-r--r--nuttx/configs/ez80f910200zco/nsh/defconfig1
-rw-r--r--nuttx/configs/ez80f910200zco/ostest/defconfig1
-rw-r--r--nuttx/configs/ez80f910200zco/poll/defconfig1
-rw-r--r--nuttx/configs/fire-stm32v2/nsh/defconfig1
-rw-r--r--nuttx/configs/hymini-stm32v/buttons/defconfig1
-rwxr-xr-xnuttx/configs/hymini-stm32v/nsh/defconfig1
-rw-r--r--nuttx/configs/hymini-stm32v/nsh2/defconfig1
-rw-r--r--nuttx/configs/hymini-stm32v/nx/defconfig1
-rw-r--r--nuttx/configs/hymini-stm32v/nxlines/defconfig1
-rwxr-xr-xnuttx/configs/hymini-stm32v/usbserial/defconfig1
-rwxr-xr-xnuttx/configs/hymini-stm32v/usbstorage/defconfig1
-rwxr-xr-xnuttx/configs/kwikstik-k40/ostest/defconfig1
-rw-r--r--nuttx/configs/lincoln60/nsh/defconfig1
-rw-r--r--nuttx/configs/lincoln60/ostest/defconfig1
-rw-r--r--nuttx/configs/lm3s6432-s2e/nsh/defconfig1
-rw-r--r--nuttx/configs/lm3s6432-s2e/ostest/defconfig1
-rwxr-xr-xnuttx/configs/lm3s6965-ek/nsh/defconfig1
-rwxr-xr-xnuttx/configs/lm3s6965-ek/nx/defconfig1
-rwxr-xr-xnuttx/configs/lm3s6965-ek/ostest/defconfig1
-rwxr-xr-xnuttx/configs/lm3s8962-ek/nsh/defconfig1
-rwxr-xr-xnuttx/configs/lm3s8962-ek/nx/defconfig1
-rwxr-xr-xnuttx/configs/lm3s8962-ek/ostest/defconfig1
-rw-r--r--nuttx/configs/lpc4330-xplorer/nsh/defconfig1
-rw-r--r--nuttx/configs/lpc4330-xplorer/ostest/defconfig1
-rwxr-xr-xnuttx/configs/lpcxpresso-lpc1768/dhcpd/defconfig1
-rwxr-xr-xnuttx/configs/lpcxpresso-lpc1768/nsh/defconfig1
-rwxr-xr-xnuttx/configs/lpcxpresso-lpc1768/nx/defconfig1
-rwxr-xr-xnuttx/configs/lpcxpresso-lpc1768/ostest/defconfig1
-rwxr-xr-xnuttx/configs/lpcxpresso-lpc1768/thttpd/defconfig1
-rwxr-xr-xnuttx/configs/lpcxpresso-lpc1768/usbstorage/defconfig1
-rw-r--r--nuttx/configs/m68332evb/defconfig1
-rw-r--r--nuttx/configs/mbed/hidkbd/defconfig1
-rwxr-xr-xnuttx/configs/mbed/nsh/defconfig1
-rw-r--r--nuttx/configs/mcu123-lpc214x/composite/defconfig1
-rw-r--r--nuttx/configs/mcu123-lpc214x/nsh/defconfig1
-rw-r--r--nuttx/configs/mcu123-lpc214x/ostest/defconfig1
-rw-r--r--nuttx/configs/mcu123-lpc214x/usbserial/defconfig1
-rw-r--r--nuttx/configs/mcu123-lpc214x/usbstorage/defconfig1
-rw-r--r--nuttx/configs/micropendous3/hello/defconfig1
-rw-r--r--nuttx/configs/mirtoo/nsh/defconfig1
-rw-r--r--nuttx/configs/mirtoo/nxffs/defconfig1
-rw-r--r--nuttx/configs/mirtoo/ostest/defconfig1
-rw-r--r--nuttx/configs/mx1ads/ostest/defconfig1
-rwxr-xr-xnuttx/configs/ne64badge/ostest/defconfig1
-rw-r--r--nuttx/configs/ntosd-dm320/nettest/defconfig1
-rw-r--r--nuttx/configs/ntosd-dm320/nsh/defconfig1
-rw-r--r--nuttx/configs/ntosd-dm320/ostest/defconfig1
-rw-r--r--nuttx/configs/ntosd-dm320/poll/defconfig1
-rw-r--r--nuttx/configs/ntosd-dm320/thttpd/defconfig1
-rw-r--r--nuttx/configs/ntosd-dm320/udp/defconfig1
-rw-r--r--nuttx/configs/ntosd-dm320/uip/defconfig1
-rwxr-xr-xnuttx/configs/nucleus2g/nsh/defconfig1
-rwxr-xr-xnuttx/configs/nucleus2g/ostest/defconfig1
-rwxr-xr-xnuttx/configs/nucleus2g/usbserial/defconfig1
-rwxr-xr-xnuttx/configs/nucleus2g/usbstorage/defconfig1
-rwxr-xr-xnuttx/configs/olimex-lpc1766stk/ftpc/defconfig1
-rwxr-xr-xnuttx/configs/olimex-lpc1766stk/hidkbd/defconfig1
-rwxr-xr-xnuttx/configs/olimex-lpc1766stk/nettest/defconfig1
-rwxr-xr-xnuttx/configs/olimex-lpc1766stk/nsh/defconfig1
-rwxr-xr-xnuttx/configs/olimex-lpc1766stk/nx/defconfig1
-rwxr-xr-xnuttx/configs/olimex-lpc1766stk/ostest/defconfig1
-rwxr-xr-xnuttx/configs/olimex-lpc1766stk/slip-httpd/defconfig1
-rwxr-xr-xnuttx/configs/olimex-lpc1766stk/thttpd/defconfig1
-rwxr-xr-xnuttx/configs/olimex-lpc1766stk/usbserial/defconfig1
-rwxr-xr-xnuttx/configs/olimex-lpc1766stk/usbstorage/defconfig1
-rwxr-xr-xnuttx/configs/olimex-lpc1766stk/wlan/defconfig1
-rwxr-xr-xnuttx/configs/olimex-lpc2378/nsh/defconfig1
-rwxr-xr-xnuttx/configs/olimex-lpc2378/ostest/defconfig1
-rw-r--r--nuttx/configs/olimex-stm32-p107/nsh/defconfig1
-rw-r--r--nuttx/configs/olimex-stm32-p107/ostest/defconfig1
-rwxr-xr-xnuttx/configs/olimex-strp711/nettest/defconfig1
-rw-r--r--nuttx/configs/olimex-strp711/nsh/defconfig1
-rw-r--r--nuttx/configs/olimex-strp711/ostest/defconfig1
-rw-r--r--nuttx/configs/pcblogic-pic32mx/nsh/defconfig1
-rw-r--r--nuttx/configs/pcblogic-pic32mx/ostest/defconfig1
-rw-r--r--nuttx/configs/pic32-starterkit/nsh/defconfig1
-rw-r--r--nuttx/configs/pic32-starterkit/nsh2/defconfig1
-rw-r--r--nuttx/configs/pic32-starterkit/ostest/defconfig1
-rw-r--r--nuttx/configs/pic32mx7mmb/nsh/defconfig1
-rw-r--r--nuttx/configs/pic32mx7mmb/ostest/defconfig1
-rw-r--r--nuttx/configs/pjrc-8051/defconfig1
-rw-r--r--nuttx/configs/qemu-i486/nsh/defconfig1
-rw-r--r--nuttx/configs/qemu-i486/ostest/defconfig1
-rw-r--r--nuttx/configs/rgmp/arm/default/defconfig1
-rw-r--r--nuttx/configs/rgmp/arm/nsh/defconfig1
-rw-r--r--nuttx/configs/rgmp/x86/default/defconfig1
-rw-r--r--nuttx/configs/rgmp/x86/nsh/defconfig1
-rwxr-xr-xnuttx/configs/sam3u-ek/knsh/defconfig1
-rwxr-xr-xnuttx/configs/sam3u-ek/nsh/defconfig1
-rwxr-xr-xnuttx/configs/sam3u-ek/nx/defconfig1
-rwxr-xr-xnuttx/configs/sam3u-ek/ostest/defconfig1
-rwxr-xr-xnuttx/configs/sam3u-ek/touchscreen/defconfig1
-rw-r--r--nuttx/configs/shenzhou/nsh/defconfig1
-rw-r--r--nuttx/configs/shenzhou/nxwm/defconfig1
-rw-r--r--nuttx/configs/shenzhou/thttpd/defconfig1
-rw-r--r--nuttx/configs/sim/mount/defconfig1
-rw-r--r--nuttx/configs/sim/nettest/defconfig1
-rw-r--r--nuttx/configs/sim/nsh/defconfig1
-rw-r--r--nuttx/configs/sim/nsh2/defconfig1
-rw-r--r--nuttx/configs/sim/nx/defconfig1
-rw-r--r--nuttx/configs/sim/nx11/defconfig1
-rw-r--r--nuttx/configs/sim/nxffs/defconfig1
-rw-r--r--nuttx/configs/sim/nxwm/defconfig1
-rw-r--r--nuttx/configs/sim/ostest/defconfig1
-rw-r--r--nuttx/configs/sim/pashello/defconfig1
-rw-r--r--nuttx/configs/sim/touchscreen/defconfig1
-rw-r--r--nuttx/configs/skp16c26/ostest/defconfig1
-rwxr-xr-xnuttx/configs/stm3210e-eval/RIDE/defconfig1
-rw-r--r--nuttx/configs/stm3210e-eval/buttons/defconfig1
-rwxr-xr-xnuttx/configs/stm3210e-eval/composite/defconfig1
-rwxr-xr-xnuttx/configs/stm3210e-eval/nsh/defconfig1
-rw-r--r--nuttx/configs/stm3210e-eval/nsh2/defconfig1
-rw-r--r--nuttx/configs/stm3210e-eval/nx/defconfig1
-rw-r--r--nuttx/configs/stm3210e-eval/nxconsole/defconfig1
-rw-r--r--nuttx/configs/stm3210e-eval/nxlines/defconfig1
-rw-r--r--nuttx/configs/stm3210e-eval/nxtext/defconfig1
-rwxr-xr-xnuttx/configs/stm3210e-eval/ostest/defconfig1
-rw-r--r--nuttx/configs/stm3210e-eval/pm/defconfig1
-rwxr-xr-xnuttx/configs/stm3210e-eval/usbserial/defconfig1
-rwxr-xr-xnuttx/configs/stm3210e-eval/usbstorage/defconfig1
-rw-r--r--nuttx/configs/stm3220g-eval/dhcpd/defconfig1
-rw-r--r--nuttx/configs/stm3220g-eval/nettest/defconfig1
-rw-r--r--nuttx/configs/stm3220g-eval/nsh/defconfig1
-rw-r--r--nuttx/configs/stm3220g-eval/nsh2/defconfig1
-rw-r--r--nuttx/configs/stm3220g-eval/nxwm/defconfig1
-rw-r--r--nuttx/configs/stm3220g-eval/ostest/defconfig1
-rw-r--r--nuttx/configs/stm3220g-eval/telnetd/defconfig1
-rw-r--r--nuttx/configs/stm3240g-eval/dhcpd/defconfig1
-rw-r--r--nuttx/configs/stm3240g-eval/discover/defconfig1
-rw-r--r--nuttx/configs/stm3240g-eval/nettest/defconfig1
-rw-r--r--nuttx/configs/stm3240g-eval/nsh/defconfig1
-rw-r--r--nuttx/configs/stm3240g-eval/nsh2/defconfig1
-rw-r--r--nuttx/configs/stm3240g-eval/nxconsole/defconfig1
-rw-r--r--nuttx/configs/stm3240g-eval/nxwm/defconfig1
-rw-r--r--nuttx/configs/stm3240g-eval/ostest/defconfig1
-rw-r--r--nuttx/configs/stm3240g-eval/telnetd/defconfig1
-rw-r--r--nuttx/configs/stm3240g-eval/webserver/defconfig1
-rw-r--r--nuttx/configs/stm3240g-eval/xmlrpc/defconfig1
-rw-r--r--nuttx/configs/stm32f4discovery/elf/defconfig1
-rw-r--r--nuttx/configs/stm32f4discovery/nsh/defconfig1
-rw-r--r--nuttx/configs/stm32f4discovery/nxlines/defconfig1
-rw-r--r--nuttx/configs/stm32f4discovery/ostest/defconfig1
-rw-r--r--nuttx/configs/stm32f4discovery/pm/defconfig1
-rw-r--r--nuttx/configs/sure-pic32mx/nsh/defconfig1
-rw-r--r--nuttx/configs/sure-pic32mx/ostest/defconfig1
-rw-r--r--nuttx/configs/sure-pic32mx/usbnsh/defconfig1
-rw-r--r--nuttx/configs/teensy/hello/defconfig1
-rwxr-xr-xnuttx/configs/teensy/nsh/defconfig1
-rwxr-xr-xnuttx/configs/teensy/usbstorage/defconfig1
-rw-r--r--nuttx/configs/twr-k60n512/nsh/defconfig1
-rw-r--r--nuttx/configs/twr-k60n512/ostest/defconfig1
-rw-r--r--nuttx/configs/ubw32/nsh/defconfig1
-rw-r--r--nuttx/configs/ubw32/ostest/defconfig1
-rw-r--r--nuttx/configs/us7032evb1/nsh/defconfig1
-rw-r--r--nuttx/configs/us7032evb1/ostest/defconfig1
-rwxr-xr-xnuttx/configs/vsn/nsh/defconfig1
-rw-r--r--nuttx/configs/xtrs/nsh/defconfig1
-rw-r--r--nuttx/configs/xtrs/ostest/defconfig1
-rw-r--r--nuttx/configs/xtrs/pashello/defconfig1
-rw-r--r--nuttx/configs/z16f2800100zcog/ostest/defconfig1
-rw-r--r--nuttx/configs/z16f2800100zcog/pashello/defconfig1
-rw-r--r--nuttx/configs/z80sim/nsh/defconfig1
-rw-r--r--nuttx/configs/z80sim/ostest/defconfig1
-rw-r--r--nuttx/configs/z80sim/pashello/defconfig1
-rw-r--r--nuttx/configs/z8encore000zco/ostest/defconfig1
-rw-r--r--nuttx/configs/z8f64200100kit/ostest/defconfig1
-rw-r--r--nuttx/lib/Kconfig23
-rw-r--r--nuttx/lib/Makefile2
-rw-r--r--nuttx/lib/README.txt3
-rw-r--r--nuttx/lib/fixedmath/Make.defs43
-rw-r--r--nuttx/lib/fixedmath/lib_b16atan2.c (renamed from nuttx/lib/math/lib_b16atan2.c)2
-rw-r--r--nuttx/lib/fixedmath/lib_b16cos.c (renamed from nuttx/lib/math/lib_b16cos.c)2
-rw-r--r--nuttx/lib/fixedmath/lib_b16sin.c (renamed from nuttx/lib/math/lib_b16sin.c)2
-rw-r--r--nuttx/lib/fixedmath/lib_fixedmath.c (renamed from nuttx/lib/math/lib_fixedmath.c)0
-rw-r--r--nuttx/lib/fixedmath/lib_rint.c (renamed from nuttx/lib/math/lib_rint.c)2
-rw-r--r--nuttx/lib/math/Kconfig4
-rw-r--r--nuttx/lib/math/Make.defs14
-rw-r--r--nuttx/lib/math/Makefile100
-rw-r--r--nuttx/lib/math/lib_acos.c30
-rw-r--r--nuttx/lib/math/lib_asin.c88
-rw-r--r--nuttx/lib/math/lib_atan.c32
-rw-r--r--nuttx/lib/math/lib_atan2.c120
-rw-r--r--nuttx/lib/math/lib_ceil.c37
-rw-r--r--nuttx/lib/math/lib_cos.c31
-rw-r--r--nuttx/lib/math/lib_cosh.c33
-rw-r--r--nuttx/lib/math/lib_exp.c253
-rw-r--r--nuttx/lib/math/lib_fabs.c30
-rw-r--r--nuttx/lib/math/lib_floor.c37
-rw-r--r--nuttx/lib/math/lib_fmod.c67
-rw-r--r--nuttx/lib/math/lib_frexp.c34
-rw-r--r--nuttx/lib/math/lib_ldexp.c31
-rw-r--r--nuttx/lib/math/lib_log.c113
-rw-r--r--nuttx/lib/math/lib_log10.c30
-rw-r--r--nuttx/lib/math/lib_log2.c30
-rw-r--r--nuttx/lib/math/lib_modf.c65
-rw-r--r--nuttx/lib/math/lib_pow.c30
-rw-r--r--nuttx/lib/math/lib_sin.c152
-rw-r--r--nuttx/lib/math/lib_sinh.c33
-rw-r--r--nuttx/lib/math/lib_sqrt.c116
-rw-r--r--nuttx/lib/math/lib_tan.c31
-rw-r--r--nuttx/lib/math/lib_tanh.c39
233 files changed, 1649 insertions, 214 deletions
diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog
index 3b39eabb4..918cd8608 100644
--- a/nuttx/ChangeLog
+++ b/nuttx/ChangeLog
@@ -3525,4 +3525,7 @@
* binfmt/libelf: The basic ELF module execution appears fully functional.
* configs/shenzhou/src/up_relays.c: Add support for relays from the
Shenzhou board. Contributed by Darcy Gong.
-
+ * lib/fixedmath: Moved the old lib/math to lib/fixedmath to make room for
+ the math library from the Rhombus OS
+ * lib/math: Now contains the math library from the Rhombus OS by Nick Johnson
+ (submitted by Darcy Gong).
diff --git a/nuttx/Documentation/NuttxPortingGuide.html b/nuttx/Documentation/NuttxPortingGuide.html
index d8ccfc340..96c301295 100644
--- a/nuttx/Documentation/NuttxPortingGuide.html
+++ b/nuttx/Documentation/NuttxPortingGuide.html
@@ -3719,9 +3719,6 @@ void (*notify)(FAR struct pm_callback_s *cb, enum pm_state_e pmstate);
Make a raw binary format file used with many different loaders using the GNU objcopy program.
This option should not be selected if you are not using the GNU toolchain.
</li>
- <li><code>CONFIG_HAVE_LIBM</code>:
- Toolchain supports libm.a
- </li>
<li><code>CONFIG_HAVE_CXX</code>:
Toolchain supports C++ and <code>CXX</code>, <code>CXXFLAGS</code>, and <code>COMPILEXX</code>
have been defined in the configurations <code>Make.defs</code> file.
diff --git a/nuttx/configs/README.txt b/nuttx/configs/README.txt
index c7f3db0e7..4f96dc325 100644
--- a/nuttx/configs/README.txt
+++ b/nuttx/configs/README.txt
@@ -171,7 +171,6 @@ defconfig -- This is a configuration file similar to the Linux
CONFIG_RAW_BINARY - make a raw binary format file used with many
different loaders using the GNU objcopy program. This option
should not be selected if you are not using the GNU toolchain.
- CONFIG_HAVE_LIBM - toolchain supports libm.a
CONFIG_HAVE_CXX - toolchain supports C++ and CXX, CXXFLAGS, and
COMPILEXX have been defined in the configurations Make.defs
file.
diff --git a/nuttx/configs/amber/hello/defconfig b/nuttx/configs/amber/hello/defconfig
index fece8db36..243927910 100644
--- a/nuttx/configs/amber/hello/defconfig
+++ b/nuttx/configs/amber/hello/defconfig
@@ -110,7 +110,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/avr32dev1/nsh/defconfig b/nuttx/configs/avr32dev1/nsh/defconfig
index 7e75380c0..3ca2fac38 100755
--- a/nuttx/configs/avr32dev1/nsh/defconfig
+++ b/nuttx/configs/avr32dev1/nsh/defconfig
@@ -136,7 +136,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/avr32dev1/ostest/defconfig b/nuttx/configs/avr32dev1/ostest/defconfig
index b70cbb6af..ed7280dc6 100755
--- a/nuttx/configs/avr32dev1/ostest/defconfig
+++ b/nuttx/configs/avr32dev1/ostest/defconfig
@@ -136,7 +136,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/c5471evm/httpd/defconfig b/nuttx/configs/c5471evm/httpd/defconfig
index 372fb330f..52a0fc4bb 100644
--- a/nuttx/configs/c5471evm/httpd/defconfig
+++ b/nuttx/configs/c5471evm/httpd/defconfig
@@ -86,7 +86,6 @@ CONFIG_NET_C5471_BASET10=n
CONFIG_RRLOAD_BINARY=y
CONFIG_INTELHEX_BINARY=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/c5471evm/nettest/defconfig b/nuttx/configs/c5471evm/nettest/defconfig
index 179b4c185..6da9fa522 100644
--- a/nuttx/configs/c5471evm/nettest/defconfig
+++ b/nuttx/configs/c5471evm/nettest/defconfig
@@ -57,7 +57,6 @@ CONFIG_DRAM_SIZE=285212672
CONFIG_RRLOAD_BINARY=y
CONFIG_INTELHEX_BINARY=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# C5471 specific device driver settings
diff --git a/nuttx/configs/c5471evm/nsh/defconfig b/nuttx/configs/c5471evm/nsh/defconfig
index 5746f833a..6b583d31a 100644
--- a/nuttx/configs/c5471evm/nsh/defconfig
+++ b/nuttx/configs/c5471evm/nsh/defconfig
@@ -86,7 +86,6 @@ CONFIG_NET_C5471_BASET10=n
CONFIG_RRLOAD_BINARY=y
CONFIG_INTELHEX_BINARY=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/c5471evm/ostest/defconfig b/nuttx/configs/c5471evm/ostest/defconfig
index e0c6297c1..04ac9677f 100644
--- a/nuttx/configs/c5471evm/ostest/defconfig
+++ b/nuttx/configs/c5471evm/ostest/defconfig
@@ -86,7 +86,6 @@ CONFIG_NET_C5471_BASET10=n
CONFIG_RRLOAD_BINARY=y
CONFIG_INTELHEX_BINARY=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/compal_e88/nsh_highram/defconfig b/nuttx/configs/compal_e88/nsh_highram/defconfig
index 3cf0af629..b429af696 100644
--- a/nuttx/configs/compal_e88/nsh_highram/defconfig
+++ b/nuttx/configs/compal_e88/nsh_highram/defconfig
@@ -88,7 +88,6 @@ CONFIG_NET_C5471_BASET10=n
CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_RAW_BINARY=y
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/compal_e99/nsh_compalram/defconfig b/nuttx/configs/compal_e99/nsh_compalram/defconfig
index f9bf23af6..52f99bf12 100644
--- a/nuttx/configs/compal_e99/nsh_compalram/defconfig
+++ b/nuttx/configs/compal_e99/nsh_compalram/defconfig
@@ -91,7 +91,6 @@ CONFIG_NET_C5471_BASET10=n
CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_RAW_BINARY=y
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/compal_e99/nsh_highram/defconfig b/nuttx/configs/compal_e99/nsh_highram/defconfig
index f5323c664..b1539c98c 100644
--- a/nuttx/configs/compal_e99/nsh_highram/defconfig
+++ b/nuttx/configs/compal_e99/nsh_highram/defconfig
@@ -91,7 +91,6 @@ CONFIG_NET_C5471_BASET10=n
CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_RAW_BINARY=y
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/demo9s12ne64/ostest/defconfig b/nuttx/configs/demo9s12ne64/ostest/defconfig
index a45fc7e47..5033d8201 100755
--- a/nuttx/configs/demo9s12ne64/ostest/defconfig
+++ b/nuttx/configs/demo9s12ne64/ostest/defconfig
@@ -102,7 +102,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_MOTOROLA_SREC=y
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# Setup for a two-pass build
diff --git a/nuttx/configs/ea3131/nsh/defconfig b/nuttx/configs/ea3131/nsh/defconfig
index 38caf93aa..c97f521a5 100644
--- a/nuttx/configs/ea3131/nsh/defconfig
+++ b/nuttx/configs/ea3131/nsh/defconfig
@@ -109,7 +109,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=y
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/ea3131/ostest/defconfig b/nuttx/configs/ea3131/ostest/defconfig
index abc2c8ba5..c66ee51a4 100644
--- a/nuttx/configs/ea3131/ostest/defconfig
+++ b/nuttx/configs/ea3131/ostest/defconfig
@@ -109,7 +109,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=y
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/ea3131/pgnsh/defconfig b/nuttx/configs/ea3131/pgnsh/defconfig
index f03432e8d..c9e096358 100644
--- a/nuttx/configs/ea3131/pgnsh/defconfig
+++ b/nuttx/configs/ea3131/pgnsh/defconfig
@@ -114,7 +114,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=y
-CONFIG_HAVE_LIBM=n
#
# Setup for a two-pass build
diff --git a/nuttx/configs/ea3131/usbserial/defconfig b/nuttx/configs/ea3131/usbserial/defconfig
index 3314de254..1e8f5cf94 100644
--- a/nuttx/configs/ea3131/usbserial/defconfig
+++ b/nuttx/configs/ea3131/usbserial/defconfig
@@ -109,7 +109,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=y
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/ea3131/usbstorage/defconfig b/nuttx/configs/ea3131/usbstorage/defconfig
index a857523df..d8088b5df 100644
--- a/nuttx/configs/ea3131/usbstorage/defconfig
+++ b/nuttx/configs/ea3131/usbstorage/defconfig
@@ -109,7 +109,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=y
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/ea3152/ostest/defconfig b/nuttx/configs/ea3152/ostest/defconfig
index 5b7b5b59d..34cf49dfb 100644
--- a/nuttx/configs/ea3152/ostest/defconfig
+++ b/nuttx/configs/ea3152/ostest/defconfig
@@ -109,7 +109,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=y
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/eagle100/httpd/defconfig b/nuttx/configs/eagle100/httpd/defconfig
index 7c47f4467..7916569bc 100644
--- a/nuttx/configs/eagle100/httpd/defconfig
+++ b/nuttx/configs/eagle100/httpd/defconfig
@@ -115,7 +115,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=y
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/eagle100/nettest/defconfig b/nuttx/configs/eagle100/nettest/defconfig
index 4f2721045..6f4795386 100644
--- a/nuttx/configs/eagle100/nettest/defconfig
+++ b/nuttx/configs/eagle100/nettest/defconfig
@@ -115,7 +115,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=y
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/eagle100/nsh/defconfig b/nuttx/configs/eagle100/nsh/defconfig
index 4848e957b..b50413db0 100644
--- a/nuttx/configs/eagle100/nsh/defconfig
+++ b/nuttx/configs/eagle100/nsh/defconfig
@@ -115,7 +115,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=y
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/eagle100/nxflat/defconfig b/nuttx/configs/eagle100/nxflat/defconfig
index 01931b0d3..98029ddd8 100644
--- a/nuttx/configs/eagle100/nxflat/defconfig
+++ b/nuttx/configs/eagle100/nxflat/defconfig
@@ -115,7 +115,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=y
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/eagle100/ostest/defconfig b/nuttx/configs/eagle100/ostest/defconfig
index 13a316ca4..f3634aa55 100644
--- a/nuttx/configs/eagle100/ostest/defconfig
+++ b/nuttx/configs/eagle100/ostest/defconfig
@@ -115,7 +115,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=y
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/eagle100/thttpd/defconfig b/nuttx/configs/eagle100/thttpd/defconfig
index 412a89e9c..d68d51acf 100644
--- a/nuttx/configs/eagle100/thttpd/defconfig
+++ b/nuttx/configs/eagle100/thttpd/defconfig
@@ -115,7 +115,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=y
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/ekk-lm3s9b96/nsh/defconfig b/nuttx/configs/ekk-lm3s9b96/nsh/defconfig
index 11407295f..2a1a0552d 100644
--- a/nuttx/configs/ekk-lm3s9b96/nsh/defconfig
+++ b/nuttx/configs/ekk-lm3s9b96/nsh/defconfig
@@ -132,7 +132,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=y
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/ekk-lm3s9b96/ostest/defconfig b/nuttx/configs/ekk-lm3s9b96/ostest/defconfig
index 734ad031e..c465cb8b7 100644
--- a/nuttx/configs/ekk-lm3s9b96/ostest/defconfig
+++ b/nuttx/configs/ekk-lm3s9b96/ostest/defconfig
@@ -132,7 +132,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=y
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/ez80f910200kitg/ostest/defconfig b/nuttx/configs/ez80f910200kitg/ostest/defconfig
index 22b627542..9ceb261b2 100644
--- a/nuttx/configs/ez80f910200kitg/ostest/defconfig
+++ b/nuttx/configs/ez80f910200kitg/ostest/defconfig
@@ -94,7 +94,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/ez80f910200zco/dhcpd/defconfig b/nuttx/configs/ez80f910200zco/dhcpd/defconfig
index ea9844dc2..a20e86a45 100644
--- a/nuttx/configs/ez80f910200zco/dhcpd/defconfig
+++ b/nuttx/configs/ez80f910200zco/dhcpd/defconfig
@@ -97,7 +97,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/ez80f910200zco/httpd/defconfig b/nuttx/configs/ez80f910200zco/httpd/defconfig
index ddf34285a..cccecf2bf 100644
--- a/nuttx/configs/ez80f910200zco/httpd/defconfig
+++ b/nuttx/configs/ez80f910200zco/httpd/defconfig
@@ -97,7 +97,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/ez80f910200zco/nettest/defconfig b/nuttx/configs/ez80f910200zco/nettest/defconfig
index 7b1415bf4..e018164b0 100644
--- a/nuttx/configs/ez80f910200zco/nettest/defconfig
+++ b/nuttx/configs/ez80f910200zco/nettest/defconfig
@@ -97,7 +97,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/ez80f910200zco/nsh/defconfig b/nuttx/configs/ez80f910200zco/nsh/defconfig
index fa701253d..34fbe603d 100644
--- a/nuttx/configs/ez80f910200zco/nsh/defconfig
+++ b/nuttx/configs/ez80f910200zco/nsh/defconfig
@@ -97,7 +97,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/ez80f910200zco/ostest/defconfig b/nuttx/configs/ez80f910200zco/ostest/defconfig
index f16ddee39..1954b7a5d 100644
--- a/nuttx/configs/ez80f910200zco/ostest/defconfig
+++ b/nuttx/configs/ez80f910200zco/ostest/defconfig
@@ -96,7 +96,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/ez80f910200zco/poll/defconfig b/nuttx/configs/ez80f910200zco/poll/defconfig
index 6ad505dc5..a98526466 100644
--- a/nuttx/configs/ez80f910200zco/poll/defconfig
+++ b/nuttx/configs/ez80f910200zco/poll/defconfig
@@ -97,7 +97,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/fire-stm32v2/nsh/defconfig b/nuttx/configs/fire-stm32v2/nsh/defconfig
index 5edde6ed1..f126c51fd 100644
--- a/nuttx/configs/fire-stm32v2/nsh/defconfig
+++ b/nuttx/configs/fire-stm32v2/nsh/defconfig
@@ -509,7 +509,6 @@ CONFIG_STDIO_BUFFER_SIZE=256
CONFIG_STDIO_LINEBUFFER=y
CONFIG_NUNGET_CHARS=2
CONFIG_LIB_HOMEDIR="/"
-# CONFIG_HAVE_LIBM is not set
# CONFIG_NOPRINTF_FIELDWIDTH is not set
# CONFIG_LIBC_FLOATINGPOINT is not set
# CONFIG_EOL_IS_CR is not set
diff --git a/nuttx/configs/hymini-stm32v/buttons/defconfig b/nuttx/configs/hymini-stm32v/buttons/defconfig
index 44dcf3c41..8ee2c1d76 100644
--- a/nuttx/configs/hymini-stm32v/buttons/defconfig
+++ b/nuttx/configs/hymini-stm32v/buttons/defconfig
@@ -162,7 +162,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/hymini-stm32v/nsh/defconfig b/nuttx/configs/hymini-stm32v/nsh/defconfig
index 52da9f6f6..f18194bce 100755
--- a/nuttx/configs/hymini-stm32v/nsh/defconfig
+++ b/nuttx/configs/hymini-stm32v/nsh/defconfig
@@ -160,7 +160,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=y
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/hymini-stm32v/nsh2/defconfig b/nuttx/configs/hymini-stm32v/nsh2/defconfig
index fbd9d23b3..b11895c9b 100644
--- a/nuttx/configs/hymini-stm32v/nsh2/defconfig
+++ b/nuttx/configs/hymini-stm32v/nsh2/defconfig
@@ -165,7 +165,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=y
-CONFIG_HAVE_LIBM=n
CONFIG_RTC=y
diff --git a/nuttx/configs/hymini-stm32v/nx/defconfig b/nuttx/configs/hymini-stm32v/nx/defconfig
index e411baf83..b46c68e29 100644
--- a/nuttx/configs/hymini-stm32v/nx/defconfig
+++ b/nuttx/configs/hymini-stm32v/nx/defconfig
@@ -160,7 +160,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/hymini-stm32v/nxlines/defconfig b/nuttx/configs/hymini-stm32v/nxlines/defconfig
index 689b17376..863e7a327 100644
--- a/nuttx/configs/hymini-stm32v/nxlines/defconfig
+++ b/nuttx/configs/hymini-stm32v/nxlines/defconfig
@@ -164,7 +164,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/hymini-stm32v/usbserial/defconfig b/nuttx/configs/hymini-stm32v/usbserial/defconfig
index 7883db827..a6ed06dee 100755
--- a/nuttx/configs/hymini-stm32v/usbserial/defconfig
+++ b/nuttx/configs/hymini-stm32v/usbserial/defconfig
@@ -162,7 +162,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=y
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/hymini-stm32v/usbstorage/defconfig b/nuttx/configs/hymini-stm32v/usbstorage/defconfig
index c3434e3a4..7d75577fe 100755
--- a/nuttx/configs/hymini-stm32v/usbstorage/defconfig
+++ b/nuttx/configs/hymini-stm32v/usbstorage/defconfig
@@ -161,7 +161,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=y
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/kwikstik-k40/ostest/defconfig b/nuttx/configs/kwikstik-k40/ostest/defconfig
index 2cf29894b..a811ee063 100755
--- a/nuttx/configs/kwikstik-k40/ostest/defconfig
+++ b/nuttx/configs/kwikstik-k40/ostest/defconfig
@@ -172,7 +172,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/lincoln60/nsh/defconfig b/nuttx/configs/lincoln60/nsh/defconfig
index 43944f0a6..bb08a7dec 100644
--- a/nuttx/configs/lincoln60/nsh/defconfig
+++ b/nuttx/configs/lincoln60/nsh/defconfig
@@ -149,7 +149,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=y
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/lincoln60/ostest/defconfig b/nuttx/configs/lincoln60/ostest/defconfig
index 6dd51eb07..0576d018f 100644
--- a/nuttx/configs/lincoln60/ostest/defconfig
+++ b/nuttx/configs/lincoln60/ostest/defconfig
@@ -155,7 +155,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/lm3s6432-s2e/nsh/defconfig b/nuttx/configs/lm3s6432-s2e/nsh/defconfig
index f0cf503ef..d203b2954 100644
--- a/nuttx/configs/lm3s6432-s2e/nsh/defconfig
+++ b/nuttx/configs/lm3s6432-s2e/nsh/defconfig
@@ -131,7 +131,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=y
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/lm3s6432-s2e/ostest/defconfig b/nuttx/configs/lm3s6432-s2e/ostest/defconfig
index daeac0177..02b7dbd31 100644
--- a/nuttx/configs/lm3s6432-s2e/ostest/defconfig
+++ b/nuttx/configs/lm3s6432-s2e/ostest/defconfig
@@ -131,7 +131,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=y
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/lm3s6965-ek/nsh/defconfig b/nuttx/configs/lm3s6965-ek/nsh/defconfig
index 2771a3dc9..5afac6e6f 100755
--- a/nuttx/configs/lm3s6965-ek/nsh/defconfig
+++ b/nuttx/configs/lm3s6965-ek/nsh/defconfig
@@ -132,7 +132,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=y
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/lm3s6965-ek/nx/defconfig b/nuttx/configs/lm3s6965-ek/nx/defconfig
index 83b338161..b6cb0cad5 100755
--- a/nuttx/configs/lm3s6965-ek/nx/defconfig
+++ b/nuttx/configs/lm3s6965-ek/nx/defconfig
@@ -132,7 +132,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=y
-CONFIG_HAVE_LIBM=n
#
# General SPI interface configuration
diff --git a/nuttx/configs/lm3s6965-ek/ostest/defconfig b/nuttx/configs/lm3s6965-ek/ostest/defconfig
index 0bfe9ef72..da35e5531 100755
--- a/nuttx/configs/lm3s6965-ek/ostest/defconfig
+++ b/nuttx/configs/lm3s6965-ek/ostest/defconfig
@@ -132,7 +132,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=y
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/lm3s8962-ek/nsh/defconfig b/nuttx/configs/lm3s8962-ek/nsh/defconfig
index 001a87387..2a80e84e7 100755
--- a/nuttx/configs/lm3s8962-ek/nsh/defconfig
+++ b/nuttx/configs/lm3s8962-ek/nsh/defconfig
@@ -131,7 +131,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=y
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/lm3s8962-ek/nx/defconfig b/nuttx/configs/lm3s8962-ek/nx/defconfig
index dbae4b2aa..51063f755 100755
--- a/nuttx/configs/lm3s8962-ek/nx/defconfig
+++ b/nuttx/configs/lm3s8962-ek/nx/defconfig
@@ -131,7 +131,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=y
-CONFIG_HAVE_LIBM=n
#
# General SPI interface configuration
diff --git a/nuttx/configs/lm3s8962-ek/ostest/defconfig b/nuttx/configs/lm3s8962-ek/ostest/defconfig
index aeb0a1ecf..c540b1d7f 100755
--- a/nuttx/configs/lm3s8962-ek/ostest/defconfig
+++ b/nuttx/configs/lm3s8962-ek/ostest/defconfig
@@ -131,7 +131,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=y
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/lpc4330-xplorer/nsh/defconfig b/nuttx/configs/lpc4330-xplorer/nsh/defconfig
index e4269ea67..a97b9f789 100644
--- a/nuttx/configs/lpc4330-xplorer/nsh/defconfig
+++ b/nuttx/configs/lpc4330-xplorer/nsh/defconfig
@@ -191,7 +191,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=y
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/lpc4330-xplorer/ostest/defconfig b/nuttx/configs/lpc4330-xplorer/ostest/defconfig
index d5ac58ef1..cddf7d0e8 100644
--- a/nuttx/configs/lpc4330-xplorer/ostest/defconfig
+++ b/nuttx/configs/lpc4330-xplorer/ostest/defconfig
@@ -189,7 +189,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=y
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/lpcxpresso-lpc1768/dhcpd/defconfig b/nuttx/configs/lpcxpresso-lpc1768/dhcpd/defconfig
index 01c54fa9f..92aa13f7b 100755
--- a/nuttx/configs/lpcxpresso-lpc1768/dhcpd/defconfig
+++ b/nuttx/configs/lpcxpresso-lpc1768/dhcpd/defconfig
@@ -154,7 +154,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/lpcxpresso-lpc1768/nsh/defconfig b/nuttx/configs/lpcxpresso-lpc1768/nsh/defconfig
index 6d0be8400..0e149e186 100755
--- a/nuttx/configs/lpcxpresso-lpc1768/nsh/defconfig
+++ b/nuttx/configs/lpcxpresso-lpc1768/nsh/defconfig
@@ -157,7 +157,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/lpcxpresso-lpc1768/nx/defconfig b/nuttx/configs/lpcxpresso-lpc1768/nx/defconfig
index a94571a83..88a2cd7a2 100755
--- a/nuttx/configs/lpcxpresso-lpc1768/nx/defconfig
+++ b/nuttx/configs/lpcxpresso-lpc1768/nx/defconfig
@@ -153,7 +153,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General SPI interface configuration
diff --git a/nuttx/configs/lpcxpresso-lpc1768/ostest/defconfig b/nuttx/configs/lpcxpresso-lpc1768/ostest/defconfig
index f58c78773..1fa3e79bc 100755
--- a/nuttx/configs/lpcxpresso-lpc1768/ostest/defconfig
+++ b/nuttx/configs/lpcxpresso-lpc1768/ostest/defconfig
@@ -153,7 +153,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/lpcxpresso-lpc1768/thttpd/defconfig b/nuttx/configs/lpcxpresso-lpc1768/thttpd/defconfig
index 08d251d43..3d014d291 100755
--- a/nuttx/configs/lpcxpresso-lpc1768/thttpd/defconfig
+++ b/nuttx/configs/lpcxpresso-lpc1768/thttpd/defconfig
@@ -154,7 +154,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/lpcxpresso-lpc1768/usbstorage/defconfig b/nuttx/configs/lpcxpresso-lpc1768/usbstorage/defconfig
index 08f4ad1cf..8e51d5205 100755
--- a/nuttx/configs/lpcxpresso-lpc1768/usbstorage/defconfig
+++ b/nuttx/configs/lpcxpresso-lpc1768/usbstorage/defconfig
@@ -153,7 +153,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/m68332evb/defconfig b/nuttx/configs/m68332evb/defconfig
index e3e8110a7..39b3c7732 100644
--- a/nuttx/configs/m68332evb/defconfig
+++ b/nuttx/configs/m68332evb/defconfig
@@ -67,7 +67,6 @@ CONFIG_UART1_2STOP=0
CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/mbed/hidkbd/defconfig b/nuttx/configs/mbed/hidkbd/defconfig
index 3ec691276..3c31b2f92 100644
--- a/nuttx/configs/mbed/hidkbd/defconfig
+++ b/nuttx/configs/mbed/hidkbd/defconfig
@@ -153,7 +153,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=y
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/mbed/nsh/defconfig b/nuttx/configs/mbed/nsh/defconfig
index dba89ec7b..fca08b577 100755
--- a/nuttx/configs/mbed/nsh/defconfig
+++ b/nuttx/configs/mbed/nsh/defconfig
@@ -149,7 +149,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=y
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/mcu123-lpc214x/composite/defconfig b/nuttx/configs/mcu123-lpc214x/composite/defconfig
index 6a6e5819c..0599fed14 100644
--- a/nuttx/configs/mcu123-lpc214x/composite/defconfig
+++ b/nuttx/configs/mcu123-lpc214x/composite/defconfig
@@ -90,7 +90,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/mcu123-lpc214x/nsh/defconfig b/nuttx/configs/mcu123-lpc214x/nsh/defconfig
index 7a514163c..e2d37a938 100644
--- a/nuttx/configs/mcu123-lpc214x/nsh/defconfig
+++ b/nuttx/configs/mcu123-lpc214x/nsh/defconfig
@@ -90,7 +90,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=y
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/mcu123-lpc214x/ostest/defconfig b/nuttx/configs/mcu123-lpc214x/ostest/defconfig
index 724459e80..5fc7df5c7 100644
--- a/nuttx/configs/mcu123-lpc214x/ostest/defconfig
+++ b/nuttx/configs/mcu123-lpc214x/ostest/defconfig
@@ -90,7 +90,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=y
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/mcu123-lpc214x/usbserial/defconfig b/nuttx/configs/mcu123-lpc214x/usbserial/defconfig
index c746c5732..c35d80486 100644
--- a/nuttx/configs/mcu123-lpc214x/usbserial/defconfig
+++ b/nuttx/configs/mcu123-lpc214x/usbserial/defconfig
@@ -90,7 +90,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=y
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/mcu123-lpc214x/usbstorage/defconfig b/nuttx/configs/mcu123-lpc214x/usbstorage/defconfig
index d46ab7c3c..a25f2e170 100644
--- a/nuttx/configs/mcu123-lpc214x/usbstorage/defconfig
+++ b/nuttx/configs/mcu123-lpc214x/usbstorage/defconfig
@@ -90,7 +90,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=y
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/micropendous3/hello/defconfig b/nuttx/configs/micropendous3/hello/defconfig
index 4e0ea0e99..63a8f249c 100644
--- a/nuttx/configs/micropendous3/hello/defconfig
+++ b/nuttx/configs/micropendous3/hello/defconfig
@@ -105,7 +105,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/mirtoo/nsh/defconfig b/nuttx/configs/mirtoo/nsh/defconfig
index 4e3cb684e..0883cc9ea 100644
--- a/nuttx/configs/mirtoo/nsh/defconfig
+++ b/nuttx/configs/mirtoo/nsh/defconfig
@@ -163,7 +163,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/mirtoo/nxffs/defconfig b/nuttx/configs/mirtoo/nxffs/defconfig
index 31e3ef89b..f2f5286e6 100644
--- a/nuttx/configs/mirtoo/nxffs/defconfig
+++ b/nuttx/configs/mirtoo/nxffs/defconfig
@@ -163,7 +163,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/mirtoo/ostest/defconfig b/nuttx/configs/mirtoo/ostest/defconfig
index a3af96fbc..77b3e38b8 100644
--- a/nuttx/configs/mirtoo/ostest/defconfig
+++ b/nuttx/configs/mirtoo/ostest/defconfig
@@ -155,7 +155,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/mx1ads/ostest/defconfig b/nuttx/configs/mx1ads/ostest/defconfig
index 9e425975d..55b3c72b8 100644
--- a/nuttx/configs/mx1ads/ostest/defconfig
+++ b/nuttx/configs/mx1ads/ostest/defconfig
@@ -96,7 +96,6 @@ CONFIG_SPI2_DISABLE=y
CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/ne64badge/ostest/defconfig b/nuttx/configs/ne64badge/ostest/defconfig
index ee36399f1..c101aa01b 100755
--- a/nuttx/configs/ne64badge/ostest/defconfig
+++ b/nuttx/configs/ne64badge/ostest/defconfig
@@ -108,7 +108,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_MOTOROLA_SREC=y
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# Setup for a two-pass build
diff --git a/nuttx/configs/ntosd-dm320/nettest/defconfig b/nuttx/configs/ntosd-dm320/nettest/defconfig
index 178638054..297df2173 100644
--- a/nuttx/configs/ntosd-dm320/nettest/defconfig
+++ b/nuttx/configs/ntosd-dm320/nettest/defconfig
@@ -88,7 +88,6 @@ CONFIG_UART1_2STOP=0
CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_RAW_BINARY=y
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/ntosd-dm320/nsh/defconfig b/nuttx/configs/ntosd-dm320/nsh/defconfig
index 33cf33c24..2b02c2d4e 100644
--- a/nuttx/configs/ntosd-dm320/nsh/defconfig
+++ b/nuttx/configs/ntosd-dm320/nsh/defconfig
@@ -87,7 +87,6 @@ CONFIG_UART1_2STOP=0
CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_RAW_BINARY=y
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/ntosd-dm320/ostest/defconfig b/nuttx/configs/ntosd-dm320/ostest/defconfig
index 52ebe0bd9..a9fca828a 100644
--- a/nuttx/configs/ntosd-dm320/ostest/defconfig
+++ b/nuttx/configs/ntosd-dm320/ostest/defconfig
@@ -88,7 +88,6 @@ CONFIG_UART1_2STOP=0
CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_RAW_BINARY=y
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/ntosd-dm320/poll/defconfig b/nuttx/configs/ntosd-dm320/poll/defconfig
index f27dcc2c3..08f75e6b6 100644
--- a/nuttx/configs/ntosd-dm320/poll/defconfig
+++ b/nuttx/configs/ntosd-dm320/poll/defconfig
@@ -88,7 +88,6 @@ CONFIG_UART1_2STOP=0
CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_RAW_BINARY=y
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/ntosd-dm320/thttpd/defconfig b/nuttx/configs/ntosd-dm320/thttpd/defconfig
index becec2ef1..d2de4c167 100644
--- a/nuttx/configs/ntosd-dm320/thttpd/defconfig
+++ b/nuttx/configs/ntosd-dm320/thttpd/defconfig
@@ -89,7 +89,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=y
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/ntosd-dm320/udp/defconfig b/nuttx/configs/ntosd-dm320/udp/defconfig
index 869f2e442..de3b24056 100644
--- a/nuttx/configs/ntosd-dm320/udp/defconfig
+++ b/nuttx/configs/ntosd-dm320/udp/defconfig
@@ -88,7 +88,6 @@ CONFIG_UART1_2STOP=0
CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_RAW_BINARY=y
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/ntosd-dm320/uip/defconfig b/nuttx/configs/ntosd-dm320/uip/defconfig
index 19ffe452a..281a63bd0 100644
--- a/nuttx/configs/ntosd-dm320/uip/defconfig
+++ b/nuttx/configs/ntosd-dm320/uip/defconfig
@@ -88,7 +88,6 @@ CONFIG_UART1_2STOP=0
CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_RAW_BINARY=y
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/nucleus2g/nsh/defconfig b/nuttx/configs/nucleus2g/nsh/defconfig
index 080c48770..5bc94e607 100755
--- a/nuttx/configs/nucleus2g/nsh/defconfig
+++ b/nuttx/configs/nucleus2g/nsh/defconfig
@@ -149,7 +149,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/nucleus2g/ostest/defconfig b/nuttx/configs/nucleus2g/ostest/defconfig
index 02eb31633..945e82a05 100755
--- a/nuttx/configs/nucleus2g/ostest/defconfig
+++ b/nuttx/configs/nucleus2g/ostest/defconfig
@@ -149,7 +149,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/nucleus2g/usbserial/defconfig b/nuttx/configs/nucleus2g/usbserial/defconfig
index 300d30ab3..25804407f 100755
--- a/nuttx/configs/nucleus2g/usbserial/defconfig
+++ b/nuttx/configs/nucleus2g/usbserial/defconfig
@@ -149,7 +149,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/nucleus2g/usbstorage/defconfig b/nuttx/configs/nucleus2g/usbstorage/defconfig
index 7887818fb..cc677b9f4 100755
--- a/nuttx/configs/nucleus2g/usbstorage/defconfig
+++ b/nuttx/configs/nucleus2g/usbstorage/defconfig
@@ -149,7 +149,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/olimex-lpc1766stk/ftpc/defconfig b/nuttx/configs/olimex-lpc1766stk/ftpc/defconfig
index 6d1375e92..7cf2e0e88 100755
--- a/nuttx/configs/olimex-lpc1766stk/ftpc/defconfig
+++ b/nuttx/configs/olimex-lpc1766stk/ftpc/defconfig
@@ -159,7 +159,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/olimex-lpc1766stk/hidkbd/defconfig b/nuttx/configs/olimex-lpc1766stk/hidkbd/defconfig
index 7c9fe4c4e..ac94ecfb8 100755
--- a/nuttx/configs/olimex-lpc1766stk/hidkbd/defconfig
+++ b/nuttx/configs/olimex-lpc1766stk/hidkbd/defconfig
@@ -159,7 +159,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/olimex-lpc1766stk/nettest/defconfig b/nuttx/configs/olimex-lpc1766stk/nettest/defconfig
index 628ff0112..7e662fb97 100755
--- a/nuttx/configs/olimex-lpc1766stk/nettest/defconfig
+++ b/nuttx/configs/olimex-lpc1766stk/nettest/defconfig
@@ -159,7 +159,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/olimex-lpc1766stk/nsh/defconfig b/nuttx/configs/olimex-lpc1766stk/nsh/defconfig
index d5333a9f3..b12dd731a 100755
--- a/nuttx/configs/olimex-lpc1766stk/nsh/defconfig
+++ b/nuttx/configs/olimex-lpc1766stk/nsh/defconfig
@@ -159,7 +159,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/olimex-lpc1766stk/nx/defconfig b/nuttx/configs/olimex-lpc1766stk/nx/defconfig
index d86b8b83f..0235c29b5 100755
--- a/nuttx/configs/olimex-lpc1766stk/nx/defconfig
+++ b/nuttx/configs/olimex-lpc1766stk/nx/defconfig
@@ -155,7 +155,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General SPI interface configuration
diff --git a/nuttx/configs/olimex-lpc1766stk/ostest/defconfig b/nuttx/configs/olimex-lpc1766stk/ostest/defconfig
index a11c02276..fcc2bba44 100755
--- a/nuttx/configs/olimex-lpc1766stk/ostest/defconfig
+++ b/nuttx/configs/olimex-lpc1766stk/ostest/defconfig
@@ -155,7 +155,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/olimex-lpc1766stk/slip-httpd/defconfig b/nuttx/configs/olimex-lpc1766stk/slip-httpd/defconfig
index 32092d216..94d5da763 100755
--- a/nuttx/configs/olimex-lpc1766stk/slip-httpd/defconfig
+++ b/nuttx/configs/olimex-lpc1766stk/slip-httpd/defconfig
@@ -158,7 +158,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/olimex-lpc1766stk/thttpd/defconfig b/nuttx/configs/olimex-lpc1766stk/thttpd/defconfig
index 94ac19f42..c14e1362b 100755
--- a/nuttx/configs/olimex-lpc1766stk/thttpd/defconfig
+++ b/nuttx/configs/olimex-lpc1766stk/thttpd/defconfig
@@ -156,7 +156,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/olimex-lpc1766stk/usbserial/defconfig b/nuttx/configs/olimex-lpc1766stk/usbserial/defconfig
index 2bd892cc3..e1216d896 100755
--- a/nuttx/configs/olimex-lpc1766stk/usbserial/defconfig
+++ b/nuttx/configs/olimex-lpc1766stk/usbserial/defconfig
@@ -155,7 +155,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/olimex-lpc1766stk/usbstorage/defconfig b/nuttx/configs/olimex-lpc1766stk/usbstorage/defconfig
index 8b55cc94d..2f91efe47 100755
--- a/nuttx/configs/olimex-lpc1766stk/usbstorage/defconfig
+++ b/nuttx/configs/olimex-lpc1766stk/usbstorage/defconfig
@@ -155,7 +155,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/olimex-lpc1766stk/wlan/defconfig b/nuttx/configs/olimex-lpc1766stk/wlan/defconfig
index 4d73807e0..aa896c30c 100755
--- a/nuttx/configs/olimex-lpc1766stk/wlan/defconfig
+++ b/nuttx/configs/olimex-lpc1766stk/wlan/defconfig
@@ -150,7 +150,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/olimex-lpc2378/nsh/defconfig b/nuttx/configs/olimex-lpc2378/nsh/defconfig
index 7311d0c20..30801a6ab 100755
--- a/nuttx/configs/olimex-lpc2378/nsh/defconfig
+++ b/nuttx/configs/olimex-lpc2378/nsh/defconfig
@@ -110,7 +110,6 @@ CONFIG_UART2_2STOP=0
CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_RAW_BINARY=y
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/olimex-lpc2378/ostest/defconfig b/nuttx/configs/olimex-lpc2378/ostest/defconfig
index b96aadd87..129bb7fbe 100755
--- a/nuttx/configs/olimex-lpc2378/ostest/defconfig
+++ b/nuttx/configs/olimex-lpc2378/ostest/defconfig
@@ -110,7 +110,6 @@ CONFIG_UART2_2STOP=0
CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_RAW_BINARY=y
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/olimex-stm32-p107/nsh/defconfig b/nuttx/configs/olimex-stm32-p107/nsh/defconfig
index 67a153f9a..9b9a72dcd 100644
--- a/nuttx/configs/olimex-stm32-p107/nsh/defconfig
+++ b/nuttx/configs/olimex-stm32-p107/nsh/defconfig
@@ -198,7 +198,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/olimex-stm32-p107/ostest/defconfig b/nuttx/configs/olimex-stm32-p107/ostest/defconfig
index 26a8470d2..21aa07875 100644
--- a/nuttx/configs/olimex-stm32-p107/ostest/defconfig
+++ b/nuttx/configs/olimex-stm32-p107/ostest/defconfig
@@ -208,7 +208,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/olimex-strp711/nettest/defconfig b/nuttx/configs/olimex-strp711/nettest/defconfig
index c401fe8c6..eb8c91108 100755
--- a/nuttx/configs/olimex-strp711/nettest/defconfig
+++ b/nuttx/configs/olimex-strp711/nettest/defconfig
@@ -128,7 +128,6 @@ CONFIG_UART3_2STOP=0
CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_RAW_BINARY=y
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/olimex-strp711/nsh/defconfig b/nuttx/configs/olimex-strp711/nsh/defconfig
index 985e3690e..2deb55640 100644
--- a/nuttx/configs/olimex-strp711/nsh/defconfig
+++ b/nuttx/configs/olimex-strp711/nsh/defconfig
@@ -128,7 +128,6 @@ CONFIG_UART3_2STOP=0
CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_RAW_BINARY=y
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/olimex-strp711/ostest/defconfig b/nuttx/configs/olimex-strp711/ostest/defconfig
index cdac22b9f..e60b7349f 100644
--- a/nuttx/configs/olimex-strp711/ostest/defconfig
+++ b/nuttx/configs/olimex-strp711/ostest/defconfig
@@ -128,7 +128,6 @@ CONFIG_UART3_2STOP=0
CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_RAW_BINARY=y
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/pcblogic-pic32mx/nsh/defconfig b/nuttx/configs/pcblogic-pic32mx/nsh/defconfig
index 1e439e466..3a480d786 100644
--- a/nuttx/configs/pcblogic-pic32mx/nsh/defconfig
+++ b/nuttx/configs/pcblogic-pic32mx/nsh/defconfig
@@ -155,7 +155,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/pcblogic-pic32mx/ostest/defconfig b/nuttx/configs/pcblogic-pic32mx/ostest/defconfig
index 868ba4669..da8ff40ed 100644
--- a/nuttx/configs/pcblogic-pic32mx/ostest/defconfig
+++ b/nuttx/configs/pcblogic-pic32mx/ostest/defconfig
@@ -155,7 +155,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/pic32-starterkit/nsh/defconfig b/nuttx/configs/pic32-starterkit/nsh/defconfig
index 17cb151a7..17fbd6f4e 100644
--- a/nuttx/configs/pic32-starterkit/nsh/defconfig
+++ b/nuttx/configs/pic32-starterkit/nsh/defconfig
@@ -215,7 +215,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/pic32-starterkit/nsh2/defconfig b/nuttx/configs/pic32-starterkit/nsh2/defconfig
index c751591b2..0eec63118 100644
--- a/nuttx/configs/pic32-starterkit/nsh2/defconfig
+++ b/nuttx/configs/pic32-starterkit/nsh2/defconfig
@@ -215,7 +215,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/pic32-starterkit/ostest/defconfig b/nuttx/configs/pic32-starterkit/ostest/defconfig
index c8e32419e..e386b5936 100644
--- a/nuttx/configs/pic32-starterkit/ostest/defconfig
+++ b/nuttx/configs/pic32-starterkit/ostest/defconfig
@@ -215,7 +215,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/pic32mx7mmb/nsh/defconfig b/nuttx/configs/pic32mx7mmb/nsh/defconfig
index 052363656..c55e80209 100644
--- a/nuttx/configs/pic32mx7mmb/nsh/defconfig
+++ b/nuttx/configs/pic32mx7mmb/nsh/defconfig
@@ -215,7 +215,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/pic32mx7mmb/ostest/defconfig b/nuttx/configs/pic32mx7mmb/ostest/defconfig
index 851f6022f..a2e653a56 100644
--- a/nuttx/configs/pic32mx7mmb/ostest/defconfig
+++ b/nuttx/configs/pic32mx7mmb/ostest/defconfig
@@ -215,7 +215,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/pjrc-8051/defconfig b/nuttx/configs/pjrc-8051/defconfig
index 0232376cf..c223f64e1 100644
--- a/nuttx/configs/pjrc-8051/defconfig
+++ b/nuttx/configs/pjrc-8051/defconfig
@@ -66,7 +66,6 @@ CONFIG_LED_DEBUG=n
CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/qemu-i486/nsh/defconfig b/nuttx/configs/qemu-i486/nsh/defconfig
index 9085eb5fa..b693c94f7 100644
--- a/nuttx/configs/qemu-i486/nsh/defconfig
+++ b/nuttx/configs/qemu-i486/nsh/defconfig
@@ -195,7 +195,6 @@ CONFIG_ARCH_BZERO=n
CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=y
#
# Sizes of configurable things (0 disables)
diff --git a/nuttx/configs/qemu-i486/ostest/defconfig b/nuttx/configs/qemu-i486/ostest/defconfig
index a9867fdc9..63c27a231 100644
--- a/nuttx/configs/qemu-i486/ostest/defconfig
+++ b/nuttx/configs/qemu-i486/ostest/defconfig
@@ -127,7 +127,6 @@ CONFIG_ARCH_BZERO=n
CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=y
#
# Sizes of configurable things (0 disables)
diff --git a/nuttx/configs/rgmp/arm/default/defconfig b/nuttx/configs/rgmp/arm/default/defconfig
index 186c68724..a78500bf4 100644
--- a/nuttx/configs/rgmp/arm/default/defconfig
+++ b/nuttx/configs/rgmp/arm/default/defconfig
@@ -124,7 +124,6 @@ CONFIG_ARCH_STDBOOL_H=y
CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# Sizes of configurable things (0 disables)
diff --git a/nuttx/configs/rgmp/arm/nsh/defconfig b/nuttx/configs/rgmp/arm/nsh/defconfig
index 8fbbc7b8b..bee14b0a2 100644
--- a/nuttx/configs/rgmp/arm/nsh/defconfig
+++ b/nuttx/configs/rgmp/arm/nsh/defconfig
@@ -124,7 +124,6 @@ CONFIG_ARCH_STDBOOL_H=y
CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# Sizes of configurable things (0 disables)
diff --git a/nuttx/configs/rgmp/x86/default/defconfig b/nuttx/configs/rgmp/x86/default/defconfig
index 9b4b58d89..e36c39766 100644
--- a/nuttx/configs/rgmp/x86/default/defconfig
+++ b/nuttx/configs/rgmp/x86/default/defconfig
@@ -124,7 +124,6 @@ CONFIG_ARCH_STDBOOL_H=y
CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# Sizes of configurable things (0 disables)
diff --git a/nuttx/configs/rgmp/x86/nsh/defconfig b/nuttx/configs/rgmp/x86/nsh/defconfig
index 7af320ff7..6afe9c9a9 100644
--- a/nuttx/configs/rgmp/x86/nsh/defconfig
+++ b/nuttx/configs/rgmp/x86/nsh/defconfig
@@ -124,7 +124,6 @@ CONFIG_ARCH_STDBOOL_H=y
CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# Sizes of configurable things (0 disables)
diff --git a/nuttx/configs/sam3u-ek/knsh/defconfig b/nuttx/configs/sam3u-ek/knsh/defconfig
index 9aba512ed..416ca3fa3 100755
--- a/nuttx/configs/sam3u-ek/knsh/defconfig
+++ b/nuttx/configs/sam3u-ek/knsh/defconfig
@@ -144,7 +144,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# Setup for a two-pass build
diff --git a/nuttx/configs/sam3u-ek/nsh/defconfig b/nuttx/configs/sam3u-ek/nsh/defconfig
index 02b980418..69a2081ff 100755
--- a/nuttx/configs/sam3u-ek/nsh/defconfig
+++ b/nuttx/configs/sam3u-ek/nsh/defconfig
@@ -139,7 +139,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=y
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/sam3u-ek/nx/defconfig b/nuttx/configs/sam3u-ek/nx/defconfig
index 82e9e3cbc..aae6aa5fa 100755
--- a/nuttx/configs/sam3u-ek/nx/defconfig
+++ b/nuttx/configs/sam3u-ek/nx/defconfig
@@ -139,7 +139,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=y
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/sam3u-ek/ostest/defconfig b/nuttx/configs/sam3u-ek/ostest/defconfig
index da582acb6..14b8eaa6e 100755
--- a/nuttx/configs/sam3u-ek/ostest/defconfig
+++ b/nuttx/configs/sam3u-ek/ostest/defconfig
@@ -140,7 +140,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=y
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/sam3u-ek/touchscreen/defconfig b/nuttx/configs/sam3u-ek/touchscreen/defconfig
index f3ced72cc..cd1fec7d1 100755
--- a/nuttx/configs/sam3u-ek/touchscreen/defconfig
+++ b/nuttx/configs/sam3u-ek/touchscreen/defconfig
@@ -146,7 +146,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=y
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/shenzhou/nsh/defconfig b/nuttx/configs/shenzhou/nsh/defconfig
index fdc065c48..b37da788e 100644
--- a/nuttx/configs/shenzhou/nsh/defconfig
+++ b/nuttx/configs/shenzhou/nsh/defconfig
@@ -452,7 +452,6 @@ CONFIG_STDIO_BUFFER_SIZE=256
CONFIG_STDIO_LINEBUFFER=y
CONFIG_NUNGET_CHARS=2
CONFIG_LIB_HOMEDIR="/"
-# CONFIG_HAVE_LIBM is not set
# CONFIG_NOPRINTF_FIELDWIDTH is not set
# CONFIG_LIBC_FLOATINGPOINT is not set
# CONFIG_EOL_IS_CR is not set
diff --git a/nuttx/configs/shenzhou/nxwm/defconfig b/nuttx/configs/shenzhou/nxwm/defconfig
index e4316d1fe..a5ccc8bfb 100644
--- a/nuttx/configs/shenzhou/nxwm/defconfig
+++ b/nuttx/configs/shenzhou/nxwm/defconfig
@@ -552,7 +552,6 @@ CONFIG_STDIO_BUFFER_SIZE=64
CONFIG_STDIO_LINEBUFFER=y
CONFIG_NUNGET_CHARS=2
CONFIG_LIB_HOMEDIR="/"
-# CONFIG_HAVE_LIBM is not set
# CONFIG_NOPRINTF_FIELDWIDTH is not set
# CONFIG_LIBC_FLOATINGPOINT is not set
# CONFIG_EOL_IS_CR is not set
diff --git a/nuttx/configs/shenzhou/thttpd/defconfig b/nuttx/configs/shenzhou/thttpd/defconfig
index 5fd158cc6..82884f4c3 100644
--- a/nuttx/configs/shenzhou/thttpd/defconfig
+++ b/nuttx/configs/shenzhou/thttpd/defconfig
@@ -452,7 +452,6 @@ CONFIG_STDIO_BUFFER_SIZE=256
CONFIG_STDIO_LINEBUFFER=y
CONFIG_NUNGET_CHARS=2
CONFIG_LIB_HOMEDIR="/"
-# CONFIG_HAVE_LIBM is not set
# CONFIG_NOPRINTF_FIELDWIDTH is not set
# CONFIG_LIBC_FLOATINGPOINT is not set
# CONFIG_EOL_IS_CR is not set
diff --git a/nuttx/configs/sim/mount/defconfig b/nuttx/configs/sim/mount/defconfig
index b980b38dd..7caa87852 100644
--- a/nuttx/configs/sim/mount/defconfig
+++ b/nuttx/configs/sim/mount/defconfig
@@ -118,7 +118,6 @@ CONFIG_ARCH_BZERO=n
CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=y
#
# Sizes of configurable things (0 disables)
diff --git a/nuttx/configs/sim/nettest/defconfig b/nuttx/configs/sim/nettest/defconfig
index d72404640..c216e2edc 100644
--- a/nuttx/configs/sim/nettest/defconfig
+++ b/nuttx/configs/sim/nettest/defconfig
@@ -118,7 +118,6 @@ CONFIG_ARCH_BZERO=n
CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=y
#
# Sizes of configurable things (0 disables)
diff --git a/nuttx/configs/sim/nsh/defconfig b/nuttx/configs/sim/nsh/defconfig
index cd1fc8c7b..a217dd71d 100644
--- a/nuttx/configs/sim/nsh/defconfig
+++ b/nuttx/configs/sim/nsh/defconfig
@@ -143,7 +143,6 @@ CONFIG_ARCH_BZERO=n
CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=y
#
# Sizes of configurable things (0 disables)
diff --git a/nuttx/configs/sim/nsh2/defconfig b/nuttx/configs/sim/nsh2/defconfig
index 787e388c7..0e93cd481 100644
--- a/nuttx/configs/sim/nsh2/defconfig
+++ b/nuttx/configs/sim/nsh2/defconfig
@@ -153,7 +153,6 @@ CONFIG_ARCH_BZERO=n
CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=y
#
# Sizes of configurable things (0 disables)
diff --git a/nuttx/configs/sim/nx/defconfig b/nuttx/configs/sim/nx/defconfig
index 5b48d72a7..d5cad6741 100644
--- a/nuttx/configs/sim/nx/defconfig
+++ b/nuttx/configs/sim/nx/defconfig
@@ -129,7 +129,6 @@ CONFIG_ARCH_BZERO=n
CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=y
#
# Sizes of configurable things (0 disables)
diff --git a/nuttx/configs/sim/nx11/defconfig b/nuttx/configs/sim/nx11/defconfig
index 43d57bd50..0ac3362be 100644
--- a/nuttx/configs/sim/nx11/defconfig
+++ b/nuttx/configs/sim/nx11/defconfig
@@ -136,7 +136,6 @@ CONFIG_ARCH_BZERO=n
CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=y
#
# Sizes of configurable things (0 disables)
diff --git a/nuttx/configs/sim/nxffs/defconfig b/nuttx/configs/sim/nxffs/defconfig
index c30227bd8..79f5b0f93 100644
--- a/nuttx/configs/sim/nxffs/defconfig
+++ b/nuttx/configs/sim/nxffs/defconfig
@@ -119,7 +119,6 @@ CONFIG_ARCH_BZERO=n
CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=y
#
# Sizes of configurable things (0 disables)
diff --git a/nuttx/configs/sim/nxwm/defconfig b/nuttx/configs/sim/nxwm/defconfig
index d34202e05..9029b3b2f 100644
--- a/nuttx/configs/sim/nxwm/defconfig
+++ b/nuttx/configs/sim/nxwm/defconfig
@@ -153,7 +153,6 @@ CONFIG_ARCH_BZERO=n
CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=y
#
# Sizes of configurable things (0 disables)
diff --git a/nuttx/configs/sim/ostest/defconfig b/nuttx/configs/sim/ostest/defconfig
index 0d3669a25..a2fbd9f05 100644
--- a/nuttx/configs/sim/ostest/defconfig
+++ b/nuttx/configs/sim/ostest/defconfig
@@ -118,7 +118,6 @@ CONFIG_ARCH_BZERO=n
CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=y
#
# Sizes of configurable things (0 disables)
diff --git a/nuttx/configs/sim/pashello/defconfig b/nuttx/configs/sim/pashello/defconfig
index e3cf3a7b5..b40ec626e 100644
--- a/nuttx/configs/sim/pashello/defconfig
+++ b/nuttx/configs/sim/pashello/defconfig
@@ -118,7 +118,6 @@ CONFIG_ARCH_BZERO=n
CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=y
#
# Sizes of configurable things (0 disables)
diff --git a/nuttx/configs/sim/touchscreen/defconfig b/nuttx/configs/sim/touchscreen/defconfig
index b112449b3..6a2e3e304 100644
--- a/nuttx/configs/sim/touchscreen/defconfig
+++ b/nuttx/configs/sim/touchscreen/defconfig
@@ -135,7 +135,6 @@ CONFIG_ARCH_BZERO=n
CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=y
#
# Sizes of configurable things (0 disables)
diff --git a/nuttx/configs/skp16c26/ostest/defconfig b/nuttx/configs/skp16c26/ostest/defconfig
index 8cb2eb469..f3370d48c 100644
--- a/nuttx/configs/skp16c26/ostest/defconfig
+++ b/nuttx/configs/skp16c26/ostest/defconfig
@@ -93,7 +93,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_MOTOROLA_SREC=y
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/stm3210e-eval/RIDE/defconfig b/nuttx/configs/stm3210e-eval/RIDE/defconfig
index f4593d5ea..7032bd975 100755
--- a/nuttx/configs/stm3210e-eval/RIDE/defconfig
+++ b/nuttx/configs/stm3210e-eval/RIDE/defconfig
@@ -165,7 +165,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/stm3210e-eval/buttons/defconfig b/nuttx/configs/stm3210e-eval/buttons/defconfig
index ac3f10887..37b1cf968 100644
--- a/nuttx/configs/stm3210e-eval/buttons/defconfig
+++ b/nuttx/configs/stm3210e-eval/buttons/defconfig
@@ -176,7 +176,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/stm3210e-eval/composite/defconfig b/nuttx/configs/stm3210e-eval/composite/defconfig
index 18c2164d3..fa485f4df 100755
--- a/nuttx/configs/stm3210e-eval/composite/defconfig
+++ b/nuttx/configs/stm3210e-eval/composite/defconfig
@@ -174,7 +174,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/stm3210e-eval/nsh/defconfig b/nuttx/configs/stm3210e-eval/nsh/defconfig
index facfe105a..1341c5891 100755
--- a/nuttx/configs/stm3210e-eval/nsh/defconfig
+++ b/nuttx/configs/stm3210e-eval/nsh/defconfig
@@ -174,7 +174,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/stm3210e-eval/nsh2/defconfig b/nuttx/configs/stm3210e-eval/nsh2/defconfig
index c30691cc9..0ce49deb5 100644
--- a/nuttx/configs/stm3210e-eval/nsh2/defconfig
+++ b/nuttx/configs/stm3210e-eval/nsh2/defconfig
@@ -217,7 +217,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/stm3210e-eval/nx/defconfig b/nuttx/configs/stm3210e-eval/nx/defconfig
index 0833e7a78..6569c9a65 100644
--- a/nuttx/configs/stm3210e-eval/nx/defconfig
+++ b/nuttx/configs/stm3210e-eval/nx/defconfig
@@ -174,7 +174,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/stm3210e-eval/nxconsole/defconfig b/nuttx/configs/stm3210e-eval/nxconsole/defconfig
index 637967efc..070bcde42 100644
--- a/nuttx/configs/stm3210e-eval/nxconsole/defconfig
+++ b/nuttx/configs/stm3210e-eval/nxconsole/defconfig
@@ -174,7 +174,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/stm3210e-eval/nxlines/defconfig b/nuttx/configs/stm3210e-eval/nxlines/defconfig
index 0a124407a..8517f45e5 100644
--- a/nuttx/configs/stm3210e-eval/nxlines/defconfig
+++ b/nuttx/configs/stm3210e-eval/nxlines/defconfig
@@ -174,7 +174,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/stm3210e-eval/nxtext/defconfig b/nuttx/configs/stm3210e-eval/nxtext/defconfig
index 14e20946e..d554a0a7a 100644
--- a/nuttx/configs/stm3210e-eval/nxtext/defconfig
+++ b/nuttx/configs/stm3210e-eval/nxtext/defconfig
@@ -174,7 +174,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/stm3210e-eval/ostest/defconfig b/nuttx/configs/stm3210e-eval/ostest/defconfig
index 8585235ec..abb4b925c 100755
--- a/nuttx/configs/stm3210e-eval/ostest/defconfig
+++ b/nuttx/configs/stm3210e-eval/ostest/defconfig
@@ -186,7 +186,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/stm3210e-eval/pm/defconfig b/nuttx/configs/stm3210e-eval/pm/defconfig
index f7ae420e4..00d307c64 100644
--- a/nuttx/configs/stm3210e-eval/pm/defconfig
+++ b/nuttx/configs/stm3210e-eval/pm/defconfig
@@ -227,7 +227,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/stm3210e-eval/usbserial/defconfig b/nuttx/configs/stm3210e-eval/usbserial/defconfig
index ac3ff1c9a..0672be24d 100755
--- a/nuttx/configs/stm3210e-eval/usbserial/defconfig
+++ b/nuttx/configs/stm3210e-eval/usbserial/defconfig
@@ -175,7 +175,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/stm3210e-eval/usbstorage/defconfig b/nuttx/configs/stm3210e-eval/usbstorage/defconfig
index 160d95237..57facca01 100755
--- a/nuttx/configs/stm3210e-eval/usbstorage/defconfig
+++ b/nuttx/configs/stm3210e-eval/usbstorage/defconfig
@@ -174,7 +174,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/stm3220g-eval/dhcpd/defconfig b/nuttx/configs/stm3220g-eval/dhcpd/defconfig
index 762607bd0..39f2427fd 100644
--- a/nuttx/configs/stm3220g-eval/dhcpd/defconfig
+++ b/nuttx/configs/stm3220g-eval/dhcpd/defconfig
@@ -228,7 +228,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/stm3220g-eval/nettest/defconfig b/nuttx/configs/stm3220g-eval/nettest/defconfig
index 9262e8c24..a186ad67c 100644
--- a/nuttx/configs/stm3220g-eval/nettest/defconfig
+++ b/nuttx/configs/stm3220g-eval/nettest/defconfig
@@ -228,7 +228,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/stm3220g-eval/nsh/defconfig b/nuttx/configs/stm3220g-eval/nsh/defconfig
index ca1d914de..92741b91f 100644
--- a/nuttx/configs/stm3220g-eval/nsh/defconfig
+++ b/nuttx/configs/stm3220g-eval/nsh/defconfig
@@ -251,7 +251,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/stm3220g-eval/nsh2/defconfig b/nuttx/configs/stm3220g-eval/nsh2/defconfig
index 324c920d7..98b8b1923 100644
--- a/nuttx/configs/stm3220g-eval/nsh2/defconfig
+++ b/nuttx/configs/stm3220g-eval/nsh2/defconfig
@@ -251,7 +251,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/stm3220g-eval/nxwm/defconfig b/nuttx/configs/stm3220g-eval/nxwm/defconfig
index 41f365257..32d9c31eb 100644
--- a/nuttx/configs/stm3220g-eval/nxwm/defconfig
+++ b/nuttx/configs/stm3220g-eval/nxwm/defconfig
@@ -251,7 +251,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/stm3220g-eval/ostest/defconfig b/nuttx/configs/stm3220g-eval/ostest/defconfig
index b8663a72a..2f69fdc24 100644
--- a/nuttx/configs/stm3220g-eval/ostest/defconfig
+++ b/nuttx/configs/stm3220g-eval/ostest/defconfig
@@ -228,7 +228,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/stm3220g-eval/telnetd/defconfig b/nuttx/configs/stm3220g-eval/telnetd/defconfig
index 28670bb47..c41c37088 100644
--- a/nuttx/configs/stm3220g-eval/telnetd/defconfig
+++ b/nuttx/configs/stm3220g-eval/telnetd/defconfig
@@ -228,7 +228,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/stm3240g-eval/dhcpd/defconfig b/nuttx/configs/stm3240g-eval/dhcpd/defconfig
index e33b62f87..dd0342d70 100644
--- a/nuttx/configs/stm3240g-eval/dhcpd/defconfig
+++ b/nuttx/configs/stm3240g-eval/dhcpd/defconfig
@@ -234,7 +234,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/stm3240g-eval/discover/defconfig b/nuttx/configs/stm3240g-eval/discover/defconfig
index 7c1163b9b..d7165573c 100644
--- a/nuttx/configs/stm3240g-eval/discover/defconfig
+++ b/nuttx/configs/stm3240g-eval/discover/defconfig
@@ -472,7 +472,6 @@ CONFIG_STDIO_BUFFER_SIZE=256
CONFIG_STDIO_LINEBUFFER=y
CONFIG_NUNGET_CHARS=2
CONFIG_LIB_HOMEDIR="/"
-# CONFIG_HAVE_LIBM is not set
# CONFIG_NOPRINTF_FIELDWIDTH is not set
# CONFIG_LIBC_FLOATINGPOINT is not set
# CONFIG_EOL_IS_CR is not set
diff --git a/nuttx/configs/stm3240g-eval/nettest/defconfig b/nuttx/configs/stm3240g-eval/nettest/defconfig
index 813912b84..5c5053dda 100644
--- a/nuttx/configs/stm3240g-eval/nettest/defconfig
+++ b/nuttx/configs/stm3240g-eval/nettest/defconfig
@@ -234,7 +234,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/stm3240g-eval/nsh/defconfig b/nuttx/configs/stm3240g-eval/nsh/defconfig
index 8c7c29078..1501e32d1 100644
--- a/nuttx/configs/stm3240g-eval/nsh/defconfig
+++ b/nuttx/configs/stm3240g-eval/nsh/defconfig
@@ -256,7 +256,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/stm3240g-eval/nsh2/defconfig b/nuttx/configs/stm3240g-eval/nsh2/defconfig
index 53b0896d8..4e5eff8bd 100644
--- a/nuttx/configs/stm3240g-eval/nsh2/defconfig
+++ b/nuttx/configs/stm3240g-eval/nsh2/defconfig
@@ -258,7 +258,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/stm3240g-eval/nxconsole/defconfig b/nuttx/configs/stm3240g-eval/nxconsole/defconfig
index f87acc69e..5eada6ab2 100644
--- a/nuttx/configs/stm3240g-eval/nxconsole/defconfig
+++ b/nuttx/configs/stm3240g-eval/nxconsole/defconfig
@@ -257,7 +257,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/stm3240g-eval/nxwm/defconfig b/nuttx/configs/stm3240g-eval/nxwm/defconfig
index d1fa395dd..39ffcd07d 100644
--- a/nuttx/configs/stm3240g-eval/nxwm/defconfig
+++ b/nuttx/configs/stm3240g-eval/nxwm/defconfig
@@ -257,7 +257,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/stm3240g-eval/ostest/defconfig b/nuttx/configs/stm3240g-eval/ostest/defconfig
index cc7a9ac58..3c29fca51 100644
--- a/nuttx/configs/stm3240g-eval/ostest/defconfig
+++ b/nuttx/configs/stm3240g-eval/ostest/defconfig
@@ -233,7 +233,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/stm3240g-eval/telnetd/defconfig b/nuttx/configs/stm3240g-eval/telnetd/defconfig
index 4ab86aeb9..8d5b44974 100644
--- a/nuttx/configs/stm3240g-eval/telnetd/defconfig
+++ b/nuttx/configs/stm3240g-eval/telnetd/defconfig
@@ -234,7 +234,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/stm3240g-eval/webserver/defconfig b/nuttx/configs/stm3240g-eval/webserver/defconfig
index 8921d503c..1ea4cf943 100644
--- a/nuttx/configs/stm3240g-eval/webserver/defconfig
+++ b/nuttx/configs/stm3240g-eval/webserver/defconfig
@@ -257,7 +257,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=y
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/stm3240g-eval/xmlrpc/defconfig b/nuttx/configs/stm3240g-eval/xmlrpc/defconfig
index 20639dac4..308203e27 100644
--- a/nuttx/configs/stm3240g-eval/xmlrpc/defconfig
+++ b/nuttx/configs/stm3240g-eval/xmlrpc/defconfig
@@ -465,7 +465,6 @@ CONFIG_STDIO_BUFFER_SIZE=256
CONFIG_STDIO_LINEBUFFER=y
CONFIG_NUNGET_CHARS=2
CONFIG_LIB_HOMEDIR="/"
-# CONFIG_HAVE_LIBM is not set
# CONFIG_NOPRINTF_FIELDWIDTH is not set
# CONFIG_LIBC_FLOATINGPOINT is not set
# CONFIG_EOL_IS_CR is not set
diff --git a/nuttx/configs/stm32f4discovery/elf/defconfig b/nuttx/configs/stm32f4discovery/elf/defconfig
index 6d72e4a9e..5bbef5e73 100644
--- a/nuttx/configs/stm32f4discovery/elf/defconfig
+++ b/nuttx/configs/stm32f4discovery/elf/defconfig
@@ -397,7 +397,6 @@ CONFIG_STDIO_BUFFER_SIZE=256
CONFIG_STDIO_LINEBUFFER=y
CONFIG_NUNGET_CHARS=2
CONFIG_LIB_HOMEDIR="/"
-# CONFIG_HAVE_LIBM is not set
# CONFIG_NOPRINTF_FIELDWIDTH is not set
# CONFIG_LIBC_FLOATINGPOINT is not set
# CONFIG_EOL_IS_CR is not set
diff --git a/nuttx/configs/stm32f4discovery/nsh/defconfig b/nuttx/configs/stm32f4discovery/nsh/defconfig
index c216c5997..4461c08ce 100644
--- a/nuttx/configs/stm32f4discovery/nsh/defconfig
+++ b/nuttx/configs/stm32f4discovery/nsh/defconfig
@@ -239,7 +239,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=y
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/stm32f4discovery/nxlines/defconfig b/nuttx/configs/stm32f4discovery/nxlines/defconfig
index e1e4f2131..737b015b1 100644
--- a/nuttx/configs/stm32f4discovery/nxlines/defconfig
+++ b/nuttx/configs/stm32f4discovery/nxlines/defconfig
@@ -239,7 +239,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=y
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/stm32f4discovery/ostest/defconfig b/nuttx/configs/stm32f4discovery/ostest/defconfig
index 168365730..ccd9c648a 100644
--- a/nuttx/configs/stm32f4discovery/ostest/defconfig
+++ b/nuttx/configs/stm32f4discovery/ostest/defconfig
@@ -387,7 +387,6 @@ CONFIG_SYMTAB_ORDEREDBYNAME=y
CONFIG_STDIO_BUFFER_SIZE=256
CONFIG_STDIO_LINEBUFFER=y
CONFIG_NUNGET_CHARS=2
-# CONFIG_HAVE_LIBM is not set
# CONFIG_NOPRINTF_FIELDWIDTH is not set
# CONFIG_LIBC_FLOATINGPOINT is not set
# CONFIG_EOL_IS_CR is not set
diff --git a/nuttx/configs/stm32f4discovery/pm/defconfig b/nuttx/configs/stm32f4discovery/pm/defconfig
index 07a99c764..6785ec46e 100644
--- a/nuttx/configs/stm32f4discovery/pm/defconfig
+++ b/nuttx/configs/stm32f4discovery/pm/defconfig
@@ -240,7 +240,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=y
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/sure-pic32mx/nsh/defconfig b/nuttx/configs/sure-pic32mx/nsh/defconfig
index 8025f968c..ae7b4b83e 100644
--- a/nuttx/configs/sure-pic32mx/nsh/defconfig
+++ b/nuttx/configs/sure-pic32mx/nsh/defconfig
@@ -162,7 +162,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/sure-pic32mx/ostest/defconfig b/nuttx/configs/sure-pic32mx/ostest/defconfig
index f3c3fee36..95c044851 100644
--- a/nuttx/configs/sure-pic32mx/ostest/defconfig
+++ b/nuttx/configs/sure-pic32mx/ostest/defconfig
@@ -156,7 +156,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/sure-pic32mx/usbnsh/defconfig b/nuttx/configs/sure-pic32mx/usbnsh/defconfig
index cdebb2953..cfdc83d4b 100644
--- a/nuttx/configs/sure-pic32mx/usbnsh/defconfig
+++ b/nuttx/configs/sure-pic32mx/usbnsh/defconfig
@@ -162,7 +162,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/teensy/hello/defconfig b/nuttx/configs/teensy/hello/defconfig
index 83176f57e..05349bf47 100644
--- a/nuttx/configs/teensy/hello/defconfig
+++ b/nuttx/configs/teensy/hello/defconfig
@@ -105,7 +105,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/teensy/nsh/defconfig b/nuttx/configs/teensy/nsh/defconfig
index 0908f0243..f8e71d7e9 100755
--- a/nuttx/configs/teensy/nsh/defconfig
+++ b/nuttx/configs/teensy/nsh/defconfig
@@ -105,7 +105,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/teensy/usbstorage/defconfig b/nuttx/configs/teensy/usbstorage/defconfig
index 94cc301db..08b8fd842 100755
--- a/nuttx/configs/teensy/usbstorage/defconfig
+++ b/nuttx/configs/teensy/usbstorage/defconfig
@@ -105,7 +105,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/twr-k60n512/nsh/defconfig b/nuttx/configs/twr-k60n512/nsh/defconfig
index d8ccd6a6d..d4b8f77fa 100644
--- a/nuttx/configs/twr-k60n512/nsh/defconfig
+++ b/nuttx/configs/twr-k60n512/nsh/defconfig
@@ -171,7 +171,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/twr-k60n512/ostest/defconfig b/nuttx/configs/twr-k60n512/ostest/defconfig
index 8909add13..8505ac12d 100644
--- a/nuttx/configs/twr-k60n512/ostest/defconfig
+++ b/nuttx/configs/twr-k60n512/ostest/defconfig
@@ -171,7 +171,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/ubw32/nsh/defconfig b/nuttx/configs/ubw32/nsh/defconfig
index afa4e10c8..a6fe0051d 100644
--- a/nuttx/configs/ubw32/nsh/defconfig
+++ b/nuttx/configs/ubw32/nsh/defconfig
@@ -155,7 +155,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/ubw32/ostest/defconfig b/nuttx/configs/ubw32/ostest/defconfig
index 0849fe800..857684409 100644
--- a/nuttx/configs/ubw32/ostest/defconfig
+++ b/nuttx/configs/ubw32/ostest/defconfig
@@ -155,7 +155,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=y
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/us7032evb1/nsh/defconfig b/nuttx/configs/us7032evb1/nsh/defconfig
index 02d42aebe..7dd5dc698 100644
--- a/nuttx/configs/us7032evb1/nsh/defconfig
+++ b/nuttx/configs/us7032evb1/nsh/defconfig
@@ -95,7 +95,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_MOTOROLA_SREC=y
CONFIG_RAW_BINARY=y
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/us7032evb1/ostest/defconfig b/nuttx/configs/us7032evb1/ostest/defconfig
index f92a55461..286c61998 100644
--- a/nuttx/configs/us7032evb1/ostest/defconfig
+++ b/nuttx/configs/us7032evb1/ostest/defconfig
@@ -95,7 +95,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_MOTOROLA_SREC=y
CONFIG_RAW_BINARY=y
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/vsn/nsh/defconfig b/nuttx/configs/vsn/nsh/defconfig
index 8c59b4298..a43deab6f 100755
--- a/nuttx/configs/vsn/nsh/defconfig
+++ b/nuttx/configs/vsn/nsh/defconfig
@@ -214,7 +214,6 @@ CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_MOTOROLA_SREC=y
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/xtrs/nsh/defconfig b/nuttx/configs/xtrs/nsh/defconfig
index b8bd5d6f2..7065ad8d5 100644
--- a/nuttx/configs/xtrs/nsh/defconfig
+++ b/nuttx/configs/xtrs/nsh/defconfig
@@ -55,7 +55,6 @@ CONFIG_UART_TXBUFSIZE=256
CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
CONFIG_LINKER_START_AREA=0x5200
CONFIG_LINKER_CODE_AREA=0x5300
diff --git a/nuttx/configs/xtrs/ostest/defconfig b/nuttx/configs/xtrs/ostest/defconfig
index 9c88c5d8f..5759b9105 100644
--- a/nuttx/configs/xtrs/ostest/defconfig
+++ b/nuttx/configs/xtrs/ostest/defconfig
@@ -55,7 +55,6 @@ CONFIG_UART_TXBUFSIZE=256
CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
CONFIG_LINKER_START_AREA=0x5200
CONFIG_LINKER_CODE_AREA=0x5300
diff --git a/nuttx/configs/xtrs/pashello/defconfig b/nuttx/configs/xtrs/pashello/defconfig
index d187ccec5..0d80ec074 100644
--- a/nuttx/configs/xtrs/pashello/defconfig
+++ b/nuttx/configs/xtrs/pashello/defconfig
@@ -55,7 +55,6 @@ CONFIG_UART_TXBUFSIZE=256
CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
CONFIG_LINKER_START_AREA=0x5200
CONFIG_LINKER_CODE_AREA=0x5300
diff --git a/nuttx/configs/z16f2800100zcog/ostest/defconfig b/nuttx/configs/z16f2800100zcog/ostest/defconfig
index 24cca2a6a..0bfb09ea8 100644
--- a/nuttx/configs/z16f2800100zcog/ostest/defconfig
+++ b/nuttx/configs/z16f2800100zcog/ostest/defconfig
@@ -73,7 +73,6 @@ CONFIG_UART1_2STOP=0
CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/z16f2800100zcog/pashello/defconfig b/nuttx/configs/z16f2800100zcog/pashello/defconfig
index daf98c7d6..1c2fb80f2 100644
--- a/nuttx/configs/z16f2800100zcog/pashello/defconfig
+++ b/nuttx/configs/z16f2800100zcog/pashello/defconfig
@@ -73,7 +73,6 @@ CONFIG_UART1_2STOP=0
CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/z80sim/nsh/defconfig b/nuttx/configs/z80sim/nsh/defconfig
index 87195b6e8..5dd0cdc4b 100644
--- a/nuttx/configs/z80sim/nsh/defconfig
+++ b/nuttx/configs/z80sim/nsh/defconfig
@@ -55,7 +55,6 @@ CONFIG_UART_TXBUFSIZE=64
CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/z80sim/ostest/defconfig b/nuttx/configs/z80sim/ostest/defconfig
index 4fbca2e16..9fa525259 100644
--- a/nuttx/configs/z80sim/ostest/defconfig
+++ b/nuttx/configs/z80sim/ostest/defconfig
@@ -55,7 +55,6 @@ CONFIG_UART_TXBUFSIZE=0
CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/z80sim/pashello/defconfig b/nuttx/configs/z80sim/pashello/defconfig
index 1c50f71ff..db32f93fb 100644
--- a/nuttx/configs/z80sim/pashello/defconfig
+++ b/nuttx/configs/z80sim/pashello/defconfig
@@ -55,7 +55,6 @@ CONFIG_UART_TXBUFSIZE=0
CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/z8encore000zco/ostest/defconfig b/nuttx/configs/z8encore000zco/ostest/defconfig
index 2fb427105..35ed60aba 100644
--- a/nuttx/configs/z8encore000zco/ostest/defconfig
+++ b/nuttx/configs/z8encore000zco/ostest/defconfig
@@ -71,7 +71,6 @@ CONFIG_UART1_2STOP=0
CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/configs/z8f64200100kit/ostest/defconfig b/nuttx/configs/z8f64200100kit/ostest/defconfig
index d9c5a51a5..338434698 100644
--- a/nuttx/configs/z8f64200100kit/ostest/defconfig
+++ b/nuttx/configs/z8f64200100kit/ostest/defconfig
@@ -71,7 +71,6 @@ CONFIG_UART1_2STOP=0
CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_RAW_BINARY=n
-CONFIG_HAVE_LIBM=n
#
# General OS setup
diff --git a/nuttx/lib/Kconfig b/nuttx/lib/Kconfig
index ddd5e2dde..77cf62665 100644
--- a/nuttx/lib/Kconfig
+++ b/nuttx/lib/Kconfig
@@ -30,12 +30,27 @@ config LIB_HOMEDIR
---help---
The home directory to use with operations like such as 'cd ~'
-config HAVE_LIBM
- bool "Architecture-specific libm.a"
+config LIBM
+ bool "Math library"
default n
+ depends on !ARCH_MATH_H
---help---
- Architecture specific logic provides an implementation of libm.a
- and a math.h header file that can be found at include/arch/math.h.
+ By default, no math library will be provided by NuttX. In this this case, it
+ is assumed that (1) no math library is required, or (2) you will be using the
+ math.h header file and the libm library provided by your toolchain.
+
+ This is may be a very good choice is possible because your toolchain may have
+ have a highly optimized version of libm.
+
+ Another possibility is that you have a custom, architecture-specific math
+ libary and that the corresponding math.h file resides at arch/<architecture>/include/math.h.
+ The option is selected via ARCH_MATH_H. If ARCH_MATH_H is selected,then the include/nuttx/math.h
+ header file will be copied to include/math.h where it can be used by your applications.
+
+ If ARCH_MATH_H is not defined, then this option can be selected to build a generic,
+ math library built into NuttX. This math library comes from the Rhombus OS and
+ was written by Nick Johnson. The Rhombus OS math library port was contributed by
+ Darcy Gong.
config NOPRINTF_FIELDWIDTH
bool "Disable sprintf support fieldwidth"
diff --git a/nuttx/lib/Makefile b/nuttx/lib/Makefile
index fc8f0c4dd..5c62967ce 100644
--- a/nuttx/lib/Makefile
+++ b/nuttx/lib/Makefile
@@ -50,7 +50,7 @@ include pthread/Make.defs
include semaphore/Make.defs
include signal/Make.defs
include mqueue/Make.defs
-include math/Make.defs
+include fixedmath/Make.defs
include net/Make.defs
include time/Make.defs
include libgen/Make.defs
diff --git a/nuttx/lib/README.txt b/nuttx/lib/README.txt
index 63d1c343c..e99304841 100644
--- a/nuttx/lib/README.txt
+++ b/nuttx/lib/README.txt
@@ -26,7 +26,8 @@ in the include/ directory provides the prototype for library functions. So
we have:
libgen - libgen.h
- math - math.h and fixedmath.h
+ fixedmath - fixedmath.h
+ math - math.h
mqueue - pthread.h
net - Various network-related header files: netinet/ether.h, arpa/inet.h
pthread - pthread.h
diff --git a/nuttx/lib/fixedmath/Make.defs b/nuttx/lib/fixedmath/Make.defs
new file mode 100644
index 000000000..578e33015
--- /dev/null
+++ b/nuttx/lib/fixedmath/Make.defs
@@ -0,0 +1,43 @@
+############################################################################
+# lib/fixedmath/Make.defs
+#
+# Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
+# Author: Gregory Nutt <gnutt@nuttx.org>
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# 3. Neither the name NuttX nor the names of its contributors may be
+# used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
+############################################################################
+
+# Add the fixed precision math C files to the build
+
+CSRCS += lib_rint.c lib_fixedmath.c lib_b16sin.c lib_b16cos.c lib_b16atan2.c
+
+# Add the fixed precision math directory to the build
+
+DEPPATH += --dep-path fixedmath
+VPATH += :fixedmath
diff --git a/nuttx/lib/math/lib_b16atan2.c b/nuttx/lib/fixedmath/lib_b16atan2.c
index 8792fa087..69d132f80 100644
--- a/nuttx/lib/math/lib_b16atan2.c
+++ b/nuttx/lib/fixedmath/lib_b16atan2.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * lib/math/lib_b16atan2.c
+ * lib/fixedmath/lib_b16atan2.c
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
diff --git a/nuttx/lib/math/lib_b16cos.c b/nuttx/lib/fixedmath/lib_b16cos.c
index 7547871f6..3e9229029 100644
--- a/nuttx/lib/math/lib_b16cos.c
+++ b/nuttx/lib/fixedmath/lib_b16cos.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * lib/math/lib_b16cos.c
+ * lib/fixedmath/lib_b16cos.c
*
* Copyright (C) 2007, 2008, 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
diff --git a/nuttx/lib/math/lib_b16sin.c b/nuttx/lib/fixedmath/lib_b16sin.c
index 1eee17993..491b0ec78 100644
--- a/nuttx/lib/math/lib_b16sin.c
+++ b/nuttx/lib/fixedmath/lib_b16sin.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * lib/math/lib_b16sin.c
+ * lib/fixedmath/lib_b16sin.c
*
* Copyright (C) 2008, 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
diff --git a/nuttx/lib/math/lib_fixedmath.c b/nuttx/lib/fixedmath/lib_fixedmath.c
index c1a710e73..c1a710e73 100644
--- a/nuttx/lib/math/lib_fixedmath.c
+++ b/nuttx/lib/fixedmath/lib_fixedmath.c
diff --git a/nuttx/lib/math/lib_rint.c b/nuttx/lib/fixedmath/lib_rint.c
index bd861eced..3a6407b8c 100644
--- a/nuttx/lib/math/lib_rint.c
+++ b/nuttx/lib/fixedmath/lib_rint.c
@@ -1,5 +1,5 @@
/************************************************************
- * lib/math/lib_rint.c
+ * lib/fixedmath/lib_rint.c
*
* Copyright (C) 2007, 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
diff --git a/nuttx/lib/math/Kconfig b/nuttx/lib/math/Kconfig
new file mode 100644
index 000000000..ae2bf3130
--- /dev/null
+++ b/nuttx/lib/math/Kconfig
@@ -0,0 +1,4 @@
+#
+# For a description of the syntax of this configuration file,
+# see misc/tools/kconfig-language.txt.
+#
diff --git a/nuttx/lib/math/Make.defs b/nuttx/lib/math/Make.defs
index 126cd2f47..f656e1a73 100644
--- a/nuttx/lib/math/Make.defs
+++ b/nuttx/lib/math/Make.defs
@@ -1,7 +1,7 @@
############################################################################
# lib/math/Make.defs
#
-# Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
+# Copyright (C) 2012 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
@@ -33,11 +33,17 @@
#
############################################################################
-# Add the math C files to the build
+if ($(CONFIG_LIBM),y)
-CSRCS += lib_rint.c lib_fixedmath.c lib_b16sin.c lib_b16cos.c lib_b16atan2.c
+# Add the floating point math C files to the build
-# Add the math directory to the build
+CSRCS += lib_acos.c lib_asin.c lib_atan.c lib_atan2.c lib_ceil.c lib_cos.c
+CSRCS += lib_cosh.c lib_exp.c lib_fabs.c lib_floor.c lib_fmod.c lib_frexp.c
+CRRCS += lib_ldexp.c lib_log.c lib_log10.c lib_log2.c lib_modf.c lib_pow.c
+CSRCS += lib_sin.c lib_sinh.c lib_sqrt.c lib_tan.c lib_tanh.c
+
+# Add the floating point math directory to the build
DEPPATH += --dep-path math
VPATH += :math
+endif
diff --git a/nuttx/lib/math/Makefile b/nuttx/lib/math/Makefile
new file mode 100644
index 000000000..56be0f0ab
--- /dev/null
+++ b/nuttx/lib/math/Makefile
@@ -0,0 +1,100 @@
+############################################################################
+# nuttx/lib/math/Makefile
+#
+# Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
+# Author: Gregory Nutt <gnutt@nuttx.org>
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# 3. Neither the name NuttX nor the names of its contributors may be
+# used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
+############################################################################
+
+-include $(TOPDIR)/.config
+-include $(TOPDIR)/Make.defs
+include $(APPDIR)/Make.defs
+
+# NSH Library
+
+ASRCS =
+CSRCS =
+
+ifeq ($(CONFIG_MATHEXT_LIBRARY),y)
+CSRCS += m_cos.c m_log2.c m_fmod.c m_sin.c m_fabs.c m_exp.c m_asin.c m_tan.c \
+ m_modf.c m_ldexp.c m_acos.c m_frexp.c m_atan.c m_log.c m_tanh.c m_ceil.c \
+ m_sinh.c m_sqrt.c m_pow.c m_cosh.c m_floor.c m_atan2.c m_log10.c
+endif
+
+AOBJS = $(ASRCS:.S=$(OBJEXT))
+COBJS = $(CSRCS:.c=$(OBJEXT))
+
+SRCS = $(ASRCS) $(CSRCS)
+OBJS = $(AOBJS) $(COBJS)
+
+ifeq ($(WINTOOL),y)
+ BIN = "${shell cygpath -w $(APPDIR)/libapps$(LIBEXT)}"
+else
+ BIN = "$(APPDIR)/libapps$(LIBEXT)"
+endif
+
+ROOTDEPPATH = --dep-path .
+VPATH =
+
+# Build targets
+
+all: .built
+.PHONY: context .depend depend clean distclean
+
+$(AOBJS): %$(OBJEXT): %.S
+ $(call ASSEMBLE, $<, $@)
+
+$(COBJS): %$(OBJEXT): %.c
+ $(call COMPILE, $<, $@)
+
+.built: $(OBJS)
+ @( for obj in $(OBJS) ; do \
+ $(call ARCHIVE, $(BIN), $${obj}); \
+ done ; )
+ @touch .built
+
+context:
+
+.depend: Makefile $(SRCS)
+ @$(MKDEP) $(ROOTDEPPATH) \
+ $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
+ @touch $@
+
+depend: .depend
+
+clean:
+ @rm -f *.o *~ .*.swp .built
+ $(call CLEAN)
+
+distclean: clean
+ @rm -f Make.dep .depend
+
+-include Make.dep
+
diff --git a/nuttx/lib/math/lib_acos.c b/nuttx/lib/math/lib_acos.c
new file mode 100644
index 000000000..83650d132
--- /dev/null
+++ b/nuttx/lib/math/lib_acos.c
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2009, 2010 Nick Johnson <nickbjohnson4224 at gmail.com>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include <apps/math.h>
+#include <float.h>
+
+float acosf(float x) {
+ return (M_PI_2 - asinf(x));
+}
+
+double acos(double x) {
+ return (M_PI_2 - asin(x));
+}
+
+long double acosl(long double x) {
+ return (M_PI_2 - asinl(x));
+}
diff --git a/nuttx/lib/math/lib_asin.c b/nuttx/lib/math/lib_asin.c
new file mode 100644
index 000000000..9d72e8042
--- /dev/null
+++ b/nuttx/lib/math/lib_asin.c
@@ -0,0 +1,88 @@
+/*
+ * Copyright (C) 2009-2011 Nick Johnson <nickbjohnson4224 at gmail.com>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include <apps/math.h>
+#include <float.h>
+
+float asinf(float x) {
+ long double y, y_sin, y_cos;
+
+ y = 0;
+
+ while (1) {
+ y_sin = sinf(y);
+ y_cos = cosf(y);
+
+ if (y > M_PI_2 || y < -M_PI_2) {
+ y = fmodf(y, M_PI);
+ }
+
+ if (y_sin + DBL_EPSILON >= x && y_sin - DBL_EPSILON <= x) {
+ break;
+ }
+
+ y = y - (y_sin - x) / y_cos;
+ }
+
+ return y;
+}
+
+double asin(double x) {
+ long double y, y_sin, y_cos;
+
+ y = 0;
+
+ while (1) {
+ y_sin = sin(y);
+ y_cos = cos(y);
+
+ if (y > M_PI_2 || y < -M_PI_2) {
+ y = fmod(y, M_PI);
+ }
+
+ if (y_sin + DBL_EPSILON >= x && y_sin - DBL_EPSILON <= x) {
+ break;
+ }
+
+ y = y - (y_sin - x) / y_cos;
+ }
+
+ return y;
+}
+
+long double asinl(long double x) {
+ long double y, y_sin, y_cos;
+
+ y = 0;
+
+ while (1) {
+ y_sin = sinl(y);
+ y_cos = cosl(y);
+
+ if (y > M_PI_2 || y < -M_PI_2) {
+ y = fmodl(y, M_PI);
+ }
+
+ if (y_sin + LDBL_EPSILON >= x && y_sin - LDBL_EPSILON <= x) {
+ break;
+ }
+
+ y = y - (y_sin - x) / y_cos;
+ }
+
+ return y;
+}
+
diff --git a/nuttx/lib/math/lib_atan.c b/nuttx/lib/math/lib_atan.c
new file mode 100644
index 000000000..e909e5a8e
--- /dev/null
+++ b/nuttx/lib/math/lib_atan.c
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2009-2011 Nick Johnson <nickbjohnson4224 at gmail.com>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include <apps/math.h>
+#include <float.h>
+#include <stddef.h>
+#include <stdint.h>
+
+float atanf(float x) {
+ return asinf(x / sqrtf(x * x + 1));
+}
+
+double atan(double x) {
+ return asin(x / sqrt(x * x + 1));
+}
+
+long double atanl(long double x) {
+ return asinl(x / sqrtl(x * x + 1));
+}
diff --git a/nuttx/lib/math/lib_atan2.c b/nuttx/lib/math/lib_atan2.c
new file mode 100644
index 000000000..b4ded0c16
--- /dev/null
+++ b/nuttx/lib/math/lib_atan2.c
@@ -0,0 +1,120 @@
+/*
+ * Copyright (C) 2009, 2010 Nick Johnson <nickbjohnson4224 at gmail.com>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include <apps/math.h>
+#include <float.h>
+
+float atan2f(float y, float x) {
+
+ if (y == 0.0) {
+ if (x >= 0.0) {
+ return 0.0;
+ }
+ else {
+ return M_PI;
+ }
+ }
+ else if (y > 0.0) {
+ if (x == 0.0) {
+ return M_PI_2;
+ }
+ else if (x > 0.0) {
+ return atanf(y / x);
+ }
+ else {
+ return M_PI - atanf(y / x);
+ }
+ }
+ else {
+ if (x == 0.0) {
+ return M_PI + M_PI_2;
+ }
+ else if (x > 0.0) {
+ return 2 * M_PI - atanf(y / x);
+ }
+ else {
+ return M_PI + atanf(y / x);
+ }
+ }
+}
+
+double atan2(double y, double x) {
+
+ if (y == 0.0) {
+ if (x >= 0.0) {
+ return 0.0;
+ }
+ else {
+ return M_PI;
+ }
+ }
+ else if (y > 0.0) {
+ if (x == 0.0) {
+ return M_PI_2;
+ }
+ else if (x > 0.0) {
+ return atan(y / x);
+ }
+ else {
+ return M_PI - atan(y / x);
+ }
+ }
+ else {
+ if (x == 0.0) {
+ return M_PI + M_PI_2;
+ }
+ else if (x > 0.0) {
+ return 2 * M_PI - atan(y / x);
+ }
+ else {
+ return M_PI + atan(y / x);
+ }
+ }
+}
+
+long double atan2l(long double y, long double x) {
+
+ if (y == 0.0) {
+ if (x >= 0.0) {
+ return 0.0;
+ }
+ else {
+ return M_PI;
+ }
+ }
+ else if (y > 0.0) {
+ if (x == 0.0) {
+ return M_PI_2;
+ }
+ else if (x > 0.0) {
+ return atanl(y / x);
+ }
+ else {
+ return M_PI - atanl(y / x);
+ }
+ }
+ else {
+ if (x == 0.0) {
+ return M_PI + M_PI_2;
+ }
+ else if (x > 0.0) {
+ return 2 * M_PI - atanl(y / x);
+ }
+ else {
+ return M_PI + atanl(y / x);
+ }
+ }
+}
diff --git a/nuttx/lib/math/lib_ceil.c b/nuttx/lib/math/lib_ceil.c
new file mode 100644
index 000000000..c2447c0b8
--- /dev/null
+++ b/nuttx/lib/math/lib_ceil.c
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2009-2011 Nick Johnson <nickbjohnson4224 at gmail.com>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include <apps/math.h>
+#include <float.h>
+
+float ceilf(float x) {
+ modff(x, &x);
+ if (x > 0.0) x += 1.0;
+ return x;
+}
+
+double ceil(double x) {
+ modf(x, &x);
+ if (x > 0.0) x += 1.0;
+ return x;
+}
+
+long double ceill(long double x) {
+ modfl(x, &x);
+ if (x > 0.0) x += 1.0;
+ return x;
+}
+
diff --git a/nuttx/lib/math/lib_cos.c b/nuttx/lib/math/lib_cos.c
new file mode 100644
index 000000000..f8732b041
--- /dev/null
+++ b/nuttx/lib/math/lib_cos.c
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2009, 2010 Nick Johnson <nickbjohnson4224 at gmail.com>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include <stdint.h>
+#include <float.h>
+#include <apps/math.h>
+
+float cosf(float x) {
+ return sinf(x + M_PI_2);
+}
+
+double cos(double x) {
+ return sin(x + M_PI_2);
+}
+
+long double cosl(long double x) {
+ return sinl(x + M_PI_2);
+}
diff --git a/nuttx/lib/math/lib_cosh.c b/nuttx/lib/math/lib_cosh.c
new file mode 100644
index 000000000..106990311
--- /dev/null
+++ b/nuttx/lib/math/lib_cosh.c
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2009, 2010 Nick Johnson <nickbjohnson4224 at gmail.com>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include <apps/math.h>
+#include <float.h>
+
+float coshf(float x) {
+ x = expf(x);
+ return ((x + (1.0 / x)) / 2.0);
+}
+
+double cosh(double x) {
+ x = exp(x);
+ return ((x + (1.0 / x)) / 2.0);
+}
+
+long double coshl(long double x) {
+ x = expl(x);
+ return ((x + (1.0 / x)) / 2.0);
+}
diff --git a/nuttx/lib/math/lib_exp.c b/nuttx/lib/math/lib_exp.c
new file mode 100644
index 000000000..a70cb10e7
--- /dev/null
+++ b/nuttx/lib/math/lib_exp.c
@@ -0,0 +1,253 @@
+/*
+ * Copyright (C) 2009-2011 Nick Johnson <nickbjohnson4224 at gmail.com>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include <apps/math.h>
+#include <float.h>
+#include <stdint.h>
+#include <stdbool.h>
+#include <unistd.h>
+
+#define M_E2 (M_E * M_E)
+#define M_E4 (M_E2 * M_E2)
+#define M_E8 (M_E4 * M_E4)
+#define M_E16 (M_E8 * M_E8)
+#define M_E32 (M_E16 * M_E16)
+#define M_E64 (M_E32 * M_E32)
+#define M_E128 (M_E64 * M_E64)
+#define M_E256 (M_E128 * M_E128)
+#define M_E512 (M_E256 * M_E256)
+#define M_E1024 (M_E512 * M_E512)
+
+static double _expi_square_tbl[11] = {
+ M_E, // e^1
+ M_E2, // e^2
+ M_E4, // e^4
+ M_E8, // e^8
+ M_E16, // e^16
+ M_E32, // e^32
+ M_E64, // e^64
+ M_E128, // e^128
+ M_E256, // e^256
+ M_E512, // e^512
+ M_E1024, // e^1024
+};
+
+static double _expi(size_t n) {
+ size_t i;
+ double val;
+
+ if (n > 1024) {
+ return INFINITY;
+ }
+
+ val = 1.0;
+
+ for (i = 0; n; i++) {
+ if (n & (1 << i)) {
+ n &= ~(1 << i);
+ val *= _expi_square_tbl[i];
+ }
+ }
+
+ return val;
+}
+
+static float _flt_inv_fact[] = {
+ 1.0 / 1.0, // 1/0!
+ 1.0 / 1.0, // 1/1!
+ 1.0 / 2.0, // 1/2!
+ 1.0 / 6.0, // 1/3!
+ 1.0 / 24.0, // 1/4!
+ 1.0 / 120.0, // 1/5!
+ 1.0 / 720.0, // 1/6!
+ 1.0 / 5040.0, // 1/7!
+ 1.0 / 40320.0, // 1/8!
+ 1.0 / 362880.0, // 1/9!
+ 1.0 / 3628800.0, // 1/10!
+};
+
+float expf(float x) {
+ size_t int_part;
+ bool invert;
+ float value;
+ float x0;
+ size_t i;
+
+ if (x == 0) {
+ return 1;
+ }
+ else if (x < 0) {
+ invert = true;
+ x = -x;
+ }
+ else {
+ invert = false;
+ }
+
+ /* extract integer component */
+ int_part = (size_t) x;
+
+ /* set x to fractional component */
+ x -= (float) int_part;
+
+ /* perform Taylor series approximation with eleven terms */
+ value = 0.0;
+ x0 = 1.0;
+ for (i = 0; i < 10; i++) {
+ value += x0 * _flt_inv_fact[i];
+ x0 *= x;
+ }
+
+ /* multiply by exp of the integer component */
+ value *= _expi(int_part);
+
+ if (invert) {
+ return (1.0 / value);
+ }
+ else {
+ return value;
+ }
+}
+
+static double _dbl_inv_fact[] = {
+ 1.0 / 1.0, // 1 / 0!
+ 1.0 / 1.0, // 1 / 1!
+ 1.0 / 2.0, // 1 / 2!
+ 1.0 / 6.0, // 1 / 3!
+ 1.0 / 24.0, // 1 / 4!
+ 1.0 / 120.0, // 1 / 5!
+ 1.0 / 720.0, // 1 / 6!
+ 1.0 / 5040.0, // 1 / 7!
+ 1.0 / 40320.0, // 1 / 8!
+ 1.0 / 362880.0, // 1 / 9!
+ 1.0 / 3628800.0, // 1 / 10!
+ 1.0 / 39916800.0, // 1 / 11!
+ 1.0 / 479001600.0, // 1 / 12!
+ 1.0 / 6227020800.0, // 1 / 13!
+ 1.0 / 87178291200.0, // 1 / 14!
+ 1.0 / 1307674368000.0, // 1 / 15!
+ 1.0 / 20922789888000.0, // 1 / 16!
+ 1.0 / 355687428096000.0, // 1 / 17!
+ 1.0 / 6402373705728000.0, // 1 / 18!
+};
+
+double exp(double x) {
+ size_t int_part;
+ bool invert;
+ double value;
+ double x0;
+ size_t i;
+
+ if (x == 0) {
+ return 1;
+ }
+ else if (x < 0) {
+ invert = true;
+ x = -x;
+ }
+ else {
+ invert = false;
+ }
+
+ /* extract integer component */
+ int_part = (size_t) x;
+
+ /* set x to fractional component */
+ x -= (double) int_part;
+
+ /* perform Taylor series approximation with nineteen terms */
+ value = 0.0;
+ x0 = 1.0;
+ for (i = 0; i < 19; i++) {
+ value += x0 * _dbl_inv_fact[i];
+ x0 *= x;
+ }
+
+ /* multiply by exp of the integer component */
+ value *= _expi(int_part);
+
+ if (invert) {
+ return (1.0 / value);
+ }
+ else {
+ return value;
+ }
+}
+
+static long double _ldbl_inv_fact[] = {
+ 1.0 / 1.0, // 1 / 0!
+ 1.0 / 1.0, // 1 / 1!
+ 1.0 / 2.0, // 1 / 2!
+ 1.0 / 6.0, // 1 / 3!
+ 1.0 / 24.0, // 1 / 4!
+ 1.0 / 120.0, // 1 / 5!
+ 1.0 / 720.0, // 1 / 6!
+ 1.0 / 5040.0, // 1 / 7!
+ 1.0 / 40320.0, // 1 / 8!
+ 1.0 / 362880.0, // 1 / 9!
+ 1.0 / 3628800.0, // 1 / 10!
+ 1.0 / 39916800.0, // 1 / 11!
+ 1.0 / 479001600.0, // 1 / 12!
+ 1.0 / 6227020800.0, // 1 / 13!
+ 1.0 / 87178291200.0, // 1 / 14!
+ 1.0 / 1307674368000.0, // 1 / 15!
+ 1.0 / 20922789888000.0, // 1 / 16!
+ 1.0 / 355687428096000.0, // 1 / 17!
+ 1.0 / 6402373705728000.0, // 1 / 18!
+};
+
+long double expl(long double x) {
+ size_t int_part;
+ bool invert;
+ long double value;
+ long double x0;
+ size_t i;
+
+ if (x == 0) {
+ return 1;
+ }
+ else if (x < 0) {
+ invert = true;
+ x = -x;
+ }
+ else {
+ invert = false;
+ }
+
+ /* extract integer component */
+ int_part = (size_t) x;
+
+ /* set x to fractional component */
+ x -= (long double) int_part;
+
+ /* perform Taylor series approximation with nineteen terms */
+ value = 0.0;
+ x0 = 1.0;
+ for (i = 0; i < 19; i++) {
+ value += x0 * _ldbl_inv_fact[i];
+ x0 *= x;
+ }
+
+ /* multiply by exp of the integer component */
+ value *= _expi(int_part);
+
+ if (invert) {
+ return (1.0 / value);
+ }
+ else {
+ return value;
+ }
+}
diff --git a/nuttx/lib/math/lib_fabs.c b/nuttx/lib/math/lib_fabs.c
new file mode 100644
index 000000000..f479aa123
--- /dev/null
+++ b/nuttx/lib/math/lib_fabs.c
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2009, 2010 Nick Johnson <nickbjohnson4224 at gmail.com>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include <apps/math.h>
+#include <float.h>
+
+float fabsf(float x) {
+ return ((x < 0) ? -x : x);
+}
+
+double fabs(double x) {
+ return ((x < 0) ? -x : x);
+}
+
+long double fabsl(long double x) {
+ return ((x < 0) ? -x : x);
+}
diff --git a/nuttx/lib/math/lib_floor.c b/nuttx/lib/math/lib_floor.c
new file mode 100644
index 000000000..a6979ac8a
--- /dev/null
+++ b/nuttx/lib/math/lib_floor.c
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2009-2011 Nick Johnson <nickbjohnson4224 at gmail.com>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include <apps/math.h>
+#include <float.h>
+
+float floorf(float x) {
+ modff(x, &x);
+ if (x < 0.0) x -= 1.0;
+ return x;
+}
+
+double floor(double x) {
+ modf(x, &x);
+ if (x < 0.0) x -= 1.0;
+ return x;
+}
+
+long double floorl(long double x) {
+ modfl(x, &x);
+ if (x < 0.0) x -= 1.0;
+ return x;
+}
+
diff --git a/nuttx/lib/math/lib_fmod.c b/nuttx/lib/math/lib_fmod.c
new file mode 100644
index 000000000..532fa3360
--- /dev/null
+++ b/nuttx/lib/math/lib_fmod.c
@@ -0,0 +1,67 @@
+/*
+ * Copyright (C) 2009-2011 Nick Johnson <nickbjohnson4224 at gmail.com>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include <apps/math.h>
+#include <float.h>
+
+/* If GCC/CLang builtins are available, use them */
+#ifdef __GNUC__
+
+float fmodf(float x, float div) {
+ return __builtin_fmodf(x, div);
+}
+
+double fmod(double x, double div) {
+ return __builtin_fmod(x, div);
+}
+
+long double fmodl(long double x, long double div) {
+ return __builtin_fmodl(x, div);
+}
+
+#else
+
+float fmodf(float x, float div) {
+ float n0;
+
+ x /= div;
+ x = modff(x, &n0);
+ x *= div;
+
+ return x;
+}
+
+double fmod(double x, double div) {
+ double n0;
+
+ x /= div;
+ x = modf(x, &n0);
+ x *= div;
+
+ return x;
+}
+
+long double fmodl(long double x, long double div) {
+ long double n0;
+
+ x /= div;
+ x = modfl(x, &n0);
+ x *= div;
+
+ return x;
+}
+
+#endif
diff --git a/nuttx/lib/math/lib_frexp.c b/nuttx/lib/math/lib_frexp.c
new file mode 100644
index 000000000..102609dbe
--- /dev/null
+++ b/nuttx/lib/math/lib_frexp.c
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2009-2011 Nick Johnson <nickbjohnson4224 at gmail.com>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include <apps/math.h>
+#include <float.h>
+
+float frexpf(float x, int *exp) {
+ *exp = (int) ceilf(log2f(x));
+ return x / ldexpf(1.0, *exp);
+}
+
+double frexp(double x, int *exp) {
+ *exp = (int) ceil(log2(x));
+ return x / ldexp(1.0, *exp);
+}
+
+long double frexpl(long double x, int *exp) {
+ *exp = (int) ceill(log2(x));
+ return x / ldexpl(1.0, *exp);
+}
+
diff --git a/nuttx/lib/math/lib_ldexp.c b/nuttx/lib/math/lib_ldexp.c
new file mode 100644
index 000000000..2ca79221a
--- /dev/null
+++ b/nuttx/lib/math/lib_ldexp.c
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2009-2011 Nick Johnson <nickbjohnson4224 at gmail.com>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include <apps/math.h>
+#include <float.h>
+
+float ldexpf(float x, int n) {
+ return (x * powf(2.0, (float) n));
+}
+
+double ldexp(double x, int n) {
+ return (x * pow(2.0, (double) n));
+}
+
+long double ldexpl(long double x, int n) {
+ return (x * powl(2.0, (long double) n));
+}
+
diff --git a/nuttx/lib/math/lib_log.c b/nuttx/lib/math/lib_log.c
new file mode 100644
index 000000000..62af0368a
--- /dev/null
+++ b/nuttx/lib/math/lib_log.c
@@ -0,0 +1,113 @@
+/*
+ * Copyright (C) 2009, 2010 Nick Johnson <nickbjohnson4224 at gmail.com>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include <apps/math.h>
+#include <float.h>
+
+float logf(float x) {
+ float y, y_old, ey, epsilon;
+
+ y = 0.0;
+ y_old = 1.0;
+ epsilon = FLT_EPSILON;
+
+ while (y > y_old + epsilon || y < y_old - epsilon) {
+ y_old = y;
+ ey = exp(y);
+ y -= (ey - x) / ey;
+
+ if (y > 700.0) {
+ y = 700.0;
+ }
+ if (y < -700.0) {
+ y = -700.0;
+ }
+
+ epsilon = (fabs(y) > 1.0) ? fabs(y) * FLT_EPSILON : FLT_EPSILON;
+ }
+
+ if (y == 700.0) {
+ return INFINITY;
+ }
+ if (y == -700.0) {
+ return INFINITY;
+ }
+
+ return y;
+}
+
+double log(double x) {
+ double y, y_old, ey, epsilon;
+
+ y = 0.0;
+ y_old = 1.0;
+ epsilon = DBL_EPSILON;
+
+ while (y > y_old + epsilon || y < y_old - epsilon) {
+ y_old = y;
+ ey = exp(y);
+ y -= (ey - x) / ey;
+
+ if (y > 700.0) {
+ y = 700.0;
+ }
+ if (y < -700.0) {
+ y = -700.0;
+ }
+
+ epsilon = (fabs(y) > 1.0) ? fabs(y) * DBL_EPSILON : DBL_EPSILON;
+ }
+
+ if (y == 700.0) {
+ return INFINITY;
+ }
+ if (y == -700.0) {
+ return INFINITY;
+ }
+
+ return y;
+}
+
+long double logl(long double x) {
+ long double y, y_old, ey, epsilon;
+
+ y = 0.0;
+ y_old = 1.0;
+ epsilon = 1e-6; //fixme
+
+ while (y > y_old + epsilon || y < y_old - epsilon) {
+ y_old = y;
+ ey = expl(y);
+ y -= (ey - x) / ey;
+
+ if (y > 700.0) {
+ y = 700.0;
+ }
+ if (y < -700.0) {
+ y = -700.0;
+ }
+ }
+
+ if (y == 700.0) {
+ return INFINITY;
+ }
+ if (y == -700.0) {
+ return INFINITY;
+ }
+
+ return y;
+}
+
diff --git a/nuttx/lib/math/lib_log10.c b/nuttx/lib/math/lib_log10.c
new file mode 100644
index 000000000..855480ad6
--- /dev/null
+++ b/nuttx/lib/math/lib_log10.c
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2009, 2010 Nick Johnson <nickbjohnson4224 at gmail.com>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include <apps/math.h>
+#include <float.h>
+
+float log10f(float x) {
+ return (logf(x) / M_LN10);
+}
+
+double log10(double x) {
+ return (log(x) / M_LN10);
+}
+
+long double log10l(long double x) {
+ return (logl(x) / M_LN10);
+}
diff --git a/nuttx/lib/math/lib_log2.c b/nuttx/lib/math/lib_log2.c
new file mode 100644
index 000000000..f8eb541b2
--- /dev/null
+++ b/nuttx/lib/math/lib_log2.c
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2009, 2010 Nick Johnson <nickbjohnson4224 at gmail.com>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include <apps/math.h>
+#include <float.h>
+
+float log2f(float x) {
+ return (logf(x) / M_LN2);
+}
+
+double log2(double x) {
+ return (log(x) / M_LN2);
+}
+
+long double log2l(long double x) {
+ return (logl(x) / M_LN2);
+}
diff --git a/nuttx/lib/math/lib_modf.c b/nuttx/lib/math/lib_modf.c
new file mode 100644
index 000000000..1e6fadc11
--- /dev/null
+++ b/nuttx/lib/math/lib_modf.c
@@ -0,0 +1,65 @@
+/*
+ * Copyright (C) 2009-2011 Nick Johnson <nickbjohnson4224 at gmail.com>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include <apps/math.h>
+#include <float.h>
+#include <stdint.h>
+
+float modff(float x, float *iptr) {
+ if (fabsf(x) >= 8388608.0) {
+ *iptr = x;
+ return 0.0;
+ }
+ else if (fabs(x) < 1.0) {
+ *iptr = 0.0;
+ return x;
+ }
+ else {
+ *iptr = (float) (int) x;
+ return (x - *iptr);
+ }
+}
+
+double modf(double x, double *iptr) {
+ if (fabs(x) >= 4503599627370496.0) {
+ *iptr = x;
+ return 0.0;
+ }
+ else if (fabs(x) < 1.0) {
+ *iptr = 0.0;
+ return x;
+ }
+ else {
+ *iptr = (double) (int64_t) x;
+ return (x - *iptr);
+ }
+}
+
+long double modfl(long double x, long double *iptr) {
+ if (fabs(x) >= 4503599627370496.0) {
+ *iptr = x;
+ return 0.0;
+ }
+ else if (fabs(x) < 1.0) {
+ *iptr = 0.0;
+ return x;
+ }
+ else {
+ *iptr = (long double) (int64_t) x;
+ return (x - *iptr);
+ }
+}
+
diff --git a/nuttx/lib/math/lib_pow.c b/nuttx/lib/math/lib_pow.c
new file mode 100644
index 000000000..b353359eb
--- /dev/null
+++ b/nuttx/lib/math/lib_pow.c
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2009, 2010 Nick Johnson <nickbjohnson4224 at gmail.com>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include <apps/math.h>
+#include <float.h>
+
+float powf(float b, float e) {
+ return expf(e * logf(b));
+}
+
+double pow(double b, double e) {
+ return exp(e * log(b));
+}
+
+long double powl(long double b, long double e) {
+ return expl(e * logl(b));
+}
diff --git a/nuttx/lib/math/lib_sin.c b/nuttx/lib/math/lib_sin.c
new file mode 100644
index 000000000..e862104fd
--- /dev/null
+++ b/nuttx/lib/math/lib_sin.c
@@ -0,0 +1,152 @@
+/*
+ * Copyright (C) 2009-2011 Nick Johnson <nickbjohnson4224 at gmail.com>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include <stdint.h>
+#include <unistd.h>
+#include <float.h>
+#include <apps/math.h>
+
+static float _flt_inv_fact[] = {
+ 1.0 / 1.0, // 1 / 1!
+ 1.0 / 6.0, // 1 / 3!
+ 1.0 / 120.0, // 1 / 5!
+ 1.0 / 5040.0, // 1 / 7!
+ 1.0 / 362880.0, // 1 / 9!
+ 1.0 / 39916800.0, // 1 / 11!
+};
+
+float sinf(float x) {
+ float x_squared;
+ float sin_x;
+ size_t i;
+
+ /* move x to [-pi, pi) */
+ x = fmodf(x, 2 * M_PI);
+ if (x >= M_PI) x -= 2 * M_PI;
+ if (x < -M_PI) x += 2 * M_PI;
+
+ /* move x to [-pi/2, pi/2) */
+ if (x >= M_PI_2) x = M_PI - x;
+ if (x < -M_PI_2) x = -M_PI - x;
+
+ x_squared = x * x;
+ sin_x = 0.0;
+
+ /* perform Taylor series approximation for sin(x) with six terms */
+ for (i = 0; i < 6; i++) {
+ if (i % 2 == 0) {
+ sin_x += x * _flt_inv_fact[i];
+ }
+ else {
+ sin_x -= x * _flt_inv_fact[i];
+ }
+
+ x *= x_squared;
+ }
+
+ return sin_x;
+}
+
+static double _dbl_inv_fact[] = {
+ 1.0 / 1.0, // 1 / 1!
+ 1.0 / 6.0, // 1 / 3!
+ 1.0 / 120.0, // 1 / 5!
+ 1.0 / 5040.0, // 1 / 7!
+ 1.0 / 362880.0, // 1 / 9!
+ 1.0 / 39916800.0, // 1 / 11!
+ 1.0 / 6227020800.0, // 1 / 13!
+ 1.0 / 1307674368000.0, // 1 / 15!
+ 1.0 / 355687428096000.0, // 1 / 17!
+ 1.0 / 121645100408832000.0, // 1 / 19!
+};
+
+double sin(double x) {
+ double x_squared;
+ double sin_x;
+ size_t i;
+
+ /* move x to [-pi, pi) */
+ x = fmod(x, 2 * M_PI);
+ if (x >= M_PI) x -= 2 * M_PI;
+ if (x < -M_PI) x += 2 * M_PI;
+
+ /* move x to [-pi/2, pi/2) */
+ if (x >= M_PI_2) x = M_PI - x;
+ if (x < -M_PI_2) x = -M_PI - x;
+
+ x_squared = x * x;
+ sin_x = 0.0;
+
+ /* perform Taylor series approximation for sin(x) with ten terms */
+ for (i = 0; i < 10; i++) {
+ if (i % 2 == 0) {
+ sin_x += x * _dbl_inv_fact[i];
+ }
+ else {
+ sin_x -= x * _dbl_inv_fact[i];
+ }
+
+ x *= x_squared;
+ }
+
+ return sin_x;
+}
+
+static long double _ldbl_inv_fact[] = {
+ 1.0 / 1.0, // 1 / 1!
+ 1.0 / 6.0, // 1 / 3!
+ 1.0 / 120.0, // 1 / 5!
+ 1.0 / 5040.0, // 1 / 7!
+ 1.0 / 362880.0, // 1 / 9!
+ 1.0 / 39916800.0, // 1 / 11!
+ 1.0 / 6227020800.0, // 1 / 13!
+ 1.0 / 1307674368000.0, // 1 / 15!
+ 1.0 / 355687428096000.0, // 1 / 17!
+ 1.0 / 121645100408832000.0, // 1 / 19!
+};
+
+long double sinl(long double x) {
+ long double x_squared;
+ long double sin_x;
+ size_t i;
+
+ /* move x to [-pi, pi) */
+ x = fmodl(x, 2 * M_PI);
+ if (x >= M_PI) x -= 2 * M_PI;
+ if (x < -M_PI) x += 2 * M_PI;
+
+ /* move x to [-pi/2, pi/2) */
+ if (x >= M_PI_2) x = M_PI - x;
+ if (x < -M_PI_2) x = -M_PI - x;
+
+ x_squared = x * x;
+ sin_x = 0.0;
+
+ /* perform Taylor series approximation for sin(x) with ten terms */
+ for (i = 0; i < 10; i++) {
+ if (i % 2 == 0) {
+ sin_x += x * _ldbl_inv_fact[i];
+ }
+ else {
+ sin_x -= x * _ldbl_inv_fact[i];
+ }
+
+ x *= x_squared;
+ }
+
+ return sin_x;
+}
+
diff --git a/nuttx/lib/math/lib_sinh.c b/nuttx/lib/math/lib_sinh.c
new file mode 100644
index 000000000..10276d821
--- /dev/null
+++ b/nuttx/lib/math/lib_sinh.c
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2009, 2010 Nick Johnson <nickbjohnson4224 at gmail.com>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include <apps/math.h>
+#include <float.h>
+
+float sinhf(float x) {
+ x = expf(x);
+ return ((x - (1.0 / x)) / 2.0);
+}
+
+double sinh(double x) {
+ x = exp(x);
+ return ((x - (1.0 / x)) / 2.0);
+}
+
+long double sinhl(long double x) {
+ x = expl(x);
+ return ((x - (1.0 / x)) / 2.0);
+}
diff --git a/nuttx/lib/math/lib_sqrt.c b/nuttx/lib/math/lib_sqrt.c
new file mode 100644
index 000000000..206a7fe82
--- /dev/null
+++ b/nuttx/lib/math/lib_sqrt.c
@@ -0,0 +1,116 @@
+/*
+ * Copyright (C) 2009-2011 Nick Johnson <nickbjohnson4224 at gmail.com>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include <stdint.h>
+#include <float.h>
+#include <errno.h>
+#include <apps/math.h>
+
+static float __sqrt_approx(float x) {
+ int32_t i;
+
+ // floats + bit manipulation = +inf fun!
+ i = *((int32_t*) &x);
+ i = 0x1FC00000 + (i >> 1);
+ x = *((float*) &i);
+
+ return x;
+}
+
+float sqrtf(float x) {
+ float y;
+
+ // filter out invalid/trivial inputs
+ if (x < 0.0) { errno = EDOM; return NAN; }
+ if (isnan(x)) return NAN;
+ if (isinf(x)) return INFINITY;
+ if (x == 0.0) return 0.0;
+
+ // guess square root (using bit manipulation)
+ y = __sqrt_approx(x);
+
+ // perform three iterations of approximation
+ // this number (3) is definitely optimal
+ y = 0.5 * (y + x / y);
+ y = 0.5 * (y + x / y);
+ y = 0.5 * (y + x / y);
+
+ return y;
+}
+
+double sqrt(double x) {
+ long double y, y1;
+
+ // filter out invalid/trivial inputs
+ if (x < 0.0) { errno = EDOM; return NAN; }
+ if (isnan(x)) return NAN;
+ if (isinf(x)) return INFINITY;
+ if (x == 0.0) return 0.0;
+
+ // guess square root (using bit manipulation)
+ y = __sqrt_approx(x);
+
+ // perform four iterations of approximation
+ // this number (4) is definitely optimal
+ y = 0.5 * (y + x / y);
+ y = 0.5 * (y + x / y);
+ y = 0.5 * (y + x / y);
+ y = 0.5 * (y + x / y);
+
+ // if guess was terribe (out of range of float)
+ // repeat approximation until convergence
+ if (y * y < x - 1.0 || y * y > x + 1.0) {
+ y1 = -1.0;
+ while (y != y1) {
+ y1 = y;
+ y = 0.5 * (y + x / y);
+ }
+ }
+
+ return y;
+}
+
+long double sqrtl(long double x) {
+ long double y, y1;
+
+ // filter out invalid/trivial inputs
+ if (x < 0.0) { errno = EDOM; return NAN; }
+ if (isnan(x)) return NAN;
+ if (isinf(x)) return INFINITY;
+ if (x == 0.0) return 0.0;
+
+ // guess square root (using bit manipulation)
+ y = __sqrt_approx(x);
+
+ // perform four iterations of approximation
+ // this number (4) is definitely optimal
+ y = 0.5 * (y + x / y);
+ y = 0.5 * (y + x / y);
+ y = 0.5 * (y + x / y);
+ y = 0.5 * (y + x / y);
+
+ // if guess was terribe (out of range of float)
+ // repeat approximation until convergence
+ if (y * y < x - 1.0 || y * y > x + 1.0) {
+ y1 = -1.0;
+ while (y != y1) {
+ y1 = y;
+ y = 0.5 * (y + x / y);
+ }
+ }
+
+ return y;
+}
diff --git a/nuttx/lib/math/lib_tan.c b/nuttx/lib/math/lib_tan.c
new file mode 100644
index 000000000..c336a6260
--- /dev/null
+++ b/nuttx/lib/math/lib_tan.c
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2009, 2010 Nick Johnson <nickbjohnson4224 at gmail.com>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include <stdint.h>
+#include <float.h>
+#include <apps/math.h>
+
+float tanf(float x) {
+ return (sinf(x) / cosf(x));
+}
+
+double tan(double x) {
+ return (sin(x) / cos(x));
+}
+
+long double tanl(long double x) {
+ return (sinl(x) / cosl(x));
+}
diff --git a/nuttx/lib/math/lib_tanh.c b/nuttx/lib/math/lib_tanh.c
new file mode 100644
index 000000000..c6a1a1c87
--- /dev/null
+++ b/nuttx/lib/math/lib_tanh.c
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2009, 2010 Nick Johnson <nickbjohnson4224 at gmail.com>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include <apps/math.h>
+#include <float.h>
+
+float tanhf(float x) {
+ float x0 = expf(x);
+ float x1 = 1.0 / x0;
+
+ return ((x0 + x1) / (x0 - x1));
+}
+
+double tanh(double x) {
+ double x0 = exp(x);
+ double x1 = 1.0 / x0;
+
+ return ((x0 + x1) / (x0 - x1));
+}
+
+long double tanhl(long double x) {
+ long double x0 = exp(x);
+ long double x1 = 1.0 / x0;
+
+ return ((x0 + x1) / (x0 - x1));
+}