summaryrefslogtreecommitdiff
path: root/nuttx/configs/z16f2800100zcog/ostest/setenv.sh
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/configs/z16f2800100zcog/ostest/setenv.sh')
-rwxr-xr-xnuttx/configs/z16f2800100zcog/ostest/setenv.sh34
1 files changed, 23 insertions, 11 deletions
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}"