summaryrefslogtreecommitdiff
path: root/nuttx/configs
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-11-29 16:48:29 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-11-29 16:48:29 +0000
commit067d41fcf895dff462341d6adb3e0a549b897a9f (patch)
tree9af704b5f445b95c2fa52a198de5eb89513efcc2 /nuttx/configs
parentd08ed91817af907070c3d4f6903e4fecdba8fff7 (diff)
downloadpx4-nuttx-067d41fcf895dff462341d6adb3e0a549b897a9f.tar.gz
px4-nuttx-067d41fcf895dff462341d6adb3e0a549b897a9f.tar.bz2
px4-nuttx-067d41fcf895dff462341d6adb3e0a549b897a9f.zip
ZNEO configurations updated to use ZDS-II version 5.0.1
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5400 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/configs')
-rw-r--r--nuttx/configs/z16f2800100zcog/README.txt32
-rw-r--r--nuttx/configs/z16f2800100zcog/ostest/Make.defs171
-rwxr-xr-xnuttx/configs/z16f2800100zcog/ostest/setenv.sh34
-rw-r--r--nuttx/configs/z16f2800100zcog/pashello/Make.defs173
-rwxr-xr-xnuttx/configs/z16f2800100zcog/pashello/setenv.sh36
-rw-r--r--nuttx/configs/z8encore000zco/README.txt2
-rw-r--r--nuttx/configs/z8f64200100kit/README.txt2
7 files changed, 304 insertions, 146 deletions
diff --git a/nuttx/configs/z16f2800100zcog/README.txt b/nuttx/configs/z16f2800100zcog/README.txt
index 64f90b9b9..55ed22b10 100644
--- a/nuttx/configs/z16f2800100zcog/README.txt
+++ b/nuttx/configs/z16f2800100zcog/README.txt
@@ -6,12 +6,14 @@ This is the README file for the NuttX port to the ZiLog ZNEO MCU.
ZDS-II Compiler Versions
^^^^^^^^^^^^^^^^^^^^^^^^
-4.10.2
+Version 4.10.2
+
The ZDS-II version 4.10.2 will not compile NuttX. It reports "internal
errors" on some of the files. Upgrades to ZDS-II are available for
download from the Zilog website: http://www.zilog.com/software/zds2.asp
-4.11.0
+Version 4.11.0
+
NuttX compiles correctly with the newer 4.11.0 version of the ZDS-II
toolchain. However, I have found a few issues:
@@ -25,17 +27,31 @@ ZDS-II Compiler Versions
- The Pascal add-on interpreter includes a large switch statement and
exposes another compiler problem. This is reported as incident 81459.
-4.11.1
+Version 4.11.1
+
As of this writing (30 September 2010), the latest release of ZDS-II for the
ZNEO is 4.11.1. It is unknown if this release includes fixes for incidents
81400 and 81459 or not. It is unknown if the code will run without -reduceopt
either. (Basically, it compiles with 4.11.1, but is untested with that version).
-If you use any version of ZDS-II other than 4.11.1 or if you install ZDS-II
-at any location other than the default location, you will have to modify
-two files: (1) configs/z16f2800100zcog/*/setenv.sh and (2)
-configs/z16f2800100zcog/*/Make.defs. Simply edit these two files, changing
-4.11.1 to whatever.
+Version 5.0.1
+
+ On November 29, 2012, all of the z16f configurations were converted to use 5.0.1,
+ but have not been verified on a running target.
+
+ Paths were also updated that are specific to a 32-bit toolchain running on
+ a 64 bit windows platform. Change to a different toolchain, you will need
+ to modify the versioning in Make.defs and setenv.sh; if you want to build
+ on a different platform, you will need to change the path in the ZDS binaries
+ in those same files.
+
+Other Versions
+
+ If you use any version of ZDS-II other than 5.0.1 or if you install ZDS-II
+ at any location other than the default location, you will have to modify
+ two files: (1) configs/z16f2800100zcog/*/setenv.sh and (2)
+ configs/z16f2800100zcog/*/Make.defs. Simply edit these two files, changing
+ 5.0.1 to whatever.
Issues
^^^^^^
diff --git a/nuttx/configs/z16f2800100zcog/ostest/Make.defs b/nuttx/configs/z16f2800100zcog/ostest/Make.defs
index b127a6b7f..1cd425063 100644
--- a/nuttx/configs/z16f2800100zcog/ostest/Make.defs
+++ b/nuttx/configs/z16f2800100zcog/ostest/Make.defs
@@ -1,7 +1,7 @@
############################################################################
# configs/z16f2800100zcog/ostest/Make.defs
#
-# Copyright (C) 2008, 2010 Gregory Nutt. All rights reserved.
+# Copyright (C) 2008, 2010, 2012 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
@@ -33,43 +33,67 @@
#
############################################################################
-include ${TOPDIR}/.config
-include ${TOPDIR}/tools/Config.mk
+include $(TOPDIR)/.config
+include $(TOPDIR)/tools/Config.mk
-# These are the directories where the ZNeo-II toolchain is installed
+# These are the directories where the ZDS-II toolchain is installed. NOTE
+# that short 8.3 path names are used in order to avoid spaces. On my machine
+# I have:
+#
+# C:\PROGRA~1\ = C:\Profram Files\
+# C:\PROGRA~2\ = C:\Program Files (x86)\
+#
+# Your PC may be configured differently.
-ZDSINSTALLDIR := C:/Program Files (x86)/ZiLOG/ZDSII_ZNEO_4.11.1
+ZDSVERSION = 5.0.1
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
- ZDSBINDIR := $(ZDSINSTALLDIR)\bin
- ZDSSTDINCDIR := $(ZDSINSTALLDIR)\include\std
- ZDSZILOGINCDIR := $(ZDSINSTALLDIR)\include\zilog
- ZDSSTDLIBDIR := $(ZDSINSTALLDIR)\lib\std
- ZDSZILOGLIBDIR := $(ZDSINSTALLDIR)\lib\zilog
+ ZDSINSTALLDIR = C:/PROGRA~2/ZiLOG/ZDSII_ZNEO_$(ZDSVERSION)
+ INSTALLDIR = ${shell echo $(ZDSINSTALLDIR)| sed -e "s/\//\\/g"}
+ ZDSBINDIR = $(INSTALLDIR)\bin
+ ZDSSTDINCDIR = $(INSTALLDIR)\include\std
+ ZDSZILOGINCDIR = $(INSTALLDIR)\include\zilog
+ ZDSSTDLIBDIR = $(INSTALLDIR)\lib\std
+ ZDSZILOGLIBDIR = $(INSTALLDIR)\lib\zilog
+
+ # CFLAGs
+
+ ARCHASMINCLUDES = -include:$(TOPDIR)\include;$(ZDSSTDINCDIR);$(ZDSZILOGINCDIR)
+ EARCHASMINCLUDES = -include:$(TOPDIR)\include;$(ZDSSTDINCDIR);$(ZDSZILOGINCDIR)
+ ARCHSTDINCLUDES = -stdinc:$(TOPDIR)\include;$(ZDSSTDINCDIR);$(ZDSZILOGINCDIR)
+ ARCHUSRINCLUDES = -usrinc:.
else
- WINTOOL := y
+ WINTOOL = y
+ ZDSINSTALLDIR = C:/PROGRA~2/ZiLOG/ZDSII_ZNEO_$(ZDSVERSION)
INSTALLDIR = ${shell cygpath -u "$(ZDSINSTALLDIR)"}
- ZDSBINDIR := $(INSTALLDIR)/bin
- ZDSSTDINCDIR := $(INSTALLDIR)/include/std
- ZDSZILOGINCDIR := $(INSTALLDIR)/include/zilog
- ZDSSTDLIBDIR := $(INSTALLDIR)/lib/std
- ZDSZILOGLIBDIR := $(INSTALLDIR)/lib/zilog
-endif
+ ZDSBINDIR = $(INSTALLDIR)/bin
+ ZDSSTDINCDIR = $(INSTALLDIR)/include/std
+ ZDSZILOGINCDIR = $(INSTALLDIR)/include/zilog
+ ZDSSTDLIBDIR = $(INSTALLDIR)/lib/std
+ ZDSZILOGLIBDIR = $(INSTALLDIR)/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)"}
+ WZDSSTDLIBDIR = ${shell cygpath -w "$(ZDSSTDLIBDIR)"}
+ WZDSZILOGLIBDIR = ${shell cygpath -w "$(ZDSZILOGLIBDIR)"}
-# These are the same directories but with the directory separator
-# character swapped as needed by the ZNeo-II compiler
+ # Escaped versions
-WTOPDIR := ${shell cygpath -w "$(TOPDIR)"}
-WZDSSTDINCDIR := ${shell cygpath -w "$(ZDSSTDINCDIR)"}
-WZDSZILOGINCDIR := ${shell cygpath -w "$(ZDSZILOGINCDIR)"}
-WZDSSTDLIBDIR := ${shell cygpath -w "$(ZDSSTDLIBDIR)"}
-WZDSZILOGLIBDIR := ${shell cygpath -w "$(ZDSZILOGLIBDIR)"}
+ 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"}
-# Escaped versions
+ # CFLAGs
-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"}
+ ARCHASMINCLUDES = -include:'$(WTOPDIR)\include;$(WZDSSTDINCDIR);$(WZDSZILOGINCDIR)'
+ EARCHASMINCLUDES = -include:'$(ETOPDIR)\include;$(EZDSSTDINCDIR);$(EZDSZILOGINCDIR)'
+ ARCHSTDINCLUDES = -stdinc:'$(WTOPDIR)\include;$(WZDSSTDINCDIR);$(WZDSZILOGINCDIR)'
+ ARCHUSRINCLUDES = -usrinc:'.'
+endif
# Assembler definitions
@@ -83,7 +107,6 @@ 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
@@ -95,18 +118,16 @@ else
endif
ARCHCPUFLAGS = -chartype:S -model:L -NOmodsect -cpu:Z16F2811AL -NOgenprint \
- -asmsw:" $(ARCHASMCPUFLAGS) $(ARCHASMINCLUDES) $(ARCHASMWARNINGS) $(ARCHASMOPTIMIZATION)"
+ -asmsw:" $(ARCHASMCPUFLAGS) $(ARCHASMINCLUDES) $(ARCHASMWARNINGS) $(ARCHASMOPTIMIZATION)"
ARCHLIST = -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) $(ARCHLIST) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
CPPDEFINES = -D_Z16F2811AL -D_Z16K_SERIES -D_Z16F_SERIES -D__ASSEMBLY__
-CPPINCLUDES = -I$(TOPDIR)/include
+CPPINCLUDES = -I$(TOPDIR)$(DELIM)include
CPPFLAGS = $(CPPDEFINES) $(CPPINCLUDES)
# Librarian definitions
@@ -115,16 +136,16 @@ ARFLAGS = -quiet -warn
# Linker definitions
-LINKCMDTEMPLATE = $(TOPDIR)/configs/z16f2800100zcog/ostest/ostest.linkcmd
+LINKCMDTEMPLATE = $(TOPDIR)$(DELIM)configs$(DELIM)z16f2800100zcog$(DELIM)ostest$(DELIM)ostest.linkcmd
# Tool names/pathes
CROSSDEV =
-CC = $(ZDSBINDIR)/zneocc.exe
+CC = zneocc.exe
CPP = gcc -E
-LD = $(ZDSBINDIR)/zneolink.exe
-AS = $(ZDSBINDIR)/zneoasm.exe
-AR = $(ZDSBINDIR)/zneolib.exe
+LD = zneolink.exe
+AS = zneoasm.exe
+AR = zneolib.exe
# File extensions
@@ -137,51 +158,89 @@ EXEEXT = .hex
# to compile and assembly source files and to insert the resulting
# object files into an archive
+ifeq ($(CONFIG_WINDOWS_NATIVE),y)
+
define PREPROCESS
- @echo "CPP: $1->$2"
+ @echo CPP: $1->$2
$(Q) "$(CPP)" $(CPPFLAGS) $1 -o $2
endef
define COMPILE
- @#echo "CC: $1"
- $(Q) (wfile=`cygpath -w "$1"`; "$(CC)" $(CFLAGS) $$wfile)
+ $(Q) "$(CC)" $(CFLAGS) ${shell echo $1 | sed -e "s/\//\\/g"}
endef
define ASSEMBLE
- @#echo "AS: $1"
- $(Q) (wfile=`cygpath -w "$1"`; "$(AS)" $(AFLAGS) $$wfile)
+ $(Q) "$(AS)" $(AFLAGS) ${shell echo $1 | sed -e "s/\//\\/g"}
endef
-ifeq ($(CONFIG_WINDOWS_NATIVE),y)
define ARCHIVE
- echo "AR: $2";
+ echo AR: $2
$(Q) for %%G in ($(2)) do ( "$(AR)" $(ARFLAGS) $1=-+%%G )
endef
+
+define CLEAN
+ $(Q) if exist *.obj (del /f /q *.obj)
+ $(Q) if exist *.src (del /f /q *.src)
+ $(Q) if exist *.lib (del /f /q *.lib)
+ $(Q) if exist *.hex (del /f /q *.hex)
+ $(Q) if exist *.lod (del /f /q *.lod)
+ $(Q) if exist *.lst (del /f /q *.lst)
+endef
+
else
+
+define PREPROCESS
+ @echo "CPP: $1->$2"
+ $(Q) "$(CPP)" $(CPPFLAGS) $1 -o $2
+endef
+
+define COMPILE
+ $(Q) (wfile=`cygpath -w "$1"`; "$(CC)" $(CFLAGS) $$wfile)
+endef
+
+define ASSEMBLE
+ $(Q) (wfile=`cygpath -w "$1"`; "$(AS)" $(AFLAGS) $$wfile)
+endef
+
define ARCHIVE
$(Q) for __obj in $(2) ; do \
echo "AR: $$__obj"; \
"$(AR)" $(ARFLAGS) $1=-+$$__obj || { echo "$(AR) $1=-+$$__obj FAILED!" ; exit 1 ; } \
done
endef
-endif
define CLEAN
- $(Q) rm -f *.obj *.src *.lib *.hex *.lst
+ $(Q) rm -f *.obj *.src *.lib *.hex *.lod *.lst
endef
+endif
-# This is the tool to use for dependencies (i.e., none)
+# Windows native host tool definitions
-MKDEP = $(TOPDIR)/tools/mknulldeps.sh
+ifeq ($(CONFIG_WINDOWS_NATIVE),y)
+ HOSTCC = mingw32-gcc.exe
+ HOSTINCLUDES = -I.
+ HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -g -pipe
+ HOSTLDFLAGS =
+ HOSTEXEEXT = .exe
-# ZNeo-II cannot follow Cygwin soft links, so we will have to use directory copies
+ # Windows-native host tools
-DIRLINK = $(TOPDIR)/tools/winlink.sh
-DIRUNLINK = $(TOPDIR)/tools/unlink.sh
+ MKDEP = $(TOPDIR)\tools\mkdeps.exe --winnative
+else
# Linux/Cygwin host tool definitions
-HOSTCC = gcc
-HOSTINCLUDES = -I.
-HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -g -pipe
-HOSTLDFLAGS =
+ HOSTCC = gcc
+ HOSTINCLUDES = -I.
+ HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -g -pipe
+ HOSTLDFLAGS =
+
+ # This is the tool to use for dependencies (i.e., none)
+
+ MKDEP = $(TOPDIR)$(DELIM)tools$(DELIM)mknulldeps.sh
+
+ # ZDS-II cannot follow Cygwin soft links, so we will have to use directory copies
+
+ DIRLINK = $(TOPDIR)$(DELIM)tools$(DELIM)winlink.sh
+ DIRUNLINK = $(TOPDIR)$(DELIM)tools$(DELIM)unlink.sh
+endif
diff --git a/nuttx/configs/z16f2800100zcog/ostest/setenv.sh b/nuttx/configs/z16f2800100zcog/ostest/setenv.sh
index bddcad2b5..8a696fdcb 100755
--- a/nuttx/configs/z16f2800100zcog/ostest/setenv.sh
+++ b/nuttx/configs/z16f2800100zcog/ostest/setenv.sh
@@ -1,7 +1,7 @@
#!/bin/bash
# configs/z16f2800100zcog/ostest/setenv.sh
#
-# Copyright (C) 2008, 2010 Gregory Nutt. All rights reserved.
+# Copyright (C) 2008, 2009, 2012 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
@@ -33,19 +33,31 @@
#
# Check how we were executed
#
-if [ "$(basename $0)" = "setenv.sh" ] ; then
+if [ "$_" = "$0" ] ; then
echo "You must source this script, not run it!" 1>&2
exit 1
fi
+WD=`pwd`
+if [ ! -x "setenv.sh" ]; then
+ echo "This script must be executed from the top-level NuttX build directory"
+ exit 1
+fi
+
+if [ -z "${PATH_ORIG}" ]; then
+ export PATH_ORIG="${PATH}"
+fi
+
+#
+# This is the Cygwin path to location where the XDS-II tools were installed
+#
+TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/ZiLOG/ZDSII_ZNEO_5.0.1/bin"
+
#
-# 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.1 installed in the default location is assumed here.
+# Add the path to the toolchain to the PATH variable. NOTE that /bin and /usr/bin
+# preceded the toolchain bin directory. This is because the ZDSII bin directory
+# includes binaries like make.exe that will interfere with the normal build process
+# if we do not give priority to the versions at /bin and /usr/bin.
#
-ZDSBINDIR="C:/Program\ Files/ZiLOG/ZDSII_ZNEO_4.11.1/bin"
-alias zneoasm="${ZDSBINDIR}/zneoasm.exe"
-alias zneocc="${ZDSBINDIR}/zneocc.exe"
-alias zneolib="${ZDSBINDIR}/zneolib.exe"
-alias zneolink="${ZDSBINDIR}/zneolink.exe"
+export PATH="/bin:/usr/bin:${TOOLCHAIN_BIN}:/sbin:/usr/sbin:${PATH_ORIG}"
+echo "PATH : ${PATH}"
diff --git a/nuttx/configs/z16f2800100zcog/pashello/Make.defs b/nuttx/configs/z16f2800100zcog/pashello/Make.defs
index 2ac7aff1e..10a5ee689 100644
--- a/nuttx/configs/z16f2800100zcog/pashello/Make.defs
+++ b/nuttx/configs/z16f2800100zcog/pashello/Make.defs
@@ -1,7 +1,7 @@
############################################################################
# configs/z16f2800100zcog/pashello/Make.defs
#
-# Copyright (C) 2008, 2010 Gregory Nutt. All rights reserved.
+# Copyright (C) 2008, 2010, 2012 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
@@ -33,43 +33,67 @@
#
############################################################################
-include ${TOPDIR}/.config
-include ${TOPDIR}/tools/Config.mk
+include $(TOPDIR)/.config
+include $(TOPDIR)/tools/Config.mk
-# These are the directories where the ZNeo-II toolchain is installed
+# These are the directories where the ZDS-II toolchain is installed. NOTE
+# that short 8.3 path names are used in order to avoid spaces. On my machine
+# I have:
+#
+# C:\PROGRA~1\ = C:\Profram Files\
+# C:\PROGRA~2\ = C:\Program Files (x86)\
+#
+# Your PC may be configured differently.
-ZDSINSTALLDIR := C:/Program Files (x86)/ZiLOG/ZDSII_ZNEO_4.11.1
+ZDSVERSION = 5.0.1
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
- ZDSBINDIR := $(ZDSINSTALLDIR)\bin
- ZDSSTDINCDIR := $(ZDSINSTALLDIR)\include\std
- ZDSZILOGINCDIR := $(ZDSINSTALLDIR)\include\zilog
- ZDSSTDLIBDIR := $(ZDSINSTALLDIR)\lib\std
- ZDSZILOGLIBDIR := $(ZDSINSTALLDIR)\lib\zilog
+ ZDSINSTALLDIR = C:/PROGRA~2/ZiLOG/ZDSII_ZNEO_$(ZDSVERSION)
+ INSTALLDIR = ${shell echo $(ZDSINSTALLDIR)| sed -e "s/\//\\/g"}
+ ZDSBINDIR = $(INSTALLDIR)\bin
+ ZDSSTDINCDIR = $(INSTALLDIR)\include\std
+ ZDSZILOGINCDIR = $(INSTALLDIR)\include\zilog
+ ZDSSTDLIBDIR = $(INSTALLDIR)\lib\std
+ ZDSZILOGLIBDIR = $(INSTALLDIR)\lib\zilog
+
+ # CFLAGs
+
+ ARCHASMINCLUDES = -include:$(TOPDIR)\include;$(ZDSSTDINCDIR);$(ZDSZILOGINCDIR)
+ EARCHASMINCLUDES = -include:$(TOPDIR)\include;$(ZDSSTDINCDIR);$(ZDSZILOGINCDIR)
+ ARCHSTDINCLUDES = -stdinc:$(TOPDIR)\include;$(ZDSSTDINCDIR);$(ZDSZILOGINCDIR)
+ ARCHUSRINCLUDES = -usrinc:.
else
- WINTOOL := y
+ WINTOOL = y
+ ZDSINSTALLDIR = C:/PROGRA~2/ZiLOG/ZDSII_ZNEO_$(ZDSVERSION)
INSTALLDIR = ${shell cygpath -u "$(ZDSINSTALLDIR)"}
- ZDSBINDIR := $(INSTALLDIR)/bin
- ZDSSTDINCDIR := $(INSTALLDIR)/include/std
- ZDSZILOGINCDIR := $(INSTALLDIR)/include/zilog
- ZDSSTDLIBDIR := $(INSTALLDIR)/lib/std
- ZDSZILOGLIBDIR := $(INSTALLDIR)/lib/zilog
-endif
+ ZDSBINDIR = $(INSTALLDIR)/bin
+ ZDSSTDINCDIR = $(INSTALLDIR)/include/std
+ ZDSZILOGINCDIR = $(INSTALLDIR)/include/zilog
+ ZDSSTDLIBDIR = $(INSTALLDIR)/lib/std
+ ZDSZILOGLIBDIR = $(INSTALLDIR)/lib/zilog
-# These are the same directories but with the directory separator
-# character swapped as needed by the ZNeo-II compiler
+ # 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)}
-WZDSSTDLIBDIR := ${shell cygpath -w $(ZDSSTDLIBDIR)}
-WZDSZILOGLIBDIR := ${shell cygpath -w $(ZDSZILOGLIBDIR)}
+ WTOPDIR = ${shell cygpath -w "$(TOPDIR)"}
+ WZDSSTDINCDIR = ${shell cygpath -w "$(ZDSSTDINCDIR)"}
+ WZDSZILOGINCDIR = ${shell cygpath -w "$(ZDSZILOGINCDIR)"}
+ WZDSSTDLIBDIR = ${shell cygpath -w "$(ZDSSTDLIBDIR)"}
+ WZDSZILOGLIBDIR = ${shell cygpath -w "$(ZDSZILOGLIBDIR)"}
-# Escaped versions
+ # 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"}
+ 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"}
+
+ # CFLAGs
+
+ ARCHASMINCLUDES = -include:'$(WTOPDIR)\include;$(WZDSSTDINCDIR);$(WZDSZILOGINCDIR)'
+ EARCHASMINCLUDES = -include:'$(ETOPDIR)\include;$(EZDSSTDINCDIR);$(EZDSZILOGINCDIR)'
+ ARCHSTDINCLUDES = -stdinc:'$(WTOPDIR)\include;$(WZDSSTDINCDIR);$(WZDSZILOGINCDIR)'
+ ARCHUSRINCLUDES = -usrinc:'.'
+endif
# Assembler definitions
@@ -83,7 +107,6 @@ 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
@@ -95,18 +118,16 @@ else
endif
ARCHCPUFLAGS = -chartype:S -model:L -NOmodsect -cpu:Z16F2811AL -NOgenprint \
- -asmsw:" $(ARCHASMCPUFLAGS) $(ARCHASMINCLUDES) $(ARCHASMWARNINGS) $(ARCHASMOPTIMIZATION)"
+ -asmsw:" $(ARCHASMCPUFLAGS) $(ARCHASMINCLUDES) $(ARCHASMWARNINGS) $(ARCHASMOPTIMIZATION)"
ARCHLIST = -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) $(ARCHLIST) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
CPPDEFINES = -D_Z16F2811AL -D_Z16K_SERIES -D_Z16F_SERIES -D__ASSEMBLY__
-CPPINCLUDES = -I$(TOPDIR)/include
+CPPINCLUDES = -I$(TOPDIR)$(DELIM)include
CPPFLAGS = $(CPPDEFINES) $(CPPINCLUDES)
# Librarian definitions
@@ -115,16 +136,16 @@ ARFLAGS = -quiet -warn
# Linker definitions
-LINKCMDTEMPLATE = $(TOPDIR)/configs/z16f2800100zcog/pashello/pashello.linkcmd
+LINKCMDTEMPLATE = $(TOPDIR)$(DELIM)configs$(DELIM)z16f2800100zcog$(DELIM)pashello$(DELIM)pashello.linkcmd
# Tool names/pathes
CROSSDEV =
-CC = $(ZDSBINDIR)/zneocc.exe
+CC = zneocc.exe
CPP = gcc -E
-LD = $(ZDSBINDIR)/zneolink.exe
-AS = $(ZDSBINDIR)/zneoasm.exe
-AR = $(ZDSBINDIR)/zneolib.exe
+LD = zneolink.exe
+AS = zneoasm.exe
+AR = zneolib.exe
# File extensions
@@ -137,51 +158,89 @@ EXEEXT = .hex
# to compile and assembly source files and to insert the resulting
# object files into an archive
+ifeq ($(CONFIG_WINDOWS_NATIVE),y)
+
define PREPROCESS
- @echo "CPP: $1->$2"
- @$(CPP) $(CPPFLAGS) $1 -o $2
+ @echo CPP: $1->$2
+ $(Q) "$(CPP)" $(CPPFLAGS) $1 -o $2
endef
define COMPILE
- @#echo "CC: $1"
- @(wfile=`cygpath -w $1`; $(CC) $(CFLAGS) $$wfile)
+ $(Q) "$(CC)" $(CFLAGS) ${shell echo $1 | sed -e "s/\//\\/g"}
endef
define ASSEMBLE
- @#echo "AS: $1"
- @(wfile=`cygpath -w $1`; $(AS) $(AFLAGS) $$wfile)
+ $(Q) "$(AS)" $(AFLAGS) ${shell echo $1 | sed -e "s/\//\\/g"}
endef
-ifeq ($(CONFIG_WINDOWS_NATIVE),y)
define ARCHIVE
- echo "AR: $2";
+ echo AR: $2
$(Q) for %%G in ($(2)) do ( "$(AR)" $(ARFLAGS) $1=-+%%G )
endef
+
+define CLEAN
+ $(Q) if exist *.obj (del /f /q *.obj)
+ $(Q) if exist *.src (del /f /q *.src)
+ $(Q) if exist *.lib (del /f /q *.lib)
+ $(Q) if exist *.hex (del /f /q *.hex)
+ $(Q) if exist *.lod (del /f /q *.lod)
+ $(Q) if exist *.lst (del /f /q *.lst)
+endef
+
else
+
+define PREPROCESS
+ @echo "CPP: $1->$2"
+ $(Q) "$(CPP)" $(CPPFLAGS) $1 -o $2
+endef
+
+define COMPILE
+ $(Q) (wfile=`cygpath -w "$1"`; "$(CC)" $(CFLAGS) $$wfile)
+endef
+
+define ASSEMBLE
+ $(Q) (wfile=`cygpath -w "$1"`; "$(AS)" $(AFLAGS) $$wfile)
+endef
+
define ARCHIVE
$(Q) for __obj in $(2) ; do \
echo "AR: $$__obj"; \
"$(AR)" $(ARFLAGS) $1=-+$$__obj || { echo "$(AR) $1=-+$$__obj FAILED!" ; exit 1 ; } \
done
endef
-endif
define CLEAN
- @rm -f *.obj *.src *.lib *.hex *.lst
+ $(Q) rm -f *.obj *.src *.lib *.hex *.lod *.lst
endef
+endif
-# This is the tool to use for dependencies (i.e., none)
+# Windows native host tool definitions
-MKDEP = $(TOPDIR)/tools/mknulldeps.sh
+ifeq ($(CONFIG_WINDOWS_NATIVE),y)
+ HOSTCC = mingw32-gcc.exe
+ HOSTINCLUDES = -I.
+ HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -g -pipe
+ HOSTLDFLAGS =
+ HOSTEXEEXT = .exe
-# ZNeo-II cannot follow Cygwin soft links, so we will have to use directory copies
+ # Windows-native host tools
-DIRLINK = $(TOPDIR)/tools/winlink.sh
-DIRUNLINK = $(TOPDIR)/tools/unlink.sh
+ MKDEP = $(TOPDIR)\tools\mkdeps.exe --winnative
+else
# Linux/Cygwin host tool definitions
-HOSTCC = gcc
-HOSTINCLUDES = -I.
-HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -g -pipe
-HOSTLDFLAGS =
+ HOSTCC = gcc
+ HOSTINCLUDES = -I.
+ HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -g -pipe
+ HOSTLDFLAGS =
+
+ # This is the tool to use for dependencies (i.e., none)
+
+ MKDEP = $(TOPDIR)$(DELIM)tools$(DELIM)mknulldeps.sh
+
+ # ZDS-II cannot follow Cygwin soft links, so we will have to use directory copies
+
+ DIRLINK = $(TOPDIR)$(DELIM)tools$(DELIM)winlink.sh
+ DIRUNLINK = $(TOPDIR)$(DELIM)tools$(DELIM)unlink.sh
+endif
diff --git a/nuttx/configs/z16f2800100zcog/pashello/setenv.sh b/nuttx/configs/z16f2800100zcog/pashello/setenv.sh
index f957b23cb..2db93c5ef 100755
--- a/nuttx/configs/z16f2800100zcog/pashello/setenv.sh
+++ b/nuttx/configs/z16f2800100zcog/pashello/setenv.sh
@@ -1,7 +1,7 @@
#!/bin/bash
-# z16f2800100zcog/setenv.sh
+# configs/z16f2800100zcog/pashello/setenv.sh
#
-# Copyright (C) 2008, 2010 Gregory Nutt. All rights reserved.
+# Copyright (C) 2008, 2009, 2012 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
@@ -33,19 +33,31 @@
#
# Check how we were executed
#
-if [ "$(basename $0)" = "setenv.sh" ] ; then
+if [ "$_" = "$0" ] ; then
echo "You must source this script, not run it!" 1>&2
exit 1
fi
+WD=`pwd`
+if [ ! -x "setenv.sh" ]; then
+ echo "This script must be executed from the top-level NuttX build directory"
+ exit 1
+fi
+
+if [ -z "${PATH_ORIG}" ]; then
+ export PATH_ORIG="${PATH}"
+fi
+
+#
+# This is the Cygwin path to location where the XDS-II tools were installed
+#
+TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/ZiLOG/ZDSII_ZNEO_5.0.1/bin"
+
#
-# 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.1 installed in the default location is assumed here.
+# Add the path to the toolchain to the PATH variable. NOTE that /bin and /usr/bin
+# preceded the toolchain bin directory. This is because the ZDSII bin directory
+# includes binaries like make.exe that will interfere with the normal build process
+# if we do not give priority to the versions at /bin and /usr/bin.
#
-ZDSBINDIR="C:/Program\ Files/ZiLOG/ZDSII_ZNEO_4.11.1/bin"
-alias zneoasm="${ZDSBINDIR}/zneoasm.exe"
-alias zneocc="${ZDSBINDIR}/zneocc.exe"
-alias zneolib="${ZDSBINDIR}/zneolib.exe"
-alias zneolink="${ZDSBINDIR}/zneolink.exe"
+export PATH="/bin:/usr/bin:${TOOLCHAIN_BIN}:/sbin:/usr/sbin:${PATH_ORIG}"
+echo "PATH : ${PATH}"
diff --git a/nuttx/configs/z8encore000zco/README.txt b/nuttx/configs/z8encore000zco/README.txt
index d37ee2302..9ec1b80af 100644
--- a/nuttx/configs/z8encore000zco/README.txt
+++ b/nuttx/configs/z8encore000zco/README.txt
@@ -29,7 +29,7 @@ Version 4.9.5
Version 5.0.0
- On November 18, 2012, all of the z8 configurations were converted to use 5.0.0,
+ On November 28, 2012, all of the z8 configurations were converted to use 5.0.0,
but have not been verified on a running target.
Paths were also updated that are specific to a 32-bit toolchain running on
diff --git a/nuttx/configs/z8f64200100kit/README.txt b/nuttx/configs/z8f64200100kit/README.txt
index 1bb70ebb7..7356c8e87 100644
--- a/nuttx/configs/z8f64200100kit/README.txt
+++ b/nuttx/configs/z8f64200100kit/README.txt
@@ -29,7 +29,7 @@ Version 4.9.5
Version 5.0.0
- On November 18, 2012, all of the z8 configurations were converted to use 5.0.0,
+ On November 28, 2012, all of the z8 configurations were converted to use 5.0.0,
but have not been verified on a running target.
Paths were also updated that are specific to a 32-bit toolchain running on