You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2019/05/14 20:21:56 UTC
[GitHub] [mynewt-core] utzig commented on a change in pull request #1813:
kernel/os/arch: Reset all handlers to os_default_irq_asm
utzig commented on a change in pull request #1813: kernel/os/arch: Reset all handlers to os_default_irq_asm
URL: https://github.com/apache/mynewt-core/pull/1813#discussion_r283983323
##########
File path: kernel/os/src/arch/cortex_m0/os_arch_arm.c
##########
@@ -201,22 +201,22 @@ os_arch_os_init(void)
NVIC->IP[i] = -1;
}
- NVIC_SetVector(SVC_IRQ_NUMBER, (uint32_t)SVC_Handler);
- NVIC_SetVector(PendSV_IRQn, (uint32_t)PendSV_Handler);
- NVIC_SetVector(SysTick_IRQn, (uint32_t)SysTick_Handler);
-
/*
- * Install default interrupt handler, which'll print out system
- * state at the time of the interrupt, and few other regs which
- * should help in trying to figure out what went wrong.
+ * Install default interrupt handler for all interrupts except Reset,
+ * which'll print out system state at the time of the interrupt, and
+ * few other regs which should help in trying to figure out what went
+ * wrong.
*/
- NVIC_SetVector(NonMaskableInt_IRQn, (uint32_t)os_default_irq_asm);
- NVIC_SetVector(HardFault_IRQn, (uint32_t)os_default_irq_asm);
- NVIC_SetVector(-13, (uint32_t)os_default_irq_asm); /* Hardfault */
- for (i = 0; i < NVIC_NUM_VECTORS - NVIC_USER_IRQ_OFFSET; i++) {
+ for (i = -NVIC_USER_IRQ_OFFSET + 2;
+ i < NVIC_NUM_VECTORS - NVIC_USER_IRQ_OFFSET; i++) {
NVIC_SetVector(i, (uint32_t)os_default_irq_asm);
}
+ /* Install our system interrupt handlers */
+ NVIC_SetVector(SVCall_IRQn, (uint32_t)SVC_Handler);
Review comment:
This is called `SVC_IRQn` for some STM32 families (annoying, I know!)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services