diff --git a/cpu/cc2538/cpu.c b/cpu/cc2538/cpu.c index 389fe7a0e0..f74e141ad6 100644 --- a/cpu/cc2538/cpu.c +++ b/cpu/cc2538/cpu.c @@ -34,8 +34,6 @@ #define CLOCK_STA_MASK ( OSC32K | OSC ) -extern const void *interrupt_vector[]; - static void cpu_clock_init(void); /** @@ -43,18 +41,12 @@ static void cpu_clock_init(void); */ void cpu_init(void) { - /* configure the vector table location to internal flash */ - assert((uintptr_t)&interrupt_vector % CC2538_VTOR_ALIGN == 0); - SCB->VTOR = (uintptr_t)&interrupt_vector; - + /* initialize the Cortex-M core */ + cortexm_init(); /* Enable the CC2538's more compact alternate interrupt mapping */ SYS_CTRL->I_MAP = 1; - /* initialize the clock system */ cpu_clock_init(); - - /* set pendSV interrupt to lowest possible priority */ - NVIC_SetPriority(PendSV_IRQn, 0xff); } /** diff --git a/cpu/cc2538/include/cpu_conf.h b/cpu/cc2538/include/cpu_conf.h index b02353d7fb..7b5a98532a 100644 --- a/cpu/cc2538/include/cpu_conf.h +++ b/cpu/cc2538/include/cpu_conf.h @@ -33,25 +33,12 @@ extern "C" { #endif /** - * @name Kernel configuration + * @brief ARM Cortex-M specific CPU configuration * @{ */ -#define THREAD_EXTRA_STACKSIZE_PRINTF 1024 - -#ifndef THREAD_STACKSIZE_DEFAULT -#define THREAD_STACKSIZE_DEFAULT 1024 -#endif - -#define THREAD_STACKSIZE_IDLE 512 -/** @} */ - -/** - * @name UART0 buffer size definition for compatibility reasons - * @{ - */ -#ifndef UART0_BUFSIZE -#define UART0_BUFSIZE 128 -#endif +#define CPU_DEFAULT_IRQ_PRIO (1U) +#define CPU_IRQ_NUMOF PERIPH_COUNT_IRQn +#define CPU_FLASH_BASE FLASH_BASE /** @} */ /**