From ac8ed1eb138a4d0f68ba1a4afcc28fb71c86e3fc Mon Sep 17 00:00:00 2001 From: chrysn Date: Fri, 14 Feb 2020 09:24:25 +0100 Subject: [PATCH] openocd: Allow using OpenOCD-shipped configs OpenOCD already ships config files for the EFM32 and EFR32 family, no need to duplicate them in RIOT; this removes the "file exists" check for files that are clearly OpenOCD-shipped board configurations, as the script can't (and shouldn't) know OpenOCD's include paths. --- dist/tools/openocd/openocd.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dist/tools/openocd/openocd.sh b/dist/tools/openocd/openocd.sh index 19ee9065ca..df45b6f6bd 100755 --- a/dist/tools/openocd/openocd.sh +++ b/dist/tools/openocd/openocd.sh @@ -4,7 +4,8 @@ # # This script is supposed to be called from RIOTs make system, # as it depends on certain environment variables. An OpenOCD -# configuration file must be present in a the boards dist folder. +# configuration file must be present in a the boards dist folder +# or be given as "board/[...].cfg" to use an OpenOCD shipped configuration. # # Any extra command line arguments after the command name are passed on the # openocd command line after the configuration file name but before any other @@ -133,7 +134,7 @@ fi # a couple of tests for certain configuration options # test_config() { - if [ ! -f "${OPENOCD_CONFIG}" ]; then + if [ ! -f "${OPENOCD_CONFIG}" ] && [[ ! "${OPENOCD_CONFIG}" == board/* ]] ; then echo "Error: Unable to locate OpenOCD configuration file" echo " (${OPENOCD_CONFIG})" exit 1