Skip to content

Commit 4fbd4f5

Browse files
committed
arch: arm: fix USE_SWITCH for armclang
Fix below issues when trying to build hello world with armclang: ``` Error: L6218E: Undefined symbol z_arm_exc_exit (referred from reset.o). Error: L6218E: Undefined symbol z_arm_int_exit (referred from reset.o). Error: L6218E: Undefined symbol z_arm_pendsv (referred from reset.o). ``` Signed-off-by: Sudan Landge <sudan.landge@arm.com>
1 parent 0f972d4 commit 4fbd4f5

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

‎arch/arm/core/cortex_m/vector_table.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ GTEXT(z_arm_debug_monitor)
4747
#else
4848
#error Unknown ARM architecture
4949
#endif /* CONFIG_ARMV6_M_ARMV8_M_BASELINE */
50+
#ifndef CONFIG_USE_SWITCH
5051
GTEXT(z_arm_pendsv)
52+
#endif
5153
GTEXT(z_arm_exc_spurious)
5254

5355
GTEXT(z_prep_c)

‎include/zephyr/arch/arm/cortex_m/exception.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@
6060
#define _EXC_PENDSV_PRIO_MASK Z_EXC_PRIO(_EXC_PENDSV_PRIO)
6161

6262
#ifdef _ASMLANGUAGE
63+
#ifndef CONFIG_USE_SWITCH
6364
GTEXT(z_arm_exc_exit);
65+
#endif
6466
#else
6567
#include <zephyr/types.h>
6668

‎include/zephyr/arch/arm/irq.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ extern "C" {
3737
#define arch_irq_disable arm_irq_disable
3838
#define arch_irq_is_enabled arm_irq_is_enabled
3939
#endif
40+
#ifndef CONFIG_USE_SWITCH
4041
GTEXT(z_arm_int_exit);
42+
#endif
4143
GTEXT(arch_irq_enable)
4244
GTEXT(arch_irq_disable)
4345
GTEXT(arch_irq_is_enabled)

0 commit comments

Comments
 (0)