Skip to content

Commit

Permalink
devices: MCXxxx: Update system file to remove SDK sepecific defines
Browse files Browse the repository at this point in the history
__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 <cheng.chen_1@nxp.com>
  • Loading branch information
NeilChen93 committed Aug 5, 2024
1 parent 9f9de73 commit 8554591
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 29 deletions.
7 changes: 0 additions & 7 deletions mcux/mcux-sdk/devices/MCXA156/system_MCXA156.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
8 changes: 0 additions & 8 deletions mcux/mcux-sdk/devices/MCXN236/system_MCXN236.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
7 changes: 0 additions & 7 deletions mcux/mcux-sdk/devices/MCXN947/system_MCXN947_cm33_core0.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
7 changes: 0 additions & 7 deletions mcux/mcux-sdk/devices/MCXN947/system_MCXN947_cm33_core1.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 8554591

Please sign in to comment.