diff --git a/cpu/cortexm_common/vectors_cortexm.c b/cpu/cortexm_common/vectors_cortexm.c index f70419bc648a..6a2c6e1af81a 100644 --- a/cpu/cortexm_common/vectors_cortexm.c +++ b/cpu/cortexm_common/vectors_cortexm.c @@ -197,12 +197,15 @@ void reset_handler_default(void) dbgpin_init(); #endif +#ifndef DISABLE_CPU_INIT /* initialize the CPU */ extern void cpu_init(void); cpu_init(); - - /* initialize the board (which also initiates CPU initialization) */ +#endif +#ifndef DISABLE_BOARD_INIT + /* initialize the board */ board_init(); +#endif #if MODULE_NEWLIB || MODULE_PICOLIBC /* initialize std-c library (this must be done after board_init) */