summaryrefslogtreecommitdiff
path: root/sim-scripts/lm32_evr.in
blob: 82bd44d499b42297acdc0b5033d817c2acad8d90 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#
#  lm32/lm32_evr Support Using Simulator in GDB
#

generate_lm32_evr_conf()
{
cat >lm32_evr.conf <<EOF
/lm32cpu
/lm32uart/reg 0x80006000 0x100
/lm32uart > int int0 /lm32cpu
/lm32timer/reg 0x80002000 0x80
/lm32timer > int int1 /lm32cpu
EOF

# GDB does not support attaching a second instance
# /lm32timer/reg 0x8000a000 0x80
# /lm32timer > int int3 /lm32cpu
}

runARGS()
{
#  echo '--hw-device lm32cpu
#       --hw-device "lm32uart/reg 0x80006000 0x100"
#       --hw-device "/lm32uart > int int0 /lm32cpu"
#       --hw-device "lm32timer/reg 0x80002000 0x80"
#       --hw-device "/lm32timer > int int1 /lm32cpu"
#       --memory-region 0x08000000,0x4000000' ${1}
  generate_lm32_evr_conf
  echo "--hw-file lm32_evr.conf --memory-region  0x08000000,0x4000000 ${1}"
}

bspGeneratesGDBCommands="yes"

bspGenerateGDBCommands()
{
# tar sim --hw-device lm32cpu \\
#   --hw-device "lm32uart/reg 0x80006000 0x100" \\
#   --hw-device "/lm32uart > int int0 /lm32cpu" \\
#   --hw-device "lm32timer/reg 0x80002000 0x80" \\
#   --hw-device "/lm32timer > int int1 /lm32cpu" \\
#   --memory-region 0x08000000,0x4000000
generate_lm32_evr_conf
cat <<EOF
tar sim --hw-file lm32_evr.conf --memory-region  0x08000000,0x4000000
load
EOF
}

checkBSPFaults()
{
  return 0
}

bspLimit()
{
  testname=$1
  case ${testname} in
    *stackchk*)limit=5 ;;
    *fatal*)   limit=1 ;;
    *minimum*) limit=1 ;;
    *psxtime*) limit=180 ;;
    *)         limit=60 ;;
  esac
  echo ${limit}
}