Skip to content

Commit 7a96008

Browse files
committed
soc/nxp: Update SOC-specific vector tables for PendSV removal
The z_arm_pendsv vector doesn't exist on USE_SWITCH=y builds Signed-off-by: Andy Ross <[email protected]>
1 parent 1568e5d commit 7a96008

File tree

3 files changed

+21
-3
lines changed

3 files changed

+21
-3
lines changed

soc/nxp/imxrt/imxrt5xx/cm33/soc.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,12 @@ extern void z_arm_pendsv(void);
9999
extern void sys_clock_isr(void);
100100
extern void z_arm_exc_spurious(void);
101101

102+
#ifdef CONFIG_USE_SWITCH
103+
#define PENDSV_VEC z_arm_exc_spurious
104+
#else
105+
#define PENDSV_VEC z_arm_pendsv
106+
#endif
107+
102108
__imx_boot_ivt_section void (*const image_vector_table[])(void) = {
103109
(void (*)())(z_main_stack + CONFIG_MAIN_STACK_SIZE), /* 0x00 */
104110
z_arm_reset, /* 0x04 */
@@ -118,7 +124,7 @@ __imx_boot_ivt_section void (*const image_vector_table[])(void) = {
118124
z_arm_svc, /* 0x2C */
119125
z_arm_debug_monitor, /* 0x30 */
120126
(void (*)())image_vector_table, /* 0x34, imageLoadAddress. */
121-
z_arm_pendsv, /* 0x38 */
127+
PENDSV_VEC, /* 0x38 */
122128
#if defined(CONFIG_SYS_CLOCK_EXISTS) && defined(CONFIG_CORTEX_M_SYSTICK_INSTALL_ISR)
123129
sys_clock_isr, /* 0x3C */
124130
#else

soc/nxp/imxrt/imxrt6xx/cm33/soc.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,12 @@ extern void z_arm_pendsv(void);
9393
extern void sys_clock_isr(void);
9494
extern void z_arm_exc_spurious(void);
9595

96+
#ifdef CONFIG_USE_SWITCH
97+
#define PENDSV_VEC z_arm_exc_spurious
98+
#else
99+
#define PENDSV_VEC z_arm_pendsv
100+
#endif
101+
96102
__imx_boot_ivt_section void (*const image_vector_table[])(void) = {
97103
(void (*)())(z_main_stack + CONFIG_MAIN_STACK_SIZE), /* 0x00 */
98104
z_arm_reset, /* 0x04 */
@@ -112,7 +118,7 @@ __imx_boot_ivt_section void (*const image_vector_table[])(void) = {
112118
z_arm_svc, /* 0x2C */
113119
z_arm_debug_monitor, /* 0x30 */
114120
(void (*)())image_vector_table, /* 0x34, imageLoadAddress. */
115-
z_arm_pendsv, /* 0x38 */
121+
PENDSV_VEC, /* 0x38 */
116122
#if defined(CONFIG_SYS_CLOCK_EXISTS) && defined(CONFIG_CORTEX_M_SYSTICK_INSTALL_ISR)
117123
sys_clock_isr, /* 0x3C */
118124
#else

soc/nxp/rw/soc.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@ extern void z_arm_pendsv(void);
3939
extern void sys_clock_isr(void);
4040
extern void z_arm_exc_spurious(void);
4141

42+
#ifdef CONFIG_USE_SWITCH
43+
#define PENDSV_VEC z_arm_exc_spurious
44+
#else
45+
#define PENDSV_VEC z_arm_pendsv
46+
#endif
47+
4248
__imx_boot_ivt_section void (*const image_vector_table[])(void) = {
4349
(void (*)())(z_main_stack + CONFIG_MAIN_STACK_SIZE), /* 0x00 */
4450
z_arm_reset, /* 0x04 */
@@ -58,7 +64,7 @@ __imx_boot_ivt_section void (*const image_vector_table[])(void) = {
5864
z_arm_svc, /* 0x2C */
5965
z_arm_debug_monitor, /* 0x30 */
6066
(void (*)())image_vector_table, /* 0x34, imageLoadAddress. */
61-
z_arm_pendsv, /* 0x38 */
67+
PENDSV_VEC, /* 0x38 */
6268
#if defined(CONFIG_SYS_CLOCK_EXISTS) && defined(CONFIG_CORTEX_M_SYSTICK_INSTALL_ISR)
6369
sys_clock_isr, /* 0x3C */
6470
#else

0 commit comments

Comments
 (0)