• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2022 hpmicro
2# SPDX-License-Identifier: BSD-3-Clause
3#
4# assumptions:
5#   - HPM_SDK_BASE has been defined as environment variable pointing to correct hpm_sdk path
6#   - current directory is ${HPM_SDK_BASE}/boards/openocd
7#
8# usage:
9# # connect hpm6300evk via ft2232, debugging single core
10#   $ openocd -c "set HPM_SDK_BASE ${HPM_SDK_BASE}; set BOARD hpm6300evk; set PROBE ft2232;" -f hpm6300_all_in_one.cfg
11#
12# # supported board to be set to BOARD:
13#   - hpm6300evk
14#   - hpm6360evk
15# # supported probes to be set to PROBE:
16#   - ft2232
17#   - ft232
18#   - jlink
19#   - cmsis_dap
20#   - nds_aice_micro
21
22set HPM_OPENOCD_CONFIG ${HPM_SDK_BASE}/boards/openocd
23
24if { ![info exists PROBE ] } {
25    set PROBE ft2232
26}
27
28if { ![info exists BOARD] } {
29    set BOARD hpm6300evk
30}
31
32source ${HPM_OPENOCD_CONFIG}/probes/${PROBE}.cfg
33source ${HPM_OPENOCD_CONFIG}/soc/hpm6360.cfg
34source ${HPM_OPENOCD_CONFIG}/boards/${BOARD}.cfg
35