-
Notifications
You must be signed in to change notification settings - Fork 4
/
run-openocd.sh
executable file
·34 lines (23 loc) · 1.04 KB
/
run-openocd.sh
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
#!/bin/bash
_PWD=$(realpath $(dirname $0))
# if path to HPM_SDK_BASE is not set, then set it to default value
if [ -z "$HPM_SDK_BASE" ]; then
export HPM_SDK_BASE=$(realpath "${_PWD}/../hpm_sdk")
fi
if [ ! -d "$HPM_SDK_BASE" ]; then
echo "HPM_SDK_BASE is not set correctly. Please set it to the correct path."
exit 1
fi
echo "Using HPM_SDK_BASE=${HPM_SDK_BASE}"
# openocd -f $OPENOCD_CFG/probes/ft2232.cfg -f $OPENOCD_CFG/soc/hpm5300.cfg -f $OPENOCD_CFG/boards/hpm5300evk.cfg
# export FAMILY=hpm6e00; export BOARD=hpm6e00evk
# export FAMILY=hpm5300; export BOARD=hpm5301evklite
export FAMILY=hpm5300; export BOARD=hpm5300evk
# export FAMILY=hpm6300; export BOARD=hpm6300evk
# export FAMILY=hpm6750; export BOARD=hpm6750evkmini
# export FAMILY=hpm6750; export BOARD=hpm6750evk
# export FAMILY=hpm6750; export BOARD=hpm6750evk2
export PROBE=ft2232
# export PROBE=cmsis_dap
# export PROBE=jlink
openocd -c "set HPM_SDK_BASE ${HPM_SDK_BASE}; set BOARD ${BOARD}; set PROBE ${PROBE};" -f ${HPM_SDK_BASE}/boards/openocd/${FAMILY}_all_in_one.cfg