#!/bin/sh
#
#  xtconfig -- return Xtensa software configuration information
#
#  Customer ID=7729; Build=0x71521; Copyright 2003-2004 Tensilica Inc.


usage() {
    cat <<_END_
usage:  xtconfig option
Valid options are:
  binpath   path to Xtensa tools normally added to PATH
            (/././home/xpgcust/tree/RG-2017.5/tools/swtools-x86-linux/bin)
  config    path to Xtensa core configuration directory
            (/././project/cust/genapp/RG-2017.5/build/ttiEng/vpawar/hifi3_hikey960/269582/RG-2017.5/hifi3_hikey960)
  core      path to Xtensa core main parameter file
            (/././project/cust/genapp/RG-2017.5/build/ttiEng/vpawar/hifi3_hikey960/269582/RG-2017.5/hifi3_hikey960/config/hifi3_hikey960-params)
  corename  name of core as could be assigned to XTENSA_CORE (hifi3_hikey960)
  release   Xtensa product release version (12.0.5
)
  system    path to core repository as could be assigned to XTENSA_SYSTEM
            (/././project/cust/genapp/RG-2017.5/build/ttiEng/vpawar/hifi3_hikey960/269582/RG-2017.5/hifi3_hikey960/config)
  tctools   path to TIE compiler directory
            (/././home/xpgcust/tree/RG-2017.5/tools/swtools-x86-linux/TIE)
  tools     path to standard tools directory
            (/././usr/xtensa/tools-7.0)
  xttools   path to Xtensa software tools directory
            (/././home/xpgcust/tree/RG-2017.5/tools/swtools-x86-linux)
_END_
    exit 1
}


if [ "x$1" = "x" -o "x$2" != "x" ]; then
    echo "Error: incorrect number of parameters."
    usage
fi

value=""
case "x$1" in
xcore)		value=/././project/cust/genapp/RG-2017.5/build/ttiEng/vpawar/hifi3_hikey960/269582/RG-2017.5/hifi3_hikey960/config/hifi3_hikey960-params ;;
xtools)		value=/././usr/xtensa/tools-7.0 ;;
xtctools)	value=/././home/xpgcust/tree/RG-2017.5/tools/swtools-x86-linux/TIE ;;
xxttools)	value=/././home/xpgcust/tree/RG-2017.5/tools/swtools-x86-linux ;;
xconfig)	value=/././project/cust/genapp/RG-2017.5/build/ttiEng/vpawar/hifi3_hikey960/269582/RG-2017.5/hifi3_hikey960 ;;
xbinpath)	value=/././home/xpgcust/tree/RG-2017.5/tools/swtools-x86-linux/bin ;;
xsystem)	value=/././project/cust/genapp/RG-2017.5/build/ttiEng/vpawar/hifi3_hikey960/269582/RG-2017.5/hifi3_hikey960/config ;;
xcorename)	value=hifi3_hikey960 ;;
xrelease)	value=12.0.5
 ;;
esac

echo "$value"

if [ "x$value" = "x" ]; then
    echo "Error: unrecognized option '$1'"
    usage
fi

exit 0;

