Compiles with ZDS-II
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@540 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
83f36eac7d
commit
e881da738c
@ -8,7 +8,7 @@
|
||||
<tr align="center" bgcolor="#e4e4e4">
|
||||
<td>
|
||||
<h1><big><font color="#3c34ec"><i>NuttX RTOS</i></font></big></h1>
|
||||
<p>Last Updated: January 8, 2008</p>
|
||||
<p>Last Updated: January 9, 2008</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -815,19 +815,20 @@ Linux or Cygwin.</blockquote>
|
||||
<tr>
|
||||
<td valign="top"><img src="favicon.ico"></td>
|
||||
<td bgcolor="#5eaee1">
|
||||
<b>Others?</b>
|
||||
<b>Others Environments?</b>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><br></td>
|
||||
<td>
|
||||
<p>
|
||||
The primary environmental dependency of NuttX is GNU make.
|
||||
The primary environmental dependency of NuttX are (1) GNU make,
|
||||
(2) bash scripting, and (3) Linux utilities (such as sed).
|
||||
If you have other platforms that support GNU make or make
|
||||
utilities that are compatible with GNU make, then it is very
|
||||
likely that NuttX would work in that environment as well.
|
||||
If GNU make is not supported, then some significant modification
|
||||
of the Make system would be required.
|
||||
likely that NuttX would work in that environment as well (with some
|
||||
porting effort). If GNU make is not supported, then some significant
|
||||
modification of the Make system would be required.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
8
Makefile
8
Makefile
@ -1,7 +1,7 @@
|
||||
############################################################
|
||||
############################################################################
|
||||
# Makefile
|
||||
#
|
||||
# Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
# Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
@ -14,7 +14,7 @@
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
# 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.
|
||||
#
|
||||
@ -31,7 +31,7 @@
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
############################################################
|
||||
############################################################################
|
||||
|
||||
TOPDIR := ${shell pwd | sed -e 's/ /\\ /g'}
|
||||
-include ${TOPDIR}/.config
|
||||
|
@ -1,7 +1,7 @@
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* arch/types.h
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2008 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -14,7 +14,7 @@
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
* 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.
|
||||
*
|
||||
@ -31,7 +31,7 @@
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/* This file should never be included directed but, rather,
|
||||
* only indirectly through sys/types.h
|
||||
@ -40,17 +40,17 @@
|
||||
#ifndef __ARCH_TYPES_H
|
||||
#define __ARCH_TYPES_H
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Type Declarations
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
@ -64,8 +64,6 @@ typedef short sint16;
|
||||
typedef unsigned short uint16;
|
||||
typedef int sint32;
|
||||
typedef unsigned int uint32;
|
||||
typedef long long sint64;
|
||||
typedef unsigned long long uint64;
|
||||
|
||||
/* This is the size of the interrupt state save returned by
|
||||
* irqsave()
|
||||
@ -75,8 +73,8 @@ typedef unsigned int irqstate_t;
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Global Function Prototypes
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#endif /* __ARCH_TYPES_H */
|
||||
|
@ -82,7 +82,7 @@ libarch$(LIBEXT): $(OBJS)
|
||||
board/libboard$(LIBEXT):
|
||||
$(MAKE) -C board TOPDIR="$(TOPDIR)" libboard$(LIBEXT)
|
||||
|
||||
nuttx: $(HEAD_AOBJ) board/libboard$(LIBEXT)
|
||||
nuttx$(EXEEXT): $(HEAD_AOBJ) board/libboard$(LIBEXT)
|
||||
$(LD) --entry=__start $(LDFLAGS) $(LDPATHES) -L$(BOARDDIR) -o $(TOPDIR)/$@ $(HEAD_AOBJ) \
|
||||
--start-group $(LDLIBS) -lboard --end-group $(EXTRA_LIBS) $(LIBGCC)
|
||||
|
||||
|
@ -37,7 +37,7 @@ include ${TOPDIR}/.config
|
||||
|
||||
# These are the directories where the ZNeo-II toolchain is installed
|
||||
|
||||
ZDSINSTALLDIR := C:/Program\ Files/ZiLOG/ZDSII_ZNEO_4.10.2
|
||||
ZDSINSTALLDIR := C:/Program\ Files/ZiLOG/ZDSII_ZNEO_4.11.0
|
||||
ZDSBINDIR := $(ZDSINSTALLDIR)/bin
|
||||
ZDSSTDINCDIR := $(ZDSINSTALLDIR)/include/std
|
||||
ZDSZILOGINCDIR := $(ZDSINSTALLDIR)/include/zilog
|
||||
|
13
configs/z16f2800100zcog/README.txt
Normal file
13
configs/z16f2800100zcog/README.txt
Normal file
@ -0,0 +1,13 @@
|
||||
README.txt
|
||||
^^^^^^^^^^
|
||||
|
||||
The ZDS-II version 4.10.2 will not compiler NuttX. It reports "internal
|
||||
errors" on some of the files. Upgreads to ZDS-II are available for download
|
||||
from the Zilog website: http://www.zilog.com/software/zds2.asp
|
||||
|
||||
Thusfar, I have encountered no insolvable problems with the newer 4.11.0
|
||||
version of the toolchain.
|
||||
|
||||
If you use any version of ZDS-II other than 4.11.0, you will have to modify
|
||||
two files: (1) configs/z16f2800100zcog/setenv.sh and (2) configs/z16f2800100zcog/Make.defs.
|
||||
|
@ -31,16 +31,21 @@
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
# Check how we were executed
|
||||
#
|
||||
if [ "$(basename $0)" = "setenv.sh" ] ; then
|
||||
echo "You must source this script, not run it!" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "${PATH_ORIG}" ]; then export PATH_ORIG="${PATH}"; fi
|
||||
|
||||
WD=`pwd`
|
||||
ZDSINSTALLDIR="C:/Program\ Files/ZiLOG/ZDSII_ZNEO_4.10.2"
|
||||
export PATH="${ZDSINSTALLDIR}/bin:/sbin:/usr/sbin:${PATH_ORIG}"
|
||||
|
||||
echo "PATH : ${PATH}"
|
||||
#
|
||||
# The ZDS-II toolchain lies outside of the Cygwin "sandbox" and
|
||||
# attempts to set the PATH variable do not have the desired effect.
|
||||
# Instead, alias are provided for all of the ZDS-II command line tools.
|
||||
# Version 4.11.0 installed in the default location is assumed here.
|
||||
#
|
||||
ZDSBINDIR="C:/Program\ Files/ZiLOG/ZDSII_ZNEO_4.11.0/bin"
|
||||
alias zneoasm="${ZDSBINDIR}/zneoasm.exe"
|
||||
alias zneocc="${ZDSBINDIR}/zneocc.exe"
|
||||
alias zneolib="${ZDSBINDIR}/zneolib.exe"
|
||||
alias zneolink="${ZDSBINDIR}/zneolink.exe"
|
@ -51,6 +51,7 @@
|
||||
/* Pre-processor */
|
||||
|
||||
# define CONFIG_CPP_HAVE_VARARGS 1 /* Supports variable argument macros */
|
||||
# define CONFIG_CPP_HAVE_WARNING 1 /* Supports #warning */
|
||||
|
||||
/* Intriniscs */
|
||||
|
||||
@ -131,6 +132,7 @@
|
||||
/* Pre-processor */
|
||||
|
||||
# define CONFIG_CPP_HAVE_VARARGS 1 /* Supports variable argument macros */
|
||||
# define CONFIG_CPP_HAVE_WARNING 1 /* Supports #warning */
|
||||
|
||||
/* Intriniscs */
|
||||
|
||||
@ -231,6 +233,7 @@
|
||||
/* Pre-processor */
|
||||
|
||||
# undef CONFIG_CPP_HAVE_VARARGS /* No variable argument macros */
|
||||
# undef CONFIG_CPP_HAVE_WARNING /* Does not support #warning */
|
||||
|
||||
/* Intriniscs */
|
||||
|
||||
@ -296,6 +299,7 @@
|
||||
#else
|
||||
|
||||
# undef CONFIG_CPP_HAVE_VARARGS
|
||||
# undef CONFIG_CPP_HAVE_WARNING
|
||||
# undef CONFIG_HAVE_FUNCTIONNAME
|
||||
# undef CONFIG_HAVE_WEAKFUNCTIONS
|
||||
# define weak_alias(name, aliasname)
|
||||
|
@ -1,7 +1,7 @@
|
||||
/********************************************************************************
|
||||
* signal.h
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -14,7 +14,7 @@
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
* 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.
|
||||
*
|
||||
@ -192,7 +192,7 @@ EXTERN int sigtimedwait(const sigset_t *set, struct siginfo *value,
|
||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
||||
EXTERN int sigqueue(int pid, int signo, const union sigval value);
|
||||
#else
|
||||
EXTERN int sigqueue(int pid, int signo, void *sival_ptr);
|
||||
EXTERN int sigqueue(int pid, int signo, FAR void *sival_ptr);
|
||||
#endif
|
||||
|
||||
#undef EXTERN
|
||||
|
@ -62,7 +62,9 @@ int fclose(FILE *stream)
|
||||
{
|
||||
ret = close(stream->fs_filedes);
|
||||
}
|
||||
#warning REVIEW for race conditions
|
||||
#ifdef CONFIG_CPP_HAVE_WARNING
|
||||
# warning REVIEW for race conditions
|
||||
#endif
|
||||
#if CONFIG_STDIO_BUFFER_SIZE > 0
|
||||
/* Destroy the semaphore */
|
||||
sem_destroy(&stream->fs_sem);
|
||||
|
@ -1,7 +1,7 @@
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* lib_libvsprintf.c
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -14,7 +14,7 @@
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
* 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.
|
||||
*
|
||||
@ -31,15 +31,15 @@
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Compilation Switches
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/compiler.h>
|
||||
#include <sys/types.h>
|
||||
@ -48,9 +48,9 @@
|
||||
|
||||
#include "lib_internal.h"
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
enum
|
||||
{
|
||||
@ -98,13 +98,13 @@ enum
|
||||
#define IS_NEGATE(f) (((f) & FLAG_NEGATE) != 0)
|
||||
#define IS_SIGNED(f) (((f) & (FLAG_SHOWPLUS|FLAG_NEGATE)) != 0)
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Private Type Declarations
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Private Function Prototypes
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/* Pointer to ASCII conversion */
|
||||
|
||||
@ -166,31 +166,31 @@ static void postjustify(struct lib_stream_s *obj, ubyte fmt,
|
||||
ubyte flags, int fieldwidth, int numwidth);
|
||||
#endif
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Global Constant Data
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Global Variables
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Private Constant Data
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
static const char g_nullstring[] = "(null)";
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Private Variables
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Name: ptohex
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_PTR_IS_NOT_INT
|
||||
static void ptohex(struct lib_stream_s *obj, ubyte flags, void *p)
|
||||
@ -229,9 +229,9 @@ static void ptohex(struct lib_stream_s *obj, ubyte flags, void *p)
|
||||
}
|
||||
}
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Name: getpsize
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CONFIG_NOPRINTF_FIELDWIDTH
|
||||
static int getpsize(ubyte flags, void *p)
|
||||
@ -247,9 +247,9 @@ static int getpsize(ubyte flags, void *p)
|
||||
#endif /* CONFIG_NOPRINTF_FIELDWIDTH */
|
||||
#endif /* CONFIG_PTR_IS_NOT_INT */
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Name: utodec
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
static void utodec(struct lib_stream_s *obj, unsigned int n)
|
||||
{
|
||||
@ -264,9 +264,9 @@ static void utodec(struct lib_stream_s *obj, unsigned int n)
|
||||
obj->put(obj, (remainder + (unsigned int)'0'));
|
||||
}
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Name: utohex
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
static void utohex(struct lib_stream_s *obj, unsigned int n, ubyte a)
|
||||
{
|
||||
@ -297,9 +297,9 @@ static void utohex(struct lib_stream_s *obj, unsigned int n, ubyte a)
|
||||
}
|
||||
}
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Name: utooct
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
static void utooct(struct lib_stream_s *obj, unsigned int n)
|
||||
{
|
||||
@ -314,9 +314,9 @@ static void utooct(struct lib_stream_s *obj, unsigned int n)
|
||||
obj->put(obj, (remainder + (unsigned int)'0'));
|
||||
}
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Name: utobin
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
static void utobin(struct lib_stream_s *obj, unsigned int n)
|
||||
{
|
||||
@ -331,9 +331,9 @@ static void utobin(struct lib_stream_s *obj, unsigned int n)
|
||||
obj->put(obj, (remainder + (unsigned int)'0'));
|
||||
}
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Name: lutoascii
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
static void utoascii(struct lib_stream_s *obj, ubyte fmt, ubyte flags, unsigned int n)
|
||||
{
|
||||
@ -442,9 +442,9 @@ static void utoascii(struct lib_stream_s *obj, ubyte fmt, ubyte flags, unsigned
|
||||
}
|
||||
}
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Name: fixup
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CONFIG_NOPRINTF_FIELDWIDTH
|
||||
static void fixup(ubyte fmt, ubyte *flags, int *n)
|
||||
@ -485,9 +485,9 @@ static void fixup(ubyte fmt, ubyte *flags, int *n)
|
||||
}
|
||||
}
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Name: getusize
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
static int getusize(ubyte fmt, ubyte flags, unsigned int n)
|
||||
{
|
||||
@ -500,9 +500,9 @@ static int getusize(ubyte fmt, ubyte flags, unsigned int n)
|
||||
#endif /* CONFIG_NOPRINTF_FIELDWIDTH */
|
||||
|
||||
#ifdef CONFIG_LONG_IS_NOT_INT
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Name: lutodec
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
static void lutodec(struct lib_stream_s *obj, unsigned long n)
|
||||
{
|
||||
@ -517,9 +517,9 @@ static void lutodec(struct lib_stream_s *obj, unsigned long n)
|
||||
obj->put(obj, (remainder + (unsigned int)'0'));
|
||||
}
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Name: lutohex
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
static void lutohex(struct lib_stream_s *obj, unsigned long n, ubyte a)
|
||||
{
|
||||
@ -550,9 +550,9 @@ static void lutohex(struct lib_stream_s *obj, unsigned long n, ubyte a)
|
||||
}
|
||||
}
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Name: lutooct
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
static void lutooct(struct lib_stream_s *obj, unsigned long n)
|
||||
{
|
||||
@ -567,9 +567,9 @@ static void lutooct(struct lib_stream_s *obj, unsigned long n)
|
||||
obj->put(obj, (remainder + (unsigned int)'0'));
|
||||
}
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Name: lutobin
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
static void lutobin(struct lib_stream_s *obj, unsigned long n)
|
||||
{
|
||||
@ -584,9 +584,9 @@ static void lutobin(struct lib_stream_s *obj, unsigned long n)
|
||||
obj->put(obj, (remainder + (unsigned int)'0'));
|
||||
}
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Name: lutoascii
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
static void lutoascii(struct lib_stream_s *obj, ubyte fmt, ubyte flags, unsigned long ln)
|
||||
{
|
||||
@ -690,9 +690,9 @@ static void lutoascii(struct lib_stream_s *obj, ubyte fmt, ubyte flags, unsigned
|
||||
}
|
||||
}
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Name: lfixup
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CONFIG_NOPRINTF_FIELDWIDTH
|
||||
static void lfixup(ubyte fmt, ubyte *flags, long *ln)
|
||||
@ -733,9 +733,9 @@ static void lfixup(ubyte fmt, ubyte *flags, long *ln)
|
||||
}
|
||||
}
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Name: getlusize
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
static int getlusize(ubyte fmt, ubyte flags, unsigned long ln)
|
||||
{
|
||||
@ -750,9 +750,9 @@ static int getlusize(ubyte fmt, ubyte flags, unsigned long ln)
|
||||
#endif /* CONFIG_LONG_IS_NOT_INT */
|
||||
|
||||
#ifdef CONFIG_HAVE_LONG_LONG
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Name: llutodec
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
static void llutodec(struct lib_stream_s *obj, unsigned long long n)
|
||||
{
|
||||
@ -767,9 +767,9 @@ static void llutodec(struct lib_stream_s *obj, unsigned long long n)
|
||||
obj->put(obj, (remainder + (unsigned int)'0'));
|
||||
}
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Name: llutohex
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
static void llutohex(struct lib_stream_s *obj, unsigned long long n, ubyte a)
|
||||
{
|
||||
@ -800,9 +800,9 @@ static void llutohex(struct lib_stream_s *obj, unsigned long long n, ubyte a)
|
||||
}
|
||||
}
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Name: llutooct
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
static void llutooct(struct lib_stream_s *obj, unsigned long long n)
|
||||
{
|
||||
@ -817,9 +817,9 @@ static void llutooct(struct lib_stream_s *obj, unsigned long long n)
|
||||
obj->put(obj, (remainder + (unsigned int)'0'));
|
||||
}
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Name: llutobin
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
static void llutobin(struct lib_stream_s *obj, unsigned long long n)
|
||||
{
|
||||
@ -834,9 +834,9 @@ static void llutobin(struct lib_stream_s *obj, unsigned long long n)
|
||||
obj->put(obj, (remainder + (unsigned int)'0'));
|
||||
}
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Name: llutoascii
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
static void llutoascii(struct lib_stream_s *obj, ubyte fmt, ubyte flags, unsigned long long lln)
|
||||
{
|
||||
@ -940,9 +940,9 @@ static void llutoascii(struct lib_stream_s *obj, ubyte fmt, ubyte flags, unsigne
|
||||
}
|
||||
}
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Name: llfixup
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CONFIG_NOPRINTF_FIELDWIDTH
|
||||
static void llfixup(ubyte fmt, ubyte *flags, long long *lln)
|
||||
@ -983,9 +983,9 @@ static void llfixup(ubyte fmt, ubyte *flags, long long *lln)
|
||||
}
|
||||
}
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Name: getllusize
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
static int getllusize(ubyte fmt, ubyte flags, unsigned long long lln)
|
||||
{
|
||||
@ -1000,9 +1000,9 @@ static int getllusize(ubyte fmt, ubyte flags, unsigned long long lln)
|
||||
#endif /* CONFIG_NOPRINTF_FIELDWIDTH */
|
||||
#endif /* CONFIG_HAVE_LONG_LONG */
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Name: prejustify
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
static void prejustify(struct lib_stream_s *obj, ubyte fmt,
|
||||
ubyte flags, int fieldwidth, int numwidth)
|
||||
@ -1064,9 +1064,9 @@ static void prejustify(struct lib_stream_s *obj, ubyte fmt,
|
||||
}
|
||||
}
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Name: postjustify
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
static void postjustify(struct lib_stream_s *obj, ubyte fmt,
|
||||
ubyte flags, int fieldwidth, int numwidth)
|
||||
@ -1095,13 +1095,13 @@ static void postjustify(struct lib_stream_s *obj, ubyte fmt,
|
||||
break;
|
||||
}
|
||||
}
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* lib_vsprintf
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
int lib_vsprintf(struct lib_stream_s *obj, const char *src, va_list ap)
|
||||
{
|
||||
@ -1465,7 +1465,9 @@ int lib_vsprintf(struct lib_stream_s *obj, const char *src, va_list ap)
|
||||
|
||||
else if (strchr("eEfgG", *src))
|
||||
{
|
||||
#warning "No floating point support"
|
||||
#ifdef CONFIG_CPP_HAVE_WARNING
|
||||
# warning "No floating point support"
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* lib_printf.c
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -14,7 +14,7 @@
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
* 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.
|
||||
*
|
||||
@ -31,58 +31,58 @@
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Compilation Switches
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#include <stdio.h>
|
||||
#include "lib_internal.h"
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Private Type Declarations
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Private Function Prototypes
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Global Function Prototypes
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/**********************************************************
|
||||
/**************************************************************************
|
||||
* Global Constant Data
|
||||
**********************************************************/
|
||||
**************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Global Variables
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/**********************************************************
|
||||
/**************************************************************************
|
||||
* Private Constant Data
|
||||
**********************************************************/
|
||||
**************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Private Variables
|
||||
**********************************************************/
|
||||
**************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Global Functions
|
||||
**********************************************************/
|
||||
**************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Name: printf
|
||||
**********************************************************/
|
||||
**************************************************************************/
|
||||
|
||||
int printf(const char *fmt, ...)
|
||||
{
|
||||
@ -97,7 +97,10 @@ int printf(const char *fmt, ...)
|
||||
#elif defined(CONFIG_ARCH_LOWPUTC)
|
||||
ret = lib_lowvprintf(fmt, ap);
|
||||
#else
|
||||
# warning "printf has no data sink"
|
||||
# ifdef CONFIG_CPP_HAVE_WARNING
|
||||
# warning "printf has no data sink"
|
||||
# endif
|
||||
# ret = 0;
|
||||
#endif
|
||||
va_end(ap);
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* lib_sscanf.c
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -14,7 +14,7 @@
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
* 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.
|
||||
*
|
||||
@ -31,11 +31,11 @@
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/compiler.h>
|
||||
#include <sys/types.h>
|
||||
@ -45,51 +45,51 @@
|
||||
#include <ctype.h>
|
||||
#include <debug.h>
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#define MAXLN 128
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Private Type Declarations
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Private Function Prototypes
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Global Function Prototypes
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
int vsscanf(char *buf, const char *s, va_list ap);
|
||||
|
||||
/**********************************************************
|
||||
/**************************************************************************
|
||||
* Global Constant Data
|
||||
**********************************************************/
|
||||
**************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Global Variables
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/**********************************************************
|
||||
/**************************************************************************
|
||||
* Private Constant Data
|
||||
**********************************************************/
|
||||
**************************************************************************/
|
||||
|
||||
static const char spaces[] = " \t\n\r\f\v";
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Private Variables
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Function: sscanf
|
||||
*
|
||||
* Description:
|
||||
* ANSI standard sscanf implementation.
|
||||
*
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
int sscanf(const char *buf, const char *fmt, ...)
|
||||
{
|
||||
@ -103,13 +103,13 @@ int sscanf(const char *buf, const char *fmt, ...)
|
||||
|
||||
} /* end sscanf */
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Function: vsscanf
|
||||
*
|
||||
* Description:
|
||||
* ANSI standard vsscanf implementation.
|
||||
*
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
int vsscanf(char *buf, const char *s, va_list ap)
|
||||
{
|
||||
int count;
|
||||
@ -261,7 +261,9 @@ int vsscanf(char *buf, const char *s, va_list ap)
|
||||
else if (*s == 'f')
|
||||
{
|
||||
#if 1
|
||||
# warning "No floating point conversions"
|
||||
# ifdef CONFIG_CPP_HAVE_WARNING
|
||||
# warning "No floating point conversions"
|
||||
# endif
|
||||
void *pv = va_arg(ap, void*);
|
||||
|
||||
lvdbg("vsscanf: Return 0.0 to %p\n", pv);
|
||||
|
@ -248,7 +248,7 @@ FAR void *realloc(FAR void *oldmem, size_t size)
|
||||
newnode->preceding = prev->size | MM_ALLOC_BIT;
|
||||
next->preceding = newnode->size | (next->preceding & MM_ALLOC_BIT);
|
||||
|
||||
/* Return the previous free node to the nodelist (with the new size) */
|
||||
/* Return the previous free node to the nodelist (with the new size) */
|
||||
|
||||
mm_addfreechunk(prev);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user