Blame view

RIOT/boards/pttu/tools/openocd-pttu.sh 809 Bytes
fb11e647   vrobic   reseau statique a...
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
  #/usr/bin/env bash
  
  if [ $# -le 0 ]; then
      echo "usage: $0 [openocd interface name] [openocd args]" >&2
      echo "  common interfaces: olimex-arm-usb-ocd olimex-jtag-tiny olimex-jtag-tiny-a"
      echo ""
      echo "using default olimex-jtag-tiny-a"
      INTERFACE=olimex-jtag-tiny-a
  else
      INTERFACE=$1
      shift
  fi
  
  if [ $# -ge 1 ]; then
      COMMAND=$@
  else
      COMMAND="debug_level 1"
  fi
  
  if [ "${OS}" = "Windows_NT" ]; then
      WINDOWS=1
  fi
  
  if [ "x${WINDOWS}x" = "xx" ]; then
      xterm -e "openocd -s ../../.. -f interface/${INTERFACE}.cfg -f board/pttu/tools/openocd-pttu.cfg -c \"${COMMAND}\"|| read" &
  else
      echo ${COMMAND}
      #cmd /C start "OpenOCD PTTU using ${INTERFACE}"
      openocd-ftd2xx.exe -s ../../.. -f interface/${INTERFACE}.cfg -f board/pttu/tools/openocd-pttu.cfg -c "${COMMAND}"
  fi