diff options
Diffstat (limited to 'core/cortex-m')
-rw-r--r-- | core/cortex-m/cpu.c | 4 | ||||
-rw-r--r-- | core/cortex-m/task.c | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/core/cortex-m/cpu.c b/core/cortex-m/cpu.c index 5a882bb532..adcdb4e1a3 100644 --- a/core/cortex-m/cpu.c +++ b/core/cortex-m/cpu.c @@ -15,8 +15,8 @@ void cpu_init(void) { - /* Catch divide by 0 and unaligned access */ - CPU_NVIC_CCR |= CPU_NVIC_CCR_DIV_0_TRAP | CPU_NVIC_CCR_UNALIGN_TRAP; + /* Catch divide by 0 */ + CPU_NVIC_CCR |= CPU_NVIC_CCR_DIV_0_TRAP; /* Enable reporting of memory faults, bus faults and usage faults */ CPU_NVIC_SHCSR |= CPU_NVIC_SHCSR_MEMFAULTENA | diff --git a/core/cortex-m/task.c b/core/cortex-m/task.c index 336cafc99a..f42b4f9dc0 100644 --- a/core/cortex-m/task.c +++ b/core/cortex-m/task.c @@ -301,7 +301,8 @@ void svc_handler(int desched, task_id_t resched) current = current_task; #ifdef CONFIG_DEBUG_STACK_OVERFLOW - if (*current->stack != STACK_UNUSED_VALUE) { + if (*current->stack != STACK_UNUSED_VALUE && + task_enabled(current - tasks)) { panic_printf("\n\nStack overflow in %s task!\n", task_names[current - tasks]); software_panic(PANIC_SW_STACK_OVERFLOW, current - tasks); |