From 76b5915d5b400b103db4044904207b6a83c2363e Mon Sep 17 00:00:00 2001 From: Andy Piper Date: Sun, 27 Nov 2022 15:56:15 +0000 Subject: [PATCH] AP_BoardConfig: ensure that debug pins are enabled if compiled with debug --- libraries/AP_BoardConfig/board_drivers.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/AP_BoardConfig/board_drivers.cpp b/libraries/AP_BoardConfig/board_drivers.cpp index 40b2a30647..6d59ea32d6 100644 --- a/libraries/AP_BoardConfig/board_drivers.cpp +++ b/libraries/AP_BoardConfig/board_drivers.cpp @@ -54,7 +54,7 @@ void AP_BoardConfig::board_init_safety() */ void AP_BoardConfig::board_init_debug() { -#ifndef HAL_BUILD_AP_PERIPH +#if !defined(HAL_BUILD_AP_PERIPH) && !defined(HAL_DEBUG_BUILD) if ((_options & BOARD_OPTION_DEBUG_ENABLE) == 0) { #ifdef HAL_GPIO_PIN_JTCK_SWCLK palSetLineMode(HAL_GPIO_PIN_JTCK_SWCLK, PAL_MODE_INPUT); @@ -63,7 +63,7 @@ void AP_BoardConfig::board_init_debug() palSetLineMode(HAL_GPIO_PIN_JTMS_SWDIO, PAL_MODE_INPUT); #endif } -#endif // HAL_BUILD_AP_PERIPH +#endif // HAL_BUILD_AP_PERIPH && HAL_DEBUG_BUILD }