#!/bin/bash
|
#!/bin/bash
|
# $Id: xtwi 544 2013-11-10 22:42:16Z mueller $
|
# $Id: xtwi 544 2013-11-10 22:42:16Z mueller $
|
#
|
#
|
# Xilinx Tool Wrapper script for ISE:
|
# Xilinx Tool Wrapper script for ISE:
|
# define XTWI_PATH
|
# define XTWI_PATH
|
# usage xwti
|
# usage xwti
|
#
|
#
|
# Revision History:
|
# Revision History:
|
# Date Rev Version Comment
|
# Date Rev Version Comment
|
# 2013-10-12 539 1.0 Initial version
|
# 2013-10-12 539 1.0 Initial version
|
#
|
#
|
# Note: For Xilinx ISE installations with an install path holds
|
# Note: For Xilinx ISE installations with an install path holds
|
# /ISE_DS dir with settings(32|64).sh
|
# /ISE_DS dir with settings(32|64).sh
|
# /ISE_DS/ISE XILINX env var will point here
|
# /ISE_DS/ISE XILINX env var will point here
|
#
|
#
|
|
|
# store arg list on vars (will be dropped later to source scripts)
|
# store arg list on vars (will be dropped later to source scripts)
|
arglist_val=$@
|
arglist_val=$@
|
arglist_num=$#
|
arglist_num=$#
|
#
|
#
|
# check whether ISE already setup ($XILINX defined)
|
# check whether ISE already setup ($XILINX defined)
|
if [ -z "$XILINX" ]
|
if [ -z "$XILINX" ]
|
then
|
then
|
# check whether $XTWI_PATH defined
|
# check whether $XTWI_PATH defined
|
if [ -z "$XTWI_PATH" ]
|
if [ -z "$XTWI_PATH" ]
|
then
|
then
|
echo "XTWI_PATH not defined"
|
echo "XTWI_PATH not defined"
|
exit 1
|
exit 1
|
fi
|
fi
|
|
|
# check whether 32 or 64 bit system (uname -m gives 'i686' or 'x86_64')
|
# check whether 32 or 64 bit system (uname -m gives 'i686' or 'x86_64')
|
if [ `uname -m` = "x86_64" ]
|
if [ `uname -m` = "x86_64" ]
|
then
|
then
|
settings_filename=$XTWI_PATH/ISE_DS/settings64.sh
|
settings_filename=$XTWI_PATH/ISE_DS/settings64.sh
|
else
|
else
|
settings_filename=$XTWI_PATH/ISE_DS/settings32.sh
|
settings_filename=$XTWI_PATH/ISE_DS/settings32.sh
|
fi
|
fi
|
if [ ! -e "$settings_filename" ]
|
if [ ! -e "$settings_filename" ]
|
then
|
then
|
echo "can't locate init script '$settings_filename'"
|
echo "can't locate init script '$settings_filename'"
|
exit 1
|
exit 1
|
fi
|
fi
|
|
|
# drop arg list, suppress output
|
# drop arg list, suppress output
|
set --
|
set --
|
. $settings_filename > /dev/null
|
. $settings_filename > /dev/null
|
|
|
# check that XILINX defined
|
# check that XILINX defined
|
if [ -z "$XILINX" ]
|
if [ -z "$XILINX" ]
|
then
|
then
|
echo "Failed to setup XILINX"
|
echo "Failed to setup XILINX"
|
exit 1
|
exit 1
|
fi
|
fi
|
|
|
else
|
else
|
echo "XILINX already defined"
|
echo "XILINX already defined"
|
fi
|
fi
|
|
|
if [ $arglist_num != 0 ]
|
if [ $arglist_num != 0 ]
|
then
|
then
|
exec $arglist_val
|
exec $arglist_val
|
fi
|
fi
|
|
|