From f416a0ad414db2a2892049f261d14d4392f78677 Mon Sep 17 00:00:00 2001 From: SeconetStefanW <131348021+SeconetStefanW@users.noreply.github.com> Date: Fri, 19 Jan 2024 09:24:13 +0000 Subject: [PATCH] Fix bootloader swo debug output undeclared variable with cortex-m3 --- platform/bootloader/debug/btl_debug_swo.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/platform/bootloader/debug/btl_debug_swo.c b/platform/bootloader/debug/btl_debug_swo.c index 9f8bebc84d5..1fb045248ac 100644 --- a/platform/bootloader/debug/btl_debug_swo.c +++ b/platform/bootloader/debug/btl_debug_swo.c @@ -46,8 +46,11 @@ void btl_debugInit(void) GPIO->ROUTELOC0 = (GPIO->ROUTELOC0 & ~(_GPIO_ROUTELOC0_SWVLOC_MASK)) | SL_DEBUG_SWV_LOC; +#if ((__CORTEX_M == 4) || (__CORTEX_M == 33)) // Set TPIU prescaler to 22 (19 MHz / 22 = 863.63 kHz SWO speed) tpiu_prescaler_val = 22 - 1; +#endif + #endif // Enable output on pin #if (SL_DEBUG_SWV_PIN > 7U)