summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-02-11 19:16:45 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-02-11 19:16:45 +0000
commit86afffb7b3441d1ac33e5b82136bd58c3b0e8a97 (patch)
tree879ef02330adbf6a1dcd976cc90f649250592034
parentc57406e92f257c877a7dc8e9a8bfd21693f12b5c (diff)
downloadnuttx-86afffb7b3441d1ac33e5b82136bd58c3b0e8a97.tar.gz
nuttx-86afffb7b3441d1ac33e5b82136bd58c3b0e8a97.tar.bz2
nuttx-86afffb7b3441d1ac33e5b82136bd58c3b0e8a97.zip
Changes for Z8Encore\! compile
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@668 42af7a65-404d-4744-a932-0658087f49c3
-rw-r--r--nuttx/TODO13
-rw-r--r--nuttx/arch/z80/include/types.h34
-rw-r--r--nuttx/arch/z80/include/z8/irq.h17
-rw-r--r--nuttx/arch/z80/include/z8/types.h93
-rw-r--r--nuttx/arch/z80/include/z80/irq.h2
-rw-r--r--nuttx/arch/z80/include/z80/types.h86
-rw-r--r--nuttx/arch/z80/src/Makefile.zdsii8
-rw-r--r--nuttx/arch/z80/src/z8/chip.h66
-rw-r--r--nuttx/configs/z8encore000zco/ostest/Make.defs24
-rwxr-xr-xnuttx/configs/z8encore000zco/ostest/ostest.linkcmd83
-rw-r--r--nuttx/configs/z8encore000zco/ostest/ostest.zfpproj134
-rw-r--r--nuttx/configs/z8encore000zco/src/Makefile4
-rw-r--r--nuttx/include/nuttx/compiler.h45
-rw-r--r--nuttx/sched/clock_abstime2ticks.c8
-rw-r--r--nuttx/sched/clock_internal.h13
-rw-r--r--nuttx/sched/clock_ticks2time.c6
-rw-r--r--nuttx/sched/clock_time2ticks.c2
-rw-r--r--nuttx/sched/mq_timedreceive.c2
-rw-r--r--nuttx/sched/mq_timedsend.c2
-rw-r--r--nuttx/sched/pthread_condtimedwait.c2
20 files changed, 468 insertions, 176 deletions
diff --git a/nuttx/TODO b/nuttx/TODO
index 418a3a287..65cffeb29 100644
--- a/nuttx/TODO
+++ b/nuttx/TODO
@@ -20,7 +20,7 @@ NuttX TODO List (Last updated January 6, 2008)
(1) ARM/DM320 (arch/arm/src/dm320/)
(2) ARM/LPC214x (arch/arm/src/lpc214x/)
(4) pjrc-8052 / MCS51 (arch/pjrc-8051/)
- (2) z80 (arch/z80/)
+ (3) z80/z8 (arch/z80/)
(7) z16 (arch/z16/)
o Task/Scheduler (sched/)
@@ -353,13 +353,13 @@ o pjrc-8052 / MCS51 (arch/pjrc-8051/)
o z80 (arch/z80)
^^^^^^^^^^^^^^^
- Description: The Has the same problems with interger overflow during compilation
- as described for pjrc-8051. At typical cause is code like
+ Description: The SDCC version the same problems with interger overflow during
+ compilation as described for pjrc-8051. At typical cause is code like
usleep(500*1000) which exceeds the range of a 16-bit integer
Status: See pjrc-8051
Priority: See pjrc-8051
- Description: The simulated serial console (configs/z80sim/src/z80_serial.c +
+ Description: The simulated Z80 serial console (configs/z80sim/src/z80_serial.c +
driver/serial.c) does not work. This is because there are
no interrupts in the simulation so there is never any serial
traffic.
@@ -367,6 +367,11 @@ o z80 (arch/z80)
Priority: Low -- the simulated console is not critical path and the designs
to solve the problem are complex.
+ Description: ZDS-II Librarian complains that the source for the .obj file
+ is not in the library.
+ Status: Open
+ Priority: Low, thought to be cosmetic. I think this is a consequence of
+ replacing vs. inserting the library.
o z16 (arch/z16)
^^^^^^^^^^^^^^^^
diff --git a/nuttx/arch/z80/include/types.h b/nuttx/arch/z80/include/types.h
index ade00123a..5e1a3c42d 100644
--- a/nuttx/arch/z80/include/types.h
+++ b/nuttx/arch/z80/include/types.h
@@ -33,8 +33,8 @@
*
****************************************************************************/
-/* This file should never be included directed but, rather,
- * only indirectly through sys/types.h
+/* This file should never be included directed but, rather, only indirectly
+* through sys/types.h
*/
#ifndef __ARCH_TYPES_H
@@ -44,6 +44,8 @@
* Included Files
****************************************************************************/
+#include <arch/chip/types.h>
+
/****************************************************************************
* Definitions
****************************************************************************/
@@ -52,34 +54,6 @@
* Type Declarations
****************************************************************************/
-#ifndef __ASSEMBLY__
-
-/* These are the sizes of the standard SDCC types
- *
- * For SDCC, sizeof(int) is 16 and sizeof(long) is 32.
- * long long and double are not supported.
- *
- * Generic pointers are 3 bytes in length with the the
- * first byte holding data space intformation.
- */
-
-typedef char sbyte;
-typedef unsigned char ubyte;
-typedef unsigned char uint8;
-typedef unsigned char boolean;
-typedef int sint16;
-typedef unsigned int uint16;
-typedef long sint32;
-typedef unsigned long uint32;
-
-/* This is the size of the interrupt state save returned by
- * irqsave()
- */
-
-typedef uint16 irqstate_t;
-
-#endif /* __ASSEMBLY__ */
-
/****************************************************************************
* Global Function Prototypes
****************************************************************************/
diff --git a/nuttx/arch/z80/include/z8/irq.h b/nuttx/arch/z80/include/z8/irq.h
index 91a5ffd1c..27ea9f1c9 100644
--- a/nuttx/arch/z80/include/z8/irq.h
+++ b/nuttx/arch/z80/include/z8/irq.h
@@ -1,5 +1,5 @@
/****************************************************************************
- * arch/z8/irq.h
+ * arch/z8/include/z8/irq.h
* arch/chip/irq.h
*
* Copyright (C) 2008 Gregory Nutt. All rights reserved.
@@ -82,6 +82,18 @@
#define XCPTCONTEXT_REGS (9)
#define XCPTCONTEXT_SIZE (2 * XCPTCONTEXT_REGS)
+/* The ZDS-II provides built-in operations to test & disable and to restore
+ * the interrupt state.
+ *
+ * irqstate_t irqsave(void);
+ * void irqrestore(irqstate_t flags);
+ */
+
+#ifdef __ZILOG__
+# define irqsave() TDI()
+# define irqrestore(f) RI(f)
+#endif
+
/****************************************************************************
* Public Types
****************************************************************************/
@@ -135,9 +147,6 @@ extern "C" {
#define EXTERN extern
#endif
-EXTERN irqstate_t irqsave(void) __naked;
-EXTERN void irqrestore(irqstate_t flags) __naked;
-
#undef EXTERN
#ifdef __cplusplus
}
diff --git a/nuttx/arch/z80/include/z8/types.h b/nuttx/arch/z80/include/z8/types.h
new file mode 100644
index 000000000..97cb72d98
--- /dev/null
+++ b/nuttx/arch/z80/include/z8/types.h
@@ -0,0 +1,93 @@
+/****************************************************************************
+ * arch/z80/include/z8/types.h
+ * include/arch/chip/types.h
+ *
+ * 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
+ * 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 Gregory Nutt 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.
+ *
+ ****************************************************************************/
+
+/* This file should never be included directed but, rather, only indirectly
+ * through sys/types.h
+ */
+
+#ifndef __ARCH_CHIP_TYPES_H
+#define __ARCH_CHIP_TYPES_H
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+/****************************************************************************
+ * Definitions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Type Declarations
+ ****************************************************************************/
+
+#ifndef __ASSEMBLY__
+
+/* These are the sizes of the types supported by the ZiLOG Z8Encore! compiler:
+ *
+ * int - 16-bits
+ * short - 16-bits
+ * long - 32-bits
+ * char - 8-bits
+ * float - 32-bits
+ * double - 32-bits
+ *
+ * Pointers:
+ *
+ * near pointer - 8-bits
+ * far pointer - 16-bits
+ * rom pointer - 16-bits
+ */
+
+typedef char sbyte;
+typedef unsigned char ubyte;
+typedef unsigned char uint8;
+typedef unsigned char boolean;
+typedef int sint16;
+typedef unsigned int uint16;
+typedef long sint32;
+typedef unsigned long uint32;
+
+/* This is the size of the interrupt state save returned by irqsave() */
+
+typedef uint16 irqstate_t;
+
+#endif /* __ASSEMBLY__ */
+
+/****************************************************************************
+ * Global Function Prototypes
+ ****************************************************************************/
+
+#endif /* __ARCH_CHIP_TYPES_H */
diff --git a/nuttx/arch/z80/include/z80/irq.h b/nuttx/arch/z80/include/z80/irq.h
index 86bdfd273..f71ed208e 100644
--- a/nuttx/arch/z80/include/z80/irq.h
+++ b/nuttx/arch/z80/include/z80/irq.h
@@ -1,5 +1,5 @@
/****************************************************************************
- * arch/z80/irq.h
+ * arch/z80/include/z80/irq.h
* arch/chip/irq.h
*
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
diff --git a/nuttx/arch/z80/include/z80/types.h b/nuttx/arch/z80/include/z80/types.h
new file mode 100644
index 000000000..97efa0761
--- /dev/null
+++ b/nuttx/arch/z80/include/z80/types.h
@@ -0,0 +1,86 @@
+/****************************************************************************
+ * arch/z80/include/z80/types.h
+ * include/arch/chip/types.h
+ *
+ * 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
+ * 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 Gregory Nutt 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.
+ *
+ ****************************************************************************/
+
+/* This file should never be included directed but, rather, only indirectly
+ * through sys/types.h
+ */
+
+#ifndef __ARCH_CHIP_TYPES_H
+#define __ARCH_CHIP_TYPES_H
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+/****************************************************************************
+ * Definitions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Type Declarations
+ ****************************************************************************/
+
+#ifndef __ASSEMBLY__
+
+/* These are the sizes of the standard SDCC types
+ *
+ * For SDCC, sizeof(int) is 16 and sizeof(long) is 32. long long and double
+ * are not supported.
+ *
+ * Generic pointers are 3 bytes in length with the first byte holding data
+ * space information.
+ */
+
+typedef char sbyte;
+typedef unsigned char ubyte;
+typedef unsigned char uint8;
+typedef unsigned char boolean;
+typedef int sint16;
+typedef unsigned int uint16;
+typedef long sint32;
+typedef unsigned long uint32;
+
+/* This is the size of the interrupt state save returned by irqsave() */
+
+typedef uint16 irqstate_t;
+
+#endif /* __ASSEMBLY__ */
+
+/****************************************************************************
+ * Global Function Prototypes
+ ****************************************************************************/
+
+#endif /* __ARCH_CHIP_TYPES_H */
diff --git a/nuttx/arch/z80/src/Makefile.zdsii b/nuttx/arch/z80/src/Makefile.zdsii
index afe32ca90..199293ef3 100644
--- a/nuttx/arch/z80/src/Makefile.zdsii
+++ b/nuttx/arch/z80/src/Makefile.zdsii
@@ -93,9 +93,11 @@ nuttx.linkcmd: $(LINKCMDTEMPLATE)
echo " \"`cygpath -w $(TOPDIR)/$${lib}`\", \\" >>nuttx.linkcmd; \
done ; )
@echo " \"${shell cygpath -w $(ARCHSRCDIR)/board/libboard$(LIBEXT)}\", \\" >>nuttx.linkcmd
- @echo " \"${shell cygpath -w $(ZDSSTDLIBDIR)/chelpld$(LIBEXT)}\", \\" >>nuttx.linkcmd
- @echo " \"${shell cygpath -w $(ZDSSTDLIBDIR)/fpld$(LIBEXT)}\"" >>nuttx.linkcmd
-
+\ @echo " \"${shell cygpath -w $(ZDSSTDLIBDIR)/fpdumyLD$(LIBEXT)}\", \\" >>nuttx.linkcmd
+ @echo " \"${shell cygpath -w $(ZDSSTDLIBDIR)/chelpD$(LIBEXT)}\", \\" >>nuttx.linkcmd
+ @echo " \"${shell cygpath -w $(ZDSSTDLIBDIR)/csioLDD$(LIBEXT)}\", \\" >>nuttx.linkcmd
+ @echo " \"${shell cygpath -w $(ZDSSTDLIBDIR)/zsldevinitdummy.lib$(LIBEXT)}\" \\" >>nuttx.linkcmd
+
nuttx$(EXEEXT): $(HEAD_AOBJ) board/libboard$(LIBEXT) nuttx.linkcmd
@echo "LD: nuttx.hex"
@$(LD) $(LDFLAGS)
diff --git a/nuttx/arch/z80/src/z8/chip.h b/nuttx/arch/z80/src/z8/chip.h
new file mode 100644
index 000000000..90b6dfae2
--- /dev/null
+++ b/nuttx/arch/z80/src/z8/chip.h
@@ -0,0 +1,66 @@
+/************************************************************************************
+ * arch/z80/src/z80/chip.h
+ * arch/z80/src/chip/chip.h
+ *
+ * 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
+ * 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.
+ *
+ ************************************************************************************/
+
+#ifndef __Z8_CHIP_H
+#define __Z8_CHIP_H
+
+/************************************************************************************
+ * Included Files
+ ************************************************************************************/
+
+/************************************************************************************
+ * Definitions
+ ************************************************************************************/
+
+/************************************************************************************
+ * Public Function Prototypes
+ ************************************************************************************/
+
+#ifndef __ASSEMBLY__
+#ifdef __cplusplus
+#define EXTERN extern "C"
+extern "C" {
+#else
+#define EXTERN extern
+#endif
+
+#undef EXTERN
+#ifdef __cplusplus
+}
+#endif
+#endif
+
+#endif /* __Z8_CHIP_H */
diff --git a/nuttx/configs/z8encore000zco/ostest/Make.defs b/nuttx/configs/z8encore000zco/ostest/Make.defs
index 3adff0b38..030478e3d 100644
--- a/nuttx/configs/z8encore000zco/ostest/Make.defs
+++ b/nuttx/configs/z8encore000zco/ostest/Make.defs
@@ -41,16 +41,17 @@ ZDSINSTALLDIR := C:/Program\ Files/ZiLOG/ZDSII_Z8Encore!_4.10.1
ZDSBINDIR := $(ZDSINSTALLDIR)/bin
ZDSSTDINCDIR := $(ZDSINSTALLDIR)/include/std
ZDSZILOGINCDIR := $(ZDSINSTALLDIR)/include/zilog
+ZDSF46XINCDIR := $(ZDSZILOGINCDIR)/Z8Encore_F642X
ZDSSTDLIBDIR := $(ZDSINSTALLDIR)/lib/std
ZDSZILOGLIBDIR := $(ZDSINSTALLDIR)/lib/zilog
-
# These are the same directories but with the directory separator
# character swapped as needed by the ZDS-II compiler
WTOPDIR := ${shell cygpath -w $(TOPDIR)}
WZDSSTDINCDIR := ${shell cygpath -w $(ZDSSTDINCDIR)}
WZDSZILOGINCDIR := ${shell cygpath -w $(ZDSZILOGINCDIR)}
+WZDSF46XINCDIR := ${shell cygpath -w $(ZDSF46XINCDIR)}
WZDSSTDLIBDIR := ${shell cygpath -w $(ZDSSTDLIBDIR)}
WZDSZILOGLIBDIR := ${shell cygpath -w $(ZDSZILOGLIBDIR)}
@@ -63,15 +64,15 @@ EZDSZILOGINCDIR := ${shell echo "$(WZDSZILOGINCDIR)" | sed -e "s/ /%20/g"}
# Assembler definitions
ifeq ("${CONFIG_DEBUG}","y")
- ARCHASMOPTIMIZATION = -debug
+ ARCHASMOPTIMIZATION = -debug -sdiopt
else
- ARCHASMOPTIMIZATION = -nodebug
+ ARCHASMOPTIMIZATION = -nodebug -sdiopt
endif
-ARCHASMCPUFLAGS = -cpu:Z16F2811AL -NOigcase
-ARCHASMLIST = -NOlistmac -name -pagelen:56 -pagewidth:80 -quiet
+ARCHASMCPUFLAGS = -cpu:Z8F6423 -NOigcase -NOrevaa
+ARCHASMLIST = -list -NOlistmac -name -pagelen:56 -pagewidth:80 -quiet
ARCHASMWARNINGS = -warn
-ARCHASMDEFINES = -define:_Z16F2811AL=1 -define:_Z16K_SERIES=1 -define:_Z16F_SERIES=1 \ -define:__ASSEMBLY__
+ARCHASMDEFINES = -define:_Z8F6423=1 -define:_Z8ENCORE_64K_SERIES=1 -define:_Z8ENCORE_F642X=1 \ -define:__ASSEMBLY__
ARCHASMINCLUDES = -include:'$(ETOPDIR)\include;$(EZDSSTDINCDIR);$(EZDSZILOGINCDIR)'
AFLAGS = $(ARCHASMCPUFLAGS) $(ARCHASMINCLUDES) $(ARCHASMLIST) \
$(ARCHASMWARNINGS) $(ARCHASMOPTIMIZATION)
@@ -84,20 +85,19 @@ else
ARCHOPTIMIZATION = -nodebug -regvar
endif
-ARCHCPUFLAGS = -chartype:S -model:L -NOmodsect -cpu:Z16F2811AL -NOgenprint \
+ARCHCPUFLAGS = -chartype:S -model:L -const:RAM -NOoptlink -promote -cpu:Z8F6423 -NOgenprintf \
-asmsw:" $(ARCHASMCPUFLAGS) $(ARCHASMINCLUDES) $(ARCHASMWARNINGS) $(ARCHASMOPTIMIZATION)"
-ARCHLIST = -keeplst -NOlist -NOlistinc -NOkeepasm
+ARCHLIST = -keeplst -NOlist -NOlistinc -keepasm
ARCHPICFLAGS =
ARCHWARNINGS = -warn
-ARCHDEFINES = -define:_Z16F2811AL -define:_Z16K_SERIES \
- -define:_Z16F_SERIES
-ARCHSTDINCLUDES = -stdinc:'$(WTOPDIR)\include;$(WZDSSTDINCDIR);$(WZDSZILOGINCDIR)'
+ARCHDEFINES = -define:_Z8ENCORE_F642X -define:_Z8F6423 -define:_Z8ENCORE_64K_SERIES
+ARCHSTDINCLUDES = -stdinc:'$(WTOPDIR)\include;$(WZDSSTDINCDIR);$(WZDSZILOGINCDIR);$(WZDSF46XINCDIR)'
ARCHUSRINCLUDES = -usrinc:'.'
ARCHINCLUDES = $(ARCHSTDINCLUDES) $(ARCHUSRINCLUDES)
CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHLIST) \
$(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES)
-CPPDEFINES = -D_Z16F2811AL -D_Z16K_SERIES -D_Z16F_SERIES -D__ASSEMBLY__
+CPPDEFINES = -D_Z8ENCORE_F642X -D_Z8F6423 -D_Z8ENCORE_64K_SERIES -D__ASSEMBLY__
CPPINCLUDES = -I$(TOPDIR)/include
CPPFLAGS = $(CPPDEFINES) $(CPPINCLUDES)
diff --git a/nuttx/configs/z8encore000zco/ostest/ostest.linkcmd b/nuttx/configs/z8encore000zco/ostest/ostest.linkcmd
index 67204eadf..2084663c7 100755
--- a/nuttx/configs/z8encore000zco/ostest/ostest.linkcmd
+++ b/nuttx/configs/z8encore000zco/ostest/ostest.linkcmd
@@ -35,7 +35,7 @@
-FORMAT=OMF695,INTEL32
-map -maxhexlen=64 -quiet -sort NAME=ascending -unresolved=fatal
--warnoverlap -NOxref -warn -debug -NOigcase
+-NOwarnoverlap -NOxref -warn -debug -NOigcase -quiet
RANGE ROM $000000 : $007FFF
RANGE RAM $FFB000 : $FFBFFF
@@ -43,50 +43,45 @@ RANGE IODATA $FFC000 : $FFFFFF
RANGE EROM $008000 : $01FFFF
RANGE ERAM $800000 : $87FFFF
-CHANGE NEAR_TEXT=NEAR_DATA
-CHANGE FAR_TEXT=FAR_DATA
+RANGE ROM $0 : $FFFF
+RANGE RDATA $20 : $FF
+RANGE EDATA $100 : $EFF
+RANGE PRAM FORBIDDEN
-ORDER FAR_BSS, FAR_DATA
-ORDER NEAR_BSS, NEAR_DATA
-COPY NEAR_DATA EROM
-COPY FAR_DATA EROM
+CHANGE TEXT=EDATA
+CHANGE TEXT=FAR_DATA
+change NEAR_TXT=NEAR_DATA
+change FAR_TXT=FAR_DATA
+ORDER FAR_BSS, FAR_DATA
+ORDER NEAR_BSS,NEAR_DATA
+COPY NEAR_DATA ROM
+COPY FAR_DATA ROM
-define _0_exit = 0
-define _low_near_romdata = copy base of NEAR_DATA
-define _low_neardata = base of NEAR_DATA
-define _len_neardata = length of NEAR_DATA
-define _low_far_romdata = copy base of FAR_DATA
-define _low_fardata = base of FAR_DATA
-define _len_fardata = length of FAR_DATA
-define _low_nearbss = base of NEAR_BSS
-define _len_nearbss = length of NEAR_BSS
-define _low_farbss = base of FAR_BSS
-define _len_farbss = length of FAR_BSS
-define _near_heaptop = highaddr of RAM
-define _far_heaptop = highaddr of ERAM
-define _far_stack = highaddr of ERAM
-define _near_stack = highaddr of RAM
-define _near_heapbot = top of RAM
-define _far_heapbot = top of ERAM
+define _low_near_romdata = copy base of NEAR_DATA
+define _low_neardata = base of NEAR_DATA
+define _len_neardata = length of NEAR_DATA
+define _low_far_romdata = copy base of FAR_DATA
+define _low_fardata = base of FAR_DATA
+define _len_fardata = length of FAR_DATA
+define _low_nearbss = base of NEAR_BSS
+define _len_nearbss = length of NEAR_BSS
+define _low_farbss = base of FAR_BSS
+define _len_farbss = length of FAR_BSS
+define _far_heaptop = highaddr of EDATA
+define _far_stack = highaddr of EDATA
+define _near_stack = highaddr of RDATA
+define _far_heapbot = top of EDATA
+define _near_heaptop = highaddr of RDATA
+define _near_heapbot = top of RDATA
+define _low_pramseg = base of PRAMSEG
+define _len_pramseg = length of PRAMSEG
+define _low_pram_romdata = copy base of PRAMSEG
+define _READ_NVDS=$1000
+define _WRITE_NVDS=$10B3
+define _READ_NVDS_GET_STATUS=$1000
+define _WRITE_NVDS_GET_STATUS=$10B3
+/* Set frequency to 18432000 Hz */
+define __user_frequency = 18432000
-define _SYS_CLK_SRC = 2
-define _SYS_CLK_FREQ = 20000000
-
-define __EXTCT_INIT_PARAM = $80
-define __EXTCS0_INIT_PARAM = $8012
-define __EXTCS1_INIT_PARAM = $8001
-define __EXTCS2_INIT_PARAM = $0000
-define __EXTCS3_INIT_PARAM = $0000
-define __EXTCS4_INIT_PARAM = $0000
-define __EXTCS5_INIT_PARAM = $0000
-
-define __PFAF_INIT_PARAM = $ff
-define __PGAF_INIT_PARAM = $ff
-define __PDAF_INIT_PARAM = $ff00
-define __PAAF_INIT_PARAM = $0000
-define __PCAF_INIT_PARAM = $0000
-define __PHAF_INIT_PARAM = $0300
-define __PKAF_INIT_PARAM = $0f
-
-/* arch/z16/src/Makefile will append target, object and library paths below */
+/* arch/z80/src/Makefile.zdsii will append target, object and library paths below */
diff --git a/nuttx/configs/z8encore000zco/ostest/ostest.zfpproj b/nuttx/configs/z8encore000zco/ostest/ostest.zfpproj
index ade3d73d4..0c65b6ec7 100644
--- a/nuttx/configs/z8encore000zco/ostest/ostest.zfpproj
+++ b/nuttx/configs/z8encore000zco/ostest/ostest.zfpproj
@@ -1,5 +1,5 @@
-<project type="Standard" project-type="Standard" configuration="Debug" created-by="{{build_number}}" modified-by="c:4.11:07031901">
-<cpu>Z16F2811AL</cpu>
+<project type="Standard" project-type="Standard" configuration="Debug" created-by="{{build_number}}" modified-by="b:4.10:06121401">
+<cpu>Z8F6423</cpu>
<!-- file information -->
<files>
@@ -12,7 +12,7 @@
<tools>
<tool name="Assembler">
<options>
-<option name="define" type="string" change-action="assemble">_Z16F2811AL=1,_Z16F_SERIES=1</option>
+<option name="define" type="string" change-action="assemble">_Z8F6423=1,_Z8ENCORE_F642X=1</option>
<option name="include" type="string" change-action="assemble"></option>
<option name="list" type="boolean" change-action="none">true</option>
<option name="listmac" type="boolean" change-action="none">false</option>
@@ -20,31 +20,37 @@
<option name="pagelen" type="integer" change-action="none">56</option>
<option name="pagewidth" type="integer" change-action="none">80</option>
<option name="quiet" type="boolean" change-action="none">true</option>
+<option name="revaa" type="boolean" change-action="rebuild">false</option>
+<option name="sdiopt" type="boolean" change-action="assemble">true</option>
</options>
</tool>
<tool name="Compiler">
<options>
-<option name="chartype" type="string" change-action="compile">U</option>
-<option name="define" type="string" change-action="compile">_Z16F2811AL,_Z16F_SERIES</option>
+<option name="codegen" type="string" change-action="none">UserDefined</option>
+<option name="const" type="string" change-action="compile">RAM</option>
+<option name="define" type="string" change-action="compile">_Z8F6423,_Z16F_SERIES,_Z8ENCORE_F642X</option>
<option name="genprintf" type="boolean" change-action="compile">true</option>
<option name="keepasm" type="boolean" change-action="none">false</option>
-<option name="keeplst" type="boolean" change-action="none">false</option>
+<option name="keeplst" type="boolean" change-action="none">true</option>
<option name="list" type="boolean" change-action="none">false</option>
<option name="listinc" type="boolean" change-action="none">false</option>
-<option name="model" type="string" change-action="compile">S</option>
-<option name="modsect" type="boolean" change-action="compile">false</option>
+<option name="model" type="string" change-action="compile">L</option>
+<option name="optlink" type="boolean" change-action="compile">false</option>
+<option name="promote" type="boolean" change-action="compile">true</option>
+<option name="regvar" type="string" change-action="compile">Normal</option>
+<option name="regvarcache" type="string" change-action="none">false</option>
+<option name="reduceopt" type="boolean" change-action="compile">false</option>
<option name="stdinc" type="string" change-action="compile"></option>
<option name="usrinc" type="string" change-action="compile"></option>
-<option name="regvar" type="boolean" change-action="compile">true</option>
-<option name="regvarcache" type="boolean" change-action="none">false</option>
-<option name="reduceopt" type="boolean" change-action="compile">false</option>
<option name="watch" type="boolean" change-action="none">false</option>
</options>
</tool>
<tool name="Debugger">
<options>
-<option name="target" type="string" change-action="rebuild">Z16F2800100ZCOG</option>
+<option name="target" type="string" change-action="rebuild">Z8F64200100KIT</option>
<option name="debugtool" type="string" change-action="none">USBSmartCable</option>
+<option name="zemul_enableevents" type="boolean" change-action="none">false</option>
+<option name="zemul_brkonfull" type="boolean" change-action="none">false</option>
<option name="usepageerase" type="boolean" change-action="none">true</option>
</options>
</tool>
@@ -52,8 +58,6 @@
<options>
<option name="erasebeforeburn" type="boolean" change-action="none">false</option>
<option name="eraseinfopage" type="boolean" change-action="none">false</option>
-<option name="enableinfopage" type="boolean" change-action="none">false</option>
-<option name="includeserial" type="boolean" change-action="none">false</option>
<option name="offset" type="integer" change-action="none">0</option>
<option name="snenable" type="boolean" change-action="none">true</option>
<option name="sn" type="string" change-action="none">000000000000000000000000</option>
@@ -65,8 +69,9 @@
<option name="snbigendian" type="boolean" change-action="none">true</option>
<option name="singleval" type="string" change-action="none">0</option>
<option name="singlevalformat" type="integer" change-action="none">0</option>
+<option name="usenvds" type="boolean" change-action="none">false</option>
+<option name="includeserial" type="boolean" change-action="none">false</option>
<option name="usepageerase" type="boolean" change-action="none">false</option>
-<option name="autoselect" type="boolean" change-action="none">true</option>
</options>
</tool>
<tool name="General">
@@ -81,46 +86,55 @@
<tool name="Librarian">
<options>
<option name="outfile" type="string" change-action="build"></option>
-<option name="warn" type="boolean" change-action="none">false</option>
</options>
</tool>
<tool name="Linker">
<options>
-<option name="directives" type="string" change-action="build"></option>
<option name="createnew" type="boolean" change-action="build">false</option>
-<option name="eram" type="string" change-action="build">0-0</option>
-<option name="erom" type="string" change-action="build">0-0</option>
+<option name="directives" type="string" change-action="build"></option>
+<option name="edata" type="string" change-action="build">100-EFF</option>
<option name="exeform" type="string" change-action="build">OMF695,INTEL32</option>
+<option name="flash" type="string" change-action="build">FF80-FFFF</option>
<option name="fplib" type="string" change-action="build">Dummy</option>
-<option name="iodata" type="string" change-action="build">0-0</option>
<option name="linkctlfile" type="string" change-action="build"></option>
<option name="map" type="boolean" change-action="none">true</option>
<option name="maxhexlen" type="integer" change-action="build">64</option>
+<option name="nvds" type="string" change-action="build">0-f</option>
<option name="objlibmods" type="string" change-action="build"></option>
<option name="of" type="string" change-action="build">.\ostest</option>
<option name="padhex" type="boolean" change-action="build">false</option>
+<option name="pram" type="string" change-action="build">0-f</option>
+<option name="praminuse" type="boolean" change-action="build">false</option>
<option name="quiet" type="boolean" change-action="none">false</option>
-<option name="ram" type="string" change-action="build">FFB000-FFBFFF</option>
+<option name="rdata" type="string" change-action="build">20-FF</option>
<option name="relist" type="boolean" change-action="build">false</option>
<option name="rom" type="string" change-action="build">000000-007FFF</option>
<option name="sort" type="string" change-action="none">name</option>
-<option name="startuplnkcmds" type="boolean" change-action="build">true</option>
<option name="startuptype" type="string" change-action="build">1</option>
+<option name="startuplnkcmds" type="boolean" change-action="build">true</option>
<option name="undefisfatal" type="boolean" change-action="none">true</option>
<option name="useadddirectives" type="boolean" change-action="build">false</option>
<option name="usecrun" type="boolean" change-action="build">true</option>
-<option name="warnoverlap" type="boolean" change-action="none">false</option>
<option name="warnisfatal" type="boolean" change-action="none">false</option>
+<option name="warnoverlap" type="boolean" change-action="none">false</option>
<option name="xref" type="boolean" change-action="none">false</option>
</options>
</tool>
+<tool name="Middleware">
+<options>
+<option name="usezsl" type="boolean" change-action="rebuild">false</option>
+<option name="zslports" type="string" change-action="rebuild"></option>
+<option name="zsluarts" type="string" change-action="rebuild"></option>
+<option name="zslpramisrs" type="string" change-action="rebuild"></option>
+</options>
+</tool>
</tools>
</configuration>
<configuration name="Release" >
<tools>
<tool name="Assembler">
<options>
-<option name="define" type="string" change-action="assemble">_Z16F2811AL=1,_Z16F_SERIES=1</option>
+<option name="define" type="string" change-action="assemble">_Z8F6423=1,_Z16F_SERIES=1,_Z8ENCORE_F642X=1</option>
<option name="include" type="string" change-action="assemble"></option>
<option name="list" type="boolean" change-action="none">true</option>
<option name="listmac" type="boolean" change-action="none">false</option>
@@ -128,24 +142,28 @@
<option name="pagelen" type="integer" change-action="none">56</option>
<option name="pagewidth" type="integer" change-action="none">80</option>
<option name="quiet" type="boolean" change-action="none">true</option>
+<option name="revaa" type="boolean" change-action="rebuild">false</option>
+<option name="sdiopt" type="boolean" change-action="assemble">true</option>
</options>
</tool>
<tool name="Compiler">
<options>
-<option name="chartype" type="string" change-action="compile">U</option>
-<option name="define" type="string" change-action="compile">_Z16F2811AL,_Z16F_SERIES</option>
+<option name="codegen" type="string" change-action="none">UserDefined</option>
+<option name="const" type="string" change-action="compile">RAM</option>
+<option name="define" type="string" change-action="compile">_Z8F6423,_Z16F_SERIES,_Z8ENCORE_F642X</option>
<option name="genprintf" type="boolean" change-action="compile">true</option>
<option name="keepasm" type="boolean" change-action="none">false</option>
<option name="keeplst" type="boolean" change-action="none">false</option>
<option name="list" type="boolean" change-action="none">false</option>
<option name="listinc" type="boolean" change-action="none">false</option>
<option name="model" type="string" change-action="compile">S</option>
-<option name="modsect" type="boolean" change-action="compile">false</option>
+<option name="optlink" type="boolean" change-action="compile">false</option>
+<option name="promote" type="boolean" change-action="compile">true</option>
+<option name="regvar" type="string" change-action="compile">true</option>
+<option name="regvarcache" type="string" change-action="none">false</option>
+<option name="reduceopt" type="boolean" change-action="compile">false</option>
<option name="stdinc" type="string" change-action="compile"></option>
<option name="usrinc" type="string" change-action="compile"></option>
-<option name="regvar" type="boolean" change-action="compile">true</option>
-<option name="regvarcache" type="boolean" change-action="none">false</option>
-<option name="reduceopt" type="boolean" change-action="compile">false</option>
<option name="watch" type="boolean" change-action="none">false</option>
</options>
</tool>
@@ -153,6 +171,8 @@
<options>
<option name="target" type="string" change-action="rebuild"></option>
<option name="debugtool" type="string" change-action="none">ZPAKII</option>
+<option name="zemul_enableevents" type="boolean" change-action="none">false</option>
+<option name="zemul_brkonfull" type="boolean" change-action="none">false</option>
<option name="usepageerase" type="boolean" change-action="none">true</option>
</options>
</tool>
@@ -160,8 +180,6 @@
<options>
<option name="erasebeforeburn" type="boolean" change-action="none">false</option>
<option name="eraseinfopage" type="boolean" change-action="none">false</option>
-<option name="enableinfopage" type="boolean" change-action="none">false</option>
-<option name="includeserial" type="boolean" change-action="none">false</option>
<option name="offset" type="integer" change-action="none">0</option>
<option name="snenable" type="boolean" change-action="none">false</option>
<option name="sn" type="string" change-action="none">0</option>
@@ -173,8 +191,9 @@
<option name="snbigendian" type="boolean" change-action="none">true</option>
<option name="singleval" type="string" change-action="none">0</option>
<option name="singlevalformat" type="integer" change-action="none">0</option>
+<option name="usenvds" type="boolean" change-action="none">false</option>
+<option name="includeserial" type="boolean" change-action="none">false</option>
<option name="usepageerase" type="boolean" change-action="none">false</option>
-<option name="autoselect" type="boolean" change-action="none">true</option>
</options>
</tool>
<tool name="General">
@@ -189,39 +208,48 @@
<tool name="Librarian">
<options>
<option name="outfile" type="string" change-action="build"></option>
-<option name="warn" type="boolean" change-action="none">false</option>
</options>
</tool>
<tool name="Linker">
<options>
-<option name="directives" type="string" change-action="build"></option>
<option name="createnew" type="boolean" change-action="build">false</option>
-<option name="eram" type="string" change-action="build">0-0</option>
-<option name="erom" type="string" change-action="build">0-0</option>
+<option name="directives" type="string" change-action="build"></option>
+<option name="edata" type="string" change-action="build">100-EFF</option>
<option name="exeform" type="string" change-action="build">OMF695,INTEL32</option>
+<option name="flash" type="string" change-action="build">FF80-FFFF</option>
<option name="fplib" type="string" change-action="build">Dummy</option>
-<option name="iodata" type="string" change-action="build">0-0</option>
<option name="linkctlfile" type="string" change-action="build"></option>
<option name="map" type="boolean" change-action="none">true</option>
<option name="maxhexlen" type="integer" change-action="build">64</option>
+<option name="nvds" type="string" change-action="build">0-f</option>
<option name="objlibmods" type="string" change-action="build"></option>
<option name="of" type="string" change-action="build">.\ostest</option>
<option name="padhex" type="boolean" change-action="build">false</option>
+<option name="pram" type="string" change-action="build">0-f</option>
+<option name="praminuse" type="boolean" change-action="build">false</option>
<option name="quiet" type="boolean" change-action="none">false</option>
-<option name="ram" type="string" change-action="build">FFB000-FFBFFF</option>
+<option name="rdata" type="string" change-action="build">20-FF</option>
<option name="relist" type="boolean" change-action="build">false</option>
<option name="rom" type="string" change-action="build">000000-007FFF</option>
<option name="sort" type="string" change-action="none">name</option>
-<option name="startuplnkcmds" type="boolean" change-action="build">true</option>
<option name="startuptype" type="string" change-action="build">1</option>
+<option name="startuplnkcmds" type="boolean" change-action="build">true</option>
<option name="undefisfatal" type="boolean" change-action="none">true</option>
<option name="useadddirectives" type="boolean" change-action="build">false</option>
<option name="usecrun" type="boolean" change-action="build">true</option>
-<option name="warnoverlap" type="boolean" change-action="none">false</option>
<option name="warnisfatal" type="boolean" change-action="none">false</option>
+<option name="warnoverlap" type="boolean" change-action="none">false</option>
<option name="xref" type="boolean" change-action="none">false</option>
</options>
</tool>
+<tool name="Middleware">
+<options>
+<option name="usezsl" type="boolean" change-action="rebuild">false</option>
+<option name="zslports" type="string" change-action="rebuild"></option>
+<option name="zsluarts" type="string" change-action="rebuild"></option>
+<option name="zslpramisrs" type="string" change-action="rebuild"></option>
+</options>
+</tool>
</tools>
</configuration>
</configurations>
@@ -235,4 +263,28 @@
<breakpoints>
</breakpoints>
+<!-- ice event information -->
+<ice-events count="4" enable="0" breakOnFull="0">
+<ice-event>
+<data>000000000000</data>
+<mask>000000000000</mask>
+<action>0</action>
+</ice-event>
+<ice-event>
+<data>000000000000</data>
+<mask>000000000000</mask>
+<action>0</action>
+</ice-event>
+<ice-event>
+<data>000000000000</data>
+<mask>000000000000</mask>
+<action>0</action>
+</ice-event>
+<ice-event>
+<data>000000000000</data>
+<mask>000000000000</mask>
+<action>0</action>
+</ice-event>
+</ice-events>
+
</project> \ No newline at end of file
diff --git a/nuttx/configs/z8encore000zco/src/Makefile b/nuttx/configs/z8encore000zco/src/Makefile
index 8291ab20f..c20d8d6da 100644
--- a/nuttx/configs/z8encore000zco/src/Makefile
+++ b/nuttx/configs/z8encore000zco/src/Makefile
@@ -1,5 +1,5 @@
############################################################################
-# configs/z16f2800100zcog/Makefile
+# configs/z8encore000zco/Makefile
#
# Copyright (C) 2008 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
@@ -43,7 +43,7 @@ CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(INCLUDES) $(ARCH
ASRCS =
AOBJS = $(ASRCS:.S=$(OBJEXT))
-CSRCS = z16f_lowinit.c z16f_leds.c
+CSRCS = z8_lowinit.c z8_leds.c
COBJS = $(CSRCS:.c=$(OBJEXT))
SRCS = $(ASRCS) $(CSRCS)
diff --git a/nuttx/include/nuttx/compiler.h b/nuttx/include/nuttx/compiler.h
index 4115559a1..7183288cb 100644
--- a/nuttx/include/nuttx/compiler.h
+++ b/nuttx/include/nuttx/compiler.h
@@ -226,7 +226,7 @@
/* At present, only the Zilog ZNeo compiler is recognized */
-# ifndef __ZNEO__
+# if !defined(__ZNEO__) && !defined(__EZ8__)
# warning "Unrecognized Zilog compiler"
# endif
@@ -258,24 +258,33 @@
# define reentrant_function
-/* Addressing */
-
-# define FAR _Far
-# define NEAR _Near
-# define DSEG _Far
-# define CODE _Erom
-
-/* Select the large, 32-bit addressing model */
-
-# undef CONFIG_SMALL_MEMORY
-
-/* Long and int are the same size */
-
-# undef CONFIG_LONG_IS_NOT_INT
-
-/* FAR pointers and int are the same size */
+/* Addressing.
+ *
+ * Z16F ZNEO: Far is 24-bits; near is 16-bits of address.
+ * The supported model is (1) all code on ROM, and (2) all data
+ * and stacks in external (far) RAM.
+ * Z8Encore!: Far is 16-bits; near is 8-bits of address.
+ * The supported model is (1) all code on ROM, and (2) all data
+ * and stacks in internal (far) RAM.
+ */
-# undef CONFIG_PTR_IS_NOT_INT
+# ifdef __ZNEO__
+# define FAR _Far
+# define NEAR _Near
+# define DSEG _Far
+# define CODE _Erom
+# undef CONFIG_SMALL_MEMORY /* Select the large, 32-bit addressing model */
+# undef CONFIG_LONG_IS_NOT_INT /* Long and int are the same size */
+# undef CONFIG_PTR_IS_NOT_INT /* FAR pointers and int are the same size */
+# else
+# define FAR far
+# define NEAR near
+# define DSEG far
+# define CODE rom
+# define CONFIG_SMALL_MEMORY 1 /* Select small, 16-bit address model */
+# define CONFIG_LONG_IS_NOT_INT 1 /* Long and int are not the same size */
+# undef CONFIG_PTR_IS_NOT_INT /* FAR pointers and int are the same size */
+# endif
/* The Zilog compiler does not support inline functions */
diff --git a/nuttx/sched/clock_abstime2ticks.c b/nuttx/sched/clock_abstime2ticks.c
index 7cd3eb495..b93fb8eac 100644
--- a/nuttx/sched/clock_abstime2ticks.c
+++ b/nuttx/sched/clock_abstime2ticks.c
@@ -1,7 +1,7 @@
/********************************************************************************
* clock_abstime2ticks.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.
*
@@ -88,8 +88,8 @@
*
********************************************************************************/
-extern int clock_abstime2ticks(clockid_t clockid, const struct timespec *abstime,
- int *ticks)
+int clock_abstime2ticks(clockid_t clockid, FAR const struct timespec *abstime,
+ FAR int *ticks)
{
struct timespec currtime;
struct timespec reltime;
diff --git a/nuttx/sched/clock_internal.h b/nuttx/sched/clock_internal.h
index 3c394520c..2c298983b 100644
--- a/nuttx/sched/clock_internal.h
+++ b/nuttx/sched/clock_internal.h
@@ -1,7 +1,7 @@
/********************************************************************************
* clock_internal.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.
*
@@ -79,9 +79,10 @@ extern void weak_function clock_initialize(void);
extern void weak_function clock_timer(void);
extern time_t clock_calendar2utc(int year, int month, int day);
-extern int clock_abstime2ticks(clockid_t clockid, const struct timespec *abstime,
- int *ticks);
-extern int clock_time2ticks(const struct timespec *reltime, int *ticks);
-extern int clock_ticks2time(int ticks, struct timespec *reltime);
+extern int clock_abstime2ticks(clockid_t clockid,
+ FAR const struct timespec *abstime,
+ FAR int *ticks);
+extern int clock_time2ticks(FAR const struct timespec *reltime, FAR int *ticks);
+extern int clock_ticks2time(int ticks, FAR struct timespec *reltime);
#endif /* __CLOCK_INTERNAL_H */
diff --git a/nuttx/sched/clock_ticks2time.c b/nuttx/sched/clock_ticks2time.c
index a7ef5dc9b..f0218df47 100644
--- a/nuttx/sched/clock_ticks2time.c
+++ b/nuttx/sched/clock_ticks2time.c
@@ -1,7 +1,7 @@
/********************************************************************************
* clock_ticks2time.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.
*
@@ -83,7 +83,7 @@
*
********************************************************************************/
-int clock_ticks2time(int ticks, struct timespec *reltime)
+int clock_ticks2time(int ticks, FAR struct timespec *reltime)
{
int remainder;
diff --git a/nuttx/sched/clock_time2ticks.c b/nuttx/sched/clock_time2ticks.c
index 91c5e976c..5414dfe75 100644
--- a/nuttx/sched/clock_time2ticks.c
+++ b/nuttx/sched/clock_time2ticks.c
@@ -85,7 +85,7 @@
*
********************************************************************************/
-int clock_time2ticks(const struct timespec *reltime, int *ticks)
+int clock_time2ticks(FAR const struct timespec *reltime, FAR int *ticks)
{
sint32 relusec;
diff --git a/nuttx/sched/mq_timedreceive.c b/nuttx/sched/mq_timedreceive.c
index ca4b4aa85..a6cf00338 100644
--- a/nuttx/sched/mq_timedreceive.c
+++ b/nuttx/sched/mq_timedreceive.c
@@ -242,7 +242,7 @@ ssize_t mq_timedreceive(mqd_t mqdes, void *msg, size_t msglen,
if (mqdes->msgq->msglist.head == NULL)
{
- sint32 ticks;
+ int ticks;
/* Convert the timespec to clock ticks. We must have interrupts
* disabled here so that this time stays valid until the wait begins.
diff --git a/nuttx/sched/mq_timedsend.c b/nuttx/sched/mq_timedsend.c
index 012bd2ab0..4cd508d3b 100644
--- a/nuttx/sched/mq_timedsend.c
+++ b/nuttx/sched/mq_timedsend.c
@@ -239,7 +239,7 @@ int mq_timedsend(mqd_t mqdes, const char *msg, size_t msglen, int prio,
}
else
{
- sint32 ticks;
+ int ticks;
/* We are not in an interupt handler and the message queue is full.
* set up a timed wait for the message queue to become non-full.
diff --git a/nuttx/sched/pthread_condtimedwait.c b/nuttx/sched/pthread_condtimedwait.c
index 78110c624..0a1bc7ca9 100644
--- a/nuttx/sched/pthread_condtimedwait.c
+++ b/nuttx/sched/pthread_condtimedwait.c
@@ -132,7 +132,7 @@ int pthread_cond_timedwait(FAR pthread_cond_t *cond, FAR pthread_mutex_t *mutex,
FAR const struct timespec *abstime)
{
WDOG_ID wdog;
- sint32 ticks;
+ int ticks;
int mypid = (int)getpid();
irqstate_t int_state;
int ret = OK;