summaryrefslogtreecommitdiff
path: root/nuttx/configs
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-01-08 19:45:13 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-01-08 19:45:13 +0000
commiteae911d362e30de8ae5e196842ffc3b9fd851e67 (patch)
tree494f4e7c0bb0966b59930a960d7636d6d3f7b4bd /nuttx/configs
parentaaf14056e435090f70b7e82d42874d090d1a1e35 (diff)
downloadpx4-nuttx-eae911d362e30de8ae5e196842ffc3b9fd851e67.tar.gz
px4-nuttx-eae911d362e30de8ae5e196842ffc3b9fd851e67.tar.bz2
px4-nuttx-eae911d362e30de8ae5e196842ffc3b9fd851e67.zip
Cygwin path craziness
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@529 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/configs')
-rw-r--r--nuttx/configs/z16f2800100zcog/Make.defs52
-rwxr-xr-xnuttx/configs/z16f2800100zcog/setenv.sh2
-rw-r--r--nuttx/configs/z16f2800100zcog/src/Makefile5
3 files changed, 44 insertions, 15 deletions
diff --git a/nuttx/configs/z16f2800100zcog/Make.defs b/nuttx/configs/z16f2800100zcog/Make.defs
index 5cf48fa6c..e9f7342b7 100644
--- a/nuttx/configs/z16f2800100zcog/Make.defs
+++ b/nuttx/configs/z16f2800100zcog/Make.defs
@@ -35,10 +35,21 @@
include ${TOPDIR}/.config
+# These are the directories where the ZNeo-II toolchain is installed
+
ZDSINSTALLDIR = C:/Program\ Files/ZiLOG/ZDSII_ZNEO_4.10.2
-ZDSBINDIR = $(ZDSINSTALLDIR)/bin
-ZDSLIBDIR = $(ZDSINSTALLDIR)/lib/std
-ZDSINCDIR = $(ZDSINSTALLDIR)/include
+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)}
+
+# Assembler definitions
ifeq ("${CONFIG_DEBUG}","y")
ARCHASMOPTIMIZATION = -debug
@@ -50,9 +61,11 @@ 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:$(ZDSINCDIR)/std;$(ZDSINCDIR)/zilog
+ARCHASMINCLUDES = -include:'$(WTOPDIR)\include;$(WZDSSTDINCDIR);$(WZDSZILOGINCDIR)'
AFLAGS = $(ARCHASMCPUFLAGS) $(ARCHASMINCLUDES) $(ARCHASMLIST) \
- $(ARCHASMWARN) $(ARCHASMOPTIMIZATION)
+ $(ARCHASMWARNINGS) $(ARCHASMOPTIMIZATION)
+
+# Compiler definitions
ifeq ("${CONFIG_DEBUG}","y")
ARCHOPTIMIZATION = -debug -NOregvar -reduceopt
@@ -61,19 +74,24 @@ else
endif
ARCHCPUFLAGS = -chartype:S -model:L -NOmodsect -cpu:Z16F2811AL \
- -asmsw:" $(ARCHASMCPUFLAGS) $(ARCHASMINCLUDES) (ARCHASMWARN) $(ARCHASMOPTIMIZATION)"
+ -asmsw:" $(ARCHASMCPUFLAGS) $(ARCHASMINCLUDES) $(ARCHASMWARNINGS) $(ARCHASMOPTIMIZATION)"
ARCHLIST = -NOgenprint -keeplst -NOlist -NOlistinc -NOkeepasm
ARCHPICFLAGS =
ARCHWARNINGS = -warn
ARCHDEFINES = -define:_Z16F2811AL -define:_Z16K_SERIES \
- -define:_Z16F_SERIES -define:
-ARCHSTDINCLUDES = -stdinc:"$(TOPDIR)/include;$(ZDSINCDIR)/std;$(ZDSINCDIR)/zilog"
-ARCHUSRINCLUDES = -userinc:"."
+ -define:_Z16F_SERIES
+ARCHSTDINCLUDES = -stdinc:'$(WTOPDIR)\include;$(WZDSSTDINCDIR);$(WZDSZILOGINCDIR)'
+ARCHUSRINCLUDES = -usrinc:'.'
ARCHINCLUDES = $(ARCHSTDINCLUDES) $(ARCHUSRINCLUDES)
-CCFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \
+CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \
$(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES)
+
+# Librarian definitions
+
ARFLAGS = -quiet -warn
+# Tool names/pathes
+
CROSSDEV =
CC = $(ZDSBINDIR)/zneocc.exe
CPP = $(ZDSBINDIR)/zneoasm.exe
@@ -81,11 +99,17 @@ 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
@@ -97,12 +121,16 @@ define ASSEMBLE
endef
define ARCHIVE
- echo "AR: $2"; \
- $(AR) $(ARFLAGS) $1=-+$2 || { echo "$(AR) $1=-+$2 FAILED!" ; exit 1 ; }
+ @echo "AR: $2"; \
+ @$(AR) $(ARFLAGS) $1=-+$2 || { echo "$(AR) $1=-+$2 FAILED!" ; exit 1 ; }
endef
+# This is the tool to use for dependencies (i.e., none)
+
MKDEP = $(TOPDIR)/tools/mknulldeps.sh
+# Linux/Cygwin host tool definitions
+
HOSTCC = gcc
HOSTINCLUDES = -I.
HOSTCFLAGS = -Wall -wstrict-prototypes -Wshadow -g -pipe
diff --git a/nuttx/configs/z16f2800100zcog/setenv.sh b/nuttx/configs/z16f2800100zcog/setenv.sh
index e0c18d13a..5c6728ba2 100755
--- a/nuttx/configs/z16f2800100zcog/setenv.sh
+++ b/nuttx/configs/z16f2800100zcog/setenv.sh
@@ -37,7 +37,7 @@ if [ "$(basename $0)" = "setenv.sh" ] ; then
exit 1
fi
-if [ -z ${PATH_ORIG} ]; then export PATH_ORIG=${PATH}; fi
+if [ -z "${PATH_ORIG}" ]; then export PATH_ORIG="${PATH}"; fi
WD=`pwd`
ZDSINSTALLDIR="C:/Program\ Files/ZiLOG/ZDSII_ZNEO_4.10.2"
diff --git a/nuttx/configs/z16f2800100zcog/src/Makefile b/nuttx/configs/z16f2800100zcog/src/Makefile
index c910fb1e2..a479cdbe2 100644
--- a/nuttx/configs/z16f2800100zcog/src/Makefile
+++ b/nuttx/configs/z16f2800100zcog/src/Makefile
@@ -35,8 +35,9 @@
-include $(TOPDIR)/Make.defs
-ARCH_SRCDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src
-USRINCLUDES = -userinc:".;$(TOPDIR)/sched;$(ARCH_SRCDIR)/chip;$(ARCH_SRCDIR)/common"
+ARCHSRCDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src
+WARCHSRCDIR = ${shell cygpath -w $(ARCHSRCDIR)}
+USRINCLUDES = -usrinc:'.;$(WTOPDIR)\sched;$(WARCHSRCDIR)\chip;$(WARCHSRCDIR)\common'
INCLUDES = $(ARCHSTDINCLUDES) $(USRINCLUDES)
CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(INCLUDES) $(ARCHDEFINES)