From 7ddefbf3691276c5490f2fb1128e72a041657f53 Mon Sep 17 00:00:00 2001 From: Fabio Baltieri Date: Thu, 24 Jul 2025 19:40:18 +0100 Subject: [PATCH] tests: arm: sw_vector_table: fix build on many non systick platforms In 4c93fcd35b2, the default use case has been changed to support setting a custom handler, but it's written in a way to only support MCUX and SYSTICK based platforms. For any other platform the build break because of undefined TIMER_IRQ_HANDLER and TIMER_IRQ_NUM. Fix the conditional so that the custom timer line is only entered if a custom handler is defined. The test would probably stil not run on those platforms until a custom case is defined pointing at the custom timer interrput handler, but at least it won't break CI. Also drop a closing endif comment as that clearly became misleading. Signed-off-by: Fabio Baltieri --- .../arch/arm/arm_irq_vector_table/src/arm_irq_vector_table.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/arch/arm/arm_irq_vector_table/src/arm_irq_vector_table.c b/tests/arch/arm/arm_irq_vector_table/src/arm_irq_vector_table.c index 07ff53d0934..47a1cc426d0 100644 --- a/tests/arch/arm/arm_irq_vector_table/src/arm_irq_vector_table.c +++ b/tests/arch/arm/arm_irq_vector_table/src/arm_irq_vector_table.c @@ -257,11 +257,12 @@ const vth __irq_vector_table _irq_vector_table[IRQ_VECTOR_TABLE_SIZE] = { [_ISR_OFFSET] = isr0, [_ISR_OFFSET + 1] = isr1, [_ISR_OFFSET + 2] = isr2, -#ifndef CONFIG_CORTEX_M_SYSTICK +#if defined(TIMER_IRQ_HANDLER) && !defined(CONFIG_CORTEX_M_SYSTICK) [TIMER_IRQ_NUM] = TIMER_IRQ_HANDLER, #endif }; -#endif /* CONFIG_SOC_FAMILY_NORDIC_NRF */ + +#endif /** * @}