SysTick_Config() tries to set the systick priority to max. Comment out this line since arch/arm/arm-m/arch.c sets the priority to medium to compete with the rest of the exceptions in the system. Also include lk/compiler.h to avoid redundant cmsis macros.