summaryrefslogtreecommitdiff
path: root/nuttx/configs/z16f2800100zcog/ostest/Make.defs
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-01-10 18:13:27 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-01-10 18:13:27 +0000
commit83528f134e21945fef569980f4ac7ba5fe13db0a (patch)
tree9f64bfb3b3c3540a5f7a326ab9919a502d970644 /nuttx/configs/z16f2800100zcog/ostest/Make.defs
parentd04ce79590b7fc7427267b5d7af30385b732ee44 (diff)
downloadpx4-nuttx-83528f134e21945fef569980f4ac7ba5fe13db0a.tar.gz
px4-nuttx-83528f134e21945fef569980f4ac7ba5fe13db0a.tar.bz2
px4-nuttx-83528f134e21945fef569980f4ac7ba5fe13db0a.zip
z16f ostest config
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@543 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/configs/z16f2800100zcog/ostest/Make.defs')
-rw-r--r--nuttx/configs/z16f2800100zcog/ostest/Make.defs156
1 files changed, 156 insertions, 0 deletions
diff --git a/nuttx/configs/z16f2800100zcog/ostest/Make.defs b/nuttx/configs/z16f2800100zcog/ostest/Make.defs
new file mode 100644
index 000000000..4186f75ed
--- /dev/null
+++ b/nuttx/configs/z16f2800100zcog/ostest/Make.defs
@@ -0,0 +1,156 @@
+############################################################################
+# configs/z16f2800100zcog/Make.defs
+#
+# 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.
+#
+############################################################################
+
+include ${TOPDIR}/.config
+
+# These are the directories where the ZNeo-II toolchain is installed
+
+ZDSINSTALLDIR := C:/Program\ Files/ZiLOG/ZDSII_ZNEO_4.11.0
+ZDSBINDIR := $(ZDSINSTALLDIR)/bin
+ZDSSTDINCDIR := $(ZDSINSTALLDIR)/include/std
+ZDSZILOGINCDIR := $(ZDSINSTALLDIR)/include/zilog
+
+# These are the same directories but with the directory separator
+# character swapped as needed by the ZNeo-II compiler
+
+WTOPDIR := ${shell cygpath -w $(TOPDIR)}
+WZDSSTDINCDIR := ${shell cygpath -w $(ZDSSTDINCDIR)}
+WZDSZILOGINCDIR := ${shell cygpath -w $(ZDSZILOGINCDIR)}
+
+# Escaped versions
+
+ETOPDIR := ${shell echo "$(WTOPDIR)" | sed -e "s/ /%20/g"}
+EZDSSTDINCDIR := ${shell echo "$(WZDSSTDINCDIR)" | sed -e "s/ /%20/g"}
+EZDSZILOGINCDIR := ${shell echo "$(WZDSZILOGINCDIR)" | sed -e "s/ /%20/g"}
+
+# Assembler definitions
+
+ifeq ("${CONFIG_DEBUG}","y")
+ ARCHASMOPTIMIZATION = -debug
+else
+ ARCHASMOPTIMIZATION = -nodebug
+endif
+
+ARCHASMCPUFLAGS = -cpu:Z16F2811AL -NOigcase
+ARCHASMLIST = -NOlistmac -name -pagelen:56 -pagewidth:80 -quiet
+ARCHASMWARNINGS = -warn
+ARCHASMDEFINES = -define:_Z16F2811AL=1 -define:_Z16K_SERIES=1 -define:_Z16F_SERIES=1 \ -define:__ASSEMBLY__
+ARCHASMINCLUDES = -include:'$(ETOPDIR)\include;$(EZDSSTDINCDIR);$(EZDSZILOGINCDIR)'
+AFLAGS = $(ARCHASMCPUFLAGS) $(ARCHASMINCLUDES) $(ARCHASMLIST) \
+ $(ARCHASMWARNINGS) $(ARCHASMOPTIMIZATION)
+
+# Compiler definitions
+
+ifeq ("${CONFIG_DEBUG}","y")
+ ARCHOPTIMIZATION = -debug -NOregvar -reduceopt
+else
+ ARCHOPTIMIZATION = -nodebug -regvar
+endif
+
+ARCHCPUFLAGS = -chartype:S -model:L -NOmodsect -cpu:Z16F2811AL \
+ -asmsw:" $(ARCHASMCPUFLAGS) $(ARCHASMINCLUDES) $(ARCHASMWARNINGS) $(ARCHASMOPTIMIZATION)"
+ARCHLIST = -NOgenprint -keeplst -NOlist -NOlistinc -NOkeepasm
+ARCHPICFLAGS =
+ARCHWARNINGS = -warn
+ARCHDEFINES = -define:_Z16F2811AL -define:_Z16K_SERIES \
+ -define:_Z16F_SERIES
+ARCHSTDINCLUDES = -stdinc:'$(WTOPDIR)\include;$(WZDSSTDINCDIR);$(WZDSZILOGINCDIR)'
+ARCHUSRINCLUDES = -usrinc:'.'
+ARCHINCLUDES = $(ARCHSTDINCLUDES) $(ARCHUSRINCLUDES)
+CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \
+ $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES)
+
+# Librarian definitions
+
+ARFLAGS = -quiet -warn
+
+# Linker definitions
+
+LINKCMDTEMPLATE = $(TOPDIR)/configs/z16f2800100zcog/ostest/ostest.linkcmd
+
+# Tool names/pathes
+
+CROSSDEV =
+CC = $(ZDSBINDIR)/zneocc.exe
+CPP = $(ZDSBINDIR)/zneoasm.exe
+LD = $(ZDSBINDIR)/zneolink.exe
+AS = $(ZDSBINDIR)/zneoasm.exe
+AR = $(ZDSBINDIR)/zneolib.exe
+
+# File extensions
+
+ASMEXT = .asm
+OBJEXT = .obj
+LIBEXT = .lib
+EXEEXT = .hex
+
+# These are the macros that will be used in the NuttX make system
+# to compile and assembly source files and to insert the resulting
+# object files into an archive
+
+define COMPILE
+ @echo "CC: $1"
+ @$(CC) $(CFLAGS) $1
+endef
+
+define ASSEMBLE
+ @echo "AS: $1"
+ @$(AS) -c $(AFLAGS) $1
+endef
+
+define ARCHIVE
+ echo "AR: $2"; \
+ $(AR) $(ARFLAGS) $1=-+$2 || { echo "$(AR) $1=-+$2 FAILED!" ; exit 1 ; }
+endef
+
+define CLEAN
+ @rm -f *.obj *.src *.lib *.hex
+endef
+
+# This is the tool to use for dependencies (i.e., none)
+
+MKDEP = $(TOPDIR)/tools/mknulldeps.sh
+
+# ZNeo-II cannot follow Cygwin soft links, so we will have to use directory copies
+
+DIRLINK = $(TOPDIR)/tools/winlink.sh
+DIRUNLINK = $(TOPDIR)/tools/unlink.sh
+
+# Linux/Cygwin host tool definitions
+
+HOSTCC = gcc
+HOSTINCLUDES = -I.
+HOSTCFLAGS = -Wall -wstrict-prototypes -Wshadow -g -pipe
+HOSTLDFLAGS =