From 508bb73d7650b0e1217d081f33d0de14338ca20b Mon Sep 17 00:00:00 2001 From: Samuel Obuch Date: Thu, 2 Apr 2026 17:25:49 +0200 Subject: [PATCH] change(cmake): use lpcore openocd configs with CONFIG_ULP_COPROC_TYPE_LP_CORE --- tools/cmake/openocd.cmake | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tools/cmake/openocd.cmake b/tools/cmake/openocd.cmake index b67cb06e398..f922f59c64f 100644 --- a/tools/cmake/openocd.cmake +++ b/tools/cmake/openocd.cmake @@ -6,8 +6,16 @@ function(__get_openocd_options openocd_option_var) elseif(CONFIG_IDF_TARGET STREQUAL "esp32s2") set(${openocd_option_var} "-f board/esp32s2-kaluga-1.cfg" PARENT_SCOPE) elseif(CONFIG_SOC_USB_SERIAL_JTAG_SUPPORTED) - set(${openocd_option_var} "-f board/${CONFIG_IDF_TARGET}-builtin.cfg" PARENT_SCOPE) + if(CONFIG_ULP_COPROC_TYPE_LP_CORE) + set(${openocd_option_var} "-f board/${CONFIG_IDF_TARGET}-lpcore-builtin.cfg" PARENT_SCOPE) + else() + set(${openocd_option_var} "-f board/${CONFIG_IDF_TARGET}-builtin.cfg" PARENT_SCOPE) + endif() else() - set(${openocd_option_var} "-f board/${CONFIG_IDF_TARGET}-ftdi.cfg" PARENT_SCOPE) + if(CONFIG_ULP_COPROC_TYPE_LP_CORE) + set(${openocd_option_var} "-f board/${CONFIG_IDF_TARGET}-lpcore-ftdi.cfg" PARENT_SCOPE) + else() + set(${openocd_option_var} "-f board/${CONFIG_IDF_TARGET}-ftdi.cfg" PARENT_SCOPE) + endif() endif() endfunction()