OpenCores
URL https://opencores.org/ocsvn/w11/w11/trunk

Subversion Repositories w11

[/] [w11/] [tags/] [w11a_V0.74/] [tools/] [bin/] [xtwi] - Blame information for rev 38

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 22 wfjm
#!/bin/bash
2 37 wfjm
# $Id: xtwi 804 2016-08-28 17:33:50Z mueller $
3 22 wfjm
#
4 35 wfjm
# Copyright 2013-2016 by Walter F.J. Mueller 
5 29 wfjm
# License disclaimer see LICENSE_gpl_v2.txt in $RETROBASE directory
6
#
7 22 wfjm
# Xilinx Tool Wrapper script for ISE:
8
#   define XTWI_PATH
9
#   usage  xwti 
10
#
11
#  Revision History:
12
# Date         Rev Version  Comment
13 37 wfjm
# 2016-08-28   804   1.2    BUGFIX: add ":." to PATH even under BARE_PATH
14 35 wfjm
# 2016-02-21   735   1.1    use BARE_PATH ect to provide clean environment
15 22 wfjm
# 2013-10-12   539   1.0    Initial version
16
#
17
# Note: For Xilinx ISE installations with an install path  holds
18
#         /ISE_DS        dir with settings(32|64).sh
19
#         /ISE_DS/ISE    XILINX env var will point here
20
#
21
 
22
# store arg list on vars (will be dropped later to source scripts)
23
arglist_val=$@
24
arglist_num=$#
25
#
26
# check whether ISE already setup ($XILINX defined)
27
if [ -z "$XILINX" ]
28
then
29
  # check whether $XTWI_PATH defined
30
  if [ -z "$XTWI_PATH" ]
31
  then
32
    echo "XTWI_PATH not defined"
33
    exit 1
34
  fi
35
 
36 35 wfjm
  # provide clean environment when BARE_PATH ect defined
37 37 wfjm
  #   add only $RETROBASE/tools/bin and '.' to path
38
  #   '.' is needed to start ISim tb's, which usually are in cwd
39 35 wfjm
  if [ -n "$BARE_PATH" ]
40
  then
41 37 wfjm
    export PATH=$BARE_PATH:$RETROBASE/tools/bin:.
42 35 wfjm
    unset LD_LIBRARY_PATH
43
    if [ -n "$BARE_LD_LIBRARY_PATH" ]
44
    then
45
      export LD_LIBRARY_PATH=$BARE_LD_LIBRARY_PATH
46
    fi
47
  fi
48
 
49 22 wfjm
  # check whether 32 or 64 bit system (uname -m gives 'i686' or 'x86_64')
50
  if [ `uname -m` = "x86_64" ]
51
  then
52
    settings_filename=$XTWI_PATH/ISE_DS/settings64.sh
53
  else
54
    settings_filename=$XTWI_PATH/ISE_DS/settings32.sh
55
  fi
56
  if [ ! -e "$settings_filename" ]
57
  then
58
    echo "can't locate init script '$settings_filename'"
59
    exit 1
60
  fi
61
 
62
  # drop arg list, suppress output
63
  set --
64
  . $settings_filename > /dev/null
65
 
66
  # check that XILINX defined
67
  if [ -z "$XILINX" ]
68
  then
69
    echo "Failed to setup XILINX"
70
    exit 1
71
  fi
72
 
73
else
74
  echo "XILINX already defined"
75
fi
76
 
77
if [ $arglist_num != 0 ]
78
then
79
  exec $arglist_val
80
fi

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.