1# Copyright 2021 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 hpm6750evkmini via ft2232, debugging single core 10# $ openocd -c "set HPM_SDK_BASE ${HPM_SDK_BASE}; set BOARD hpm6750evkmini; set PROBE ft2232;" -f hpm6750_all_in_one.cfg 11# # connect hpm6750evkmini via ft2232, debugging dual core 12# $ openocd -c "set HPM_SDK_BASE ${HPM_SDK_BASE}; set BOARD hpm6750evkmini; set PROBE ft2232; set ENABLE_DUALCORE 1" -f hpm6750_all_in_one.cfg 13# 14# # supported board to be set to BOARD: 15# - hpm6750evk 16# - hpm6750evkmini 17# # supported probes to be set to PROBE: 18# - ft2232 19# - ft232 20# - jlink 21# - cmsis_dap 22# - nds_aice_micro 23# # supported core debug type to ENABLE_DUALCORE: 24# - 1: enable dual core debugging 25 26set HPM_OPENOCD_CONFIG ${HPM_SDK_BASE}/boards/openocd 27 28if { ![info exists PROBE ] } { 29 set PROBE ft2232 30} 31 32if { ![info exists BOARD] } { 33 set BOARD hpm6750evkmini 34} 35 36if { [info exists ENABLE_DUALCORE] && $ENABLE_DUALCORE == 1 } { 37 set CORE hpm6750-dual-core 38} else { 39 set CORE hpm6750-single-core 40} 41 42source ${HPM_OPENOCD_CONFIG}/probes/${PROBE}.cfg 43source ${HPM_OPENOCD_CONFIG}/soc/${CORE}.cfg 44source ${HPM_OPENOCD_CONFIG}/boards/${BOARD}.cfg 45