Another dtoa() fix from Mike Smith
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5229 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
d66c15fd74
commit
018b0e9970
@ -3469,4 +3469,5 @@
|
||||
xxx-nuttx-elf- vs. xxx-elf-
|
||||
* configs/shenzhou/*/Make.defs: Now uses the new buildroot 4.6.3
|
||||
EABI toolchain.
|
||||
* lib/stdio/lib_libdtoa.c: Another dtoa() fix from Mike Smith.
|
||||
|
||||
|
@ -416,13 +416,24 @@ Where <subdir> is one of the following:
|
||||
interface should also be functional, but is not enabled in this
|
||||
configuration).
|
||||
|
||||
nxflat:
|
||||
This builds the NXFLAT example at apps/examples/nxfalt.
|
||||
|
||||
NOTE: See note above with regard to the EABI/OABI buildroot
|
||||
toolchains. This example can only be built using the older
|
||||
OABI toolchain.
|
||||
|
||||
ostest:
|
||||
This configuration directory, performs a simple OS test using
|
||||
examples/ostest.
|
||||
|
||||
thttpd:
|
||||
This builds the THTTPD web server example using the THTTPD and
|
||||
the examples/thttpd application.
|
||||
the apps/examples/thttpd application.
|
||||
|
||||
NOTE: See note above with regard to the EABI/OABI buildroot
|
||||
toolchains. This example can only be built using the older
|
||||
OABI toolchain.
|
||||
|
||||
By default, all of these examples are built to be used with the Luminary
|
||||
Ethernet Bootloader (you can change the ld.script file in any of these
|
||||
|
@ -1,7 +1,7 @@
|
||||
############################################################################
|
||||
# configs/eagle100/nxflat/Make.defs
|
||||
#
|
||||
# Copyright (C) 2009 Gregory Nutt. All rights reserved.
|
||||
# Copyright (C) 2009, 2012 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
@ -40,7 +40,7 @@ include ${TOPDIR}/tools/Config.mk
|
||||
# make -- Will build for the devkitARM toolchain
|
||||
# make CROSSDEV=arm-eabi- -- Will build for the devkitARM toolchain
|
||||
# make CROSSDEV=arm-none-eabi- -- Will build for the CodeSourcery toolchain
|
||||
# make CROSSDEV=arm-nuttx-elf- -- Will build for the NuttX buildroot toolchain
|
||||
# make CROSSDEV=arm-nuttx-elf- -- Will build for the NuttX OABI buildroot toolchain
|
||||
|
||||
CROSSDEV = arm-eabi-
|
||||
CC = $(CROSSDEV)gcc
|
||||
@ -101,7 +101,7 @@ AFLAGS = $(CFLAGS) -D__ASSEMBLY__
|
||||
|
||||
NXFLATLDFLAGS1 = -r -d -warn-common
|
||||
NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) \
|
||||
-T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat-pcrel.ld \
|
||||
-T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat-gotoffset.ld \
|
||||
-no-check-sections
|
||||
LDNXFLATFLAGS = -e main -s 2048
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
############################################################################
|
||||
# configs/eagle100/thttpd/Make.defs
|
||||
#
|
||||
# Copyright (C) 2009 Gregory Nutt. All rights reserved.
|
||||
# Copyright (C) 2009, 2012 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
@ -40,7 +40,7 @@ include ${TOPDIR}/tools/Config.mk
|
||||
# make -- Will build for the devkitARM toolchain
|
||||
# make CROSSDEV=arm-eabi- -- Will build for the devkitARM toolchain
|
||||
# make CROSSDEV=arm-none-eabi- -- Will build for the CodeSourcery toolchain
|
||||
# make CROSSDEV=arm-nuttx-elf- -- Will build for the NuttX buildroot toolchain
|
||||
# make CROSSDEV=arm-nuttx-elf- -- Will build for the NuttX OABI buildroot toolchain
|
||||
|
||||
CROSSDEV = arm-eabi-
|
||||
CC = $(CROSSDEV)gcc
|
||||
@ -101,7 +101,7 @@ AFLAGS = $(CFLAGS) -D__ASSEMBLY__
|
||||
|
||||
NXFLATLDFLAGS1 = -r -d -warn-common
|
||||
NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) \
|
||||
-T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat-pcrel.ld \
|
||||
-T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat-gotoff.ld \
|
||||
-no-check-sections
|
||||
LDNXFLATFLAGS = -e main -s 2048
|
||||
|
||||
|
@ -800,6 +800,10 @@ Where <subdir> is one of the following:
|
||||
NOTE: You will need to build the NXFLAT toolchain as described
|
||||
above in order to use this example.
|
||||
|
||||
See also note above with regard to the EABI/OABI buildroot
|
||||
toolchains. This example can only be built using the older
|
||||
OABI toolchain.
|
||||
|
||||
Jumpers: Nothing special. Use the default base board jumper
|
||||
settings.
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
############################################################################
|
||||
# configs/lpcxpresso-lpc1768/thttpd/Make.defs
|
||||
#
|
||||
# Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
||||
# 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
|
||||
@ -59,11 +59,11 @@ endif
|
||||
ifeq ($(CONFIG_LPC17_BUILDROOT),y)
|
||||
# NuttX buildroot under Linux or Cygwin
|
||||
# OABI
|
||||
# CROSSDEV = arm-nuttx-elf-
|
||||
# ARCHCPUFLAGS = -mtune=cortex-m3 -march=armv7-m -mfloat-abi=soft
|
||||
CROSSDEV = arm-nuttx-elf-
|
||||
ARCHCPUFLAGS = -mtune=cortex-m3 -march=armv7-m -mfloat-abi=soft
|
||||
# EABI
|
||||
CROSSDEV = arm-nuttx-eabi-
|
||||
ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft
|
||||
# CROSSDEV = arm-nuttx-eabi-
|
||||
# ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft
|
||||
MAXOPTIMIZATION = -Os
|
||||
endif
|
||||
ifeq ($(CONFIG_LPC17_CODEREDW),y)
|
||||
@ -88,14 +88,14 @@ ifeq ($(WINTOOL),y)
|
||||
ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}"
|
||||
ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/thttpd/ld.script}"
|
||||
MAXOPTIMIZATION = -O2
|
||||
NXFLATLDSCRIPT = -T "${shell cygpath -w $(TOPDIR)/binfmt/libnxflat/gnu-nxflat-pcrel.ld}"
|
||||
NXFLATLDSCRIPT = -T "${shell cygpath -w $(TOPDIR)/binfmt/libnxflat/gnu-nxflat-gotoff.ld}"
|
||||
else
|
||||
# Linux/Cygwin-native toolchain
|
||||
MKDEP = $(TOPDIR)/tools/mkdeps.sh
|
||||
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
|
||||
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
|
||||
ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/thttpd/ld.script
|
||||
NXFLATLDSCRIPT = -T"$(TOPDIR)/binfmt/libnxflat/gnu-nxflat-pcrel.ld"
|
||||
NXFLATLDSCRIPT = -T"$(TOPDIR)/binfmt/libnxflat/gnu-nxflat-gotoff.ld"
|
||||
endif
|
||||
|
||||
CC = $(CROSSDEV)gcc
|
||||
|
@ -1025,6 +1025,10 @@ Where <subdir> is one of the following:
|
||||
This builds the THTTPD web server example using the THTTPD and
|
||||
the apps/examples/thttpd application.
|
||||
|
||||
NOTE: See note above with regard to the EABI/OABI buildroot
|
||||
toolchains. This example can only be built using the older
|
||||
OABI toolchain.
|
||||
|
||||
usbserial:
|
||||
This configuration directory exercises the USB serial class
|
||||
driver at apps/examples/usbserial. See apps/examples/README.txt for
|
||||
|
@ -1,7 +1,7 @@
|
||||
############################################################################
|
||||
# configs/olimex-lpc1766stk/thttpd/Make.defs
|
||||
#
|
||||
# Copyright (C) 2010 Gregory Nutt. All rights reserved.
|
||||
# Copyright (C) 2010, 2012 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
@ -59,11 +59,11 @@ endif
|
||||
ifeq ($(CONFIG_LPC17_BUILDROOT),y)
|
||||
# NuttX buildroot under Linux or Cygwin
|
||||
# OABI
|
||||
# CROSSDEV = arm-nuttx-elf-
|
||||
# ARCHCPUFLAGS = -mtune=cortex-m3 -march=armv7-m -mfloat-abi=soft
|
||||
CROSSDEV = arm-nuttx-elf-
|
||||
ARCHCPUFLAGS = -mtune=cortex-m3 -march=armv7-m -mfloat-abi=soft
|
||||
# EABI
|
||||
CROSSDEV = arm-nuttx-eabi-
|
||||
ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft
|
||||
# CROSSDEV = arm-nuttx-eabi-
|
||||
# ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft
|
||||
MAXOPTIMIZATION = -Os
|
||||
endif
|
||||
|
||||
@ -120,7 +120,7 @@ CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
|
||||
AFLAGS = $(CFLAGS) -D__ASSEMBLY__
|
||||
|
||||
NXFLATLDFLAGS1 = -r -d -warn-common
|
||||
NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat-pcrel.ld -no-check-sections
|
||||
NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat-gotoff.ld -no-check-sections
|
||||
LDNXFLATFLAGS = -e main -s 2048
|
||||
|
||||
OBJEXT = .o
|
||||
|
@ -223,10 +223,17 @@ static void lib_dtoa(FAR struct lib_outstream_s *obj, int fmt, int prec,
|
||||
/* Print the integer part to the left of the decimal point */
|
||||
|
||||
for (i = expt; i > 0; i--)
|
||||
{
|
||||
if (*digits != '\0')
|
||||
{
|
||||
obj->put(obj, *digits);
|
||||
digits++;
|
||||
}
|
||||
else
|
||||
{
|
||||
obj->put(obj, '0');
|
||||
}
|
||||
}
|
||||
|
||||
/* Get the length of the fractional part */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user