From 8554591518c93a3da8a182527e0d37772b5304b0 Mon Sep 17 00:00:00 2001 From: Neil Chen Date: Mon, 5 Aug 2024 10:52:38 +0800 Subject: [PATCH] devices: MCXxxx: Update system file to remove SDK sepecific defines __Vectors is not defined in non-SDK projects such as Zephyr which like to call SystemInit function. This causes build failures as a result. Signed-off-by: Neil Chen --- mcux/mcux-sdk/devices/MCXA156/system_MCXA156.c | 7 ------- mcux/mcux-sdk/devices/MCXN236/system_MCXN236.c | 8 -------- mcux/mcux-sdk/devices/MCXN947/system_MCXN947_cm33_core0.c | 7 ------- mcux/mcux-sdk/devices/MCXN947/system_MCXN947_cm33_core1.c | 7 ------- 4 files changed, 29 deletions(-) diff --git a/mcux/mcux-sdk/devices/MCXA156/system_MCXA156.c b/mcux/mcux-sdk/devices/MCXA156/system_MCXA156.c index 95d57e74b..52c2daacb 100644 --- a/mcux/mcux-sdk/devices/MCXA156/system_MCXA156.c +++ b/mcux/mcux-sdk/devices/MCXA156/system_MCXA156.c @@ -75,13 +75,6 @@ __attribute__ ((weak)) void SystemInit (void) { SCB->NSACR |= ((3UL << 0) | (3UL << 10)); /* enable CP0, CP1, CP10, CP11 Non-secure Access */ -#if defined(__MCUXPRESSO) - extern void(*const g_pfnVectors[]) (void); - SCB->VTOR = (uint32_t) &g_pfnVectors; -#else - extern void *__Vectors; - SCB->VTOR = (uint32_t) &__Vectors; -#endif /* Enable the LPCAC */ SYSCON->LPCAC_CTRL |= SYSCON_LPCAC_CTRL_LPCAC_MEM_REQ_MASK; SYSCON->LPCAC_CTRL &= ~SYSCON_LPCAC_CTRL_DIS_LPCAC_MASK; diff --git a/mcux/mcux-sdk/devices/MCXN236/system_MCXN236.c b/mcux/mcux-sdk/devices/MCXN236/system_MCXN236.c index 11c0ff20f..1315cef98 100644 --- a/mcux/mcux-sdk/devices/MCXN236/system_MCXN236.c +++ b/mcux/mcux-sdk/devices/MCXN236/system_MCXN236.c @@ -80,14 +80,6 @@ __attribute__ ((weak)) void SystemInit (void) { SYSCON->NVM_CTRL &= ~SYSCON_NVM_CTRL_DIS_MBECC_ERR_DATA_MASK; /* enables bus error on multi-bit ECC error for data */ -#if defined(__MCUXPRESSO) - extern void(*const g_pfnVectors[]) (void); - SCB->VTOR = (uint32_t) &g_pfnVectors; -#else - extern void *__Vectors; - SCB->VTOR = (uint32_t) &__Vectors; -#endif - /* enable the flash cache LPCAC */ SYSCON->LPCAC_CTRL &= ~SYSCON_LPCAC_CTRL_DIS_LPCAC_MASK; diff --git a/mcux/mcux-sdk/devices/MCXN947/system_MCXN947_cm33_core0.c b/mcux/mcux-sdk/devices/MCXN947/system_MCXN947_cm33_core0.c index 9a52dd277..cdf2318fc 100644 --- a/mcux/mcux-sdk/devices/MCXN947/system_MCXN947_cm33_core0.c +++ b/mcux/mcux-sdk/devices/MCXN947/system_MCXN947_cm33_core0.c @@ -83,13 +83,6 @@ __attribute__ ((weak)) void SystemInit (void) { SYSCON->NVM_CTRL &= ~SYSCON_NVM_CTRL_DIS_MBECC_ERR_DATA_MASK; /* enables bus error on multi-bit ECC error for data */ -#if defined(__MCUXPRESSO) - extern void(*const g_pfnVectors[]) (void); - SCB->VTOR = (uint32_t) &g_pfnVectors; -#else - extern void *__Vectors; - SCB->VTOR = (uint32_t) &__Vectors; -#endif /* enable the flash cache LPCAC */ SYSCON->LPCAC_CTRL &= ~SYSCON_LPCAC_CTRL_DIS_LPCAC_MASK; diff --git a/mcux/mcux-sdk/devices/MCXN947/system_MCXN947_cm33_core1.c b/mcux/mcux-sdk/devices/MCXN947/system_MCXN947_cm33_core1.c index ff9f3ae73..9af06585a 100644 --- a/mcux/mcux-sdk/devices/MCXN947/system_MCXN947_cm33_core1.c +++ b/mcux/mcux-sdk/devices/MCXN947/system_MCXN947_cm33_core1.c @@ -77,13 +77,6 @@ __attribute__ ((weak)) void SystemInit (void) { SYSCON->NVM_CTRL &= ~SYSCON_NVM_CTRL_DIS_MBECC_ERR_DATA_MASK; /* enables bus error on multi-bit ECC error for data */ -#if defined(__MCUXPRESSO) - extern void(*const g_pfnVectors[]) (void); - SCB->VTOR = (uint32_t) &g_pfnVectors; -#else - extern void *__Vectors; - SCB->VTOR = (uint32_t) &__Vectors; -#endif /* enable the flash cache LPCAC */ SYSCON->LPCAC_CTRL &= ~SYSCON_LPCAC_CTRL_DIS_LPCAC_MASK;