summaryrefslogtreecommitdiff
path: root/openocd.cfg
blob: a3efc11b79fa9c40c1bc6f9f2a0b5d6452b412bb (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
if { [info exists env(DEVICE)] } {
  set device $env(DEVICE)
} else {
  set device "stlink-v2"
}

switch $device {
  "stlink-v2" {
    source [find interface/stlink-v2.cfg]
  }
  "olimex-arm-usb-tiny-h" {
    source [find interface/ftdi/olimex-arm-usb-tiny-h.cfg]
    source [find interface/ftdi/olimex-arm-jtag-swd.cfg]
  }
}

source [find target/stm32f1x.cfg]

telnet_port disabled
tcl_port disabled

if { [info exists HLA_SERIAL] } {
  # If set with -c use that by default
} elseif { [info exists env(HLA_SERIAL)] } {
  eval "set HLA_SERIAL $env(HLA_SERIAL)"
}

if { [info exists HLA_SERIAL] } {
  hla_serial $HLA_SERIAL
}

if { [info exists GDB_PORT] } {
  # If set with -c use that by default
} elseif { [info exists env(GDB_PORT)] } {
  set GDB_PORT $env(GDB_PORT)
} else {
  set GDB_PORT 3333
}

gdb_port $GDB_PORT