Addition cleanup after last switch from BASEPRI to PRIMASK for Cortex-M0
This commit is contained in:
parent
a8004f9e07
commit
6f6c6e3a55
@ -90,18 +90,14 @@
|
|||||||
|
|
||||||
int up_hardfault(int irq, FAR void *context)
|
int up_hardfault(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
#if defined(CONFIG_DEBUG_HARDFAULT) || !defined(CONFIG_ARMV7M_USEBASEPRI)
|
|
||||||
uint32_t *regs = (uint32_t*)context;
|
uint32_t *regs = (uint32_t*)context;
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Get the value of the program counter where the fault occurred */
|
/* Get the value of the program counter where the fault occurred */
|
||||||
|
|
||||||
#ifndef CONFIG_ARMV7M_USEBASEPRI
|
|
||||||
uint16_t *pc = (uint16_t*)regs[REG_PC] - 1;
|
uint16_t *pc = (uint16_t*)regs[REG_PC] - 1;
|
||||||
|
|
||||||
/* Check if the pc lies in known FLASH memory.
|
/* Check if the pc lies in known FLASH memory.
|
||||||
* REVISIT: What if the PC lies in "unknown" external memory? Best
|
* REVISIT: What if the PC lies in "unknown" external memory?
|
||||||
* use the BASEPRI register if you have external memory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef CONFIG_NUTTX_KERNEL
|
#ifdef CONFIG_NUTTX_KERNEL
|
||||||
@ -135,7 +131,6 @@ int up_hardfault(int irq, FAR void *context)
|
|||||||
return up_svcall(irq, context);
|
return up_svcall(irq, context);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_DEBUG_HARDFAULT)
|
#if defined(CONFIG_DEBUG_HARDFAULT)
|
||||||
/* Dump some hard fault info */
|
/* Dump some hard fault info */
|
||||||
|
@ -230,12 +230,6 @@ void up_irqinitialize(void)
|
|||||||
irq_attach(KL_IRQ_SVCALL, up_svcall);
|
irq_attach(KL_IRQ_SVCALL, up_svcall);
|
||||||
irq_attach(KL_IRQ_HARDFAULT, up_hardfault);
|
irq_attach(KL_IRQ_HARDFAULT, up_hardfault);
|
||||||
|
|
||||||
/* Set the priority of the SVCall interrupt */
|
|
||||||
|
|
||||||
#ifdef CONFIG_ARCH_IRQPRIO
|
|
||||||
/* up_prioritize_irq(KL_IRQ_PENDSV, NVIC_SYSH_PRIORITY_MIN); */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Attach all other processor exceptions (except reset and sys tick) */
|
/* Attach all other processor exceptions (except reset and sys tick) */
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG
|
#ifdef CONFIG_DEBUG
|
||||||
|
@ -230,12 +230,6 @@ void up_irqinitialize(void)
|
|||||||
irq_attach(NUC_IRQ_SVCALL, up_svcall);
|
irq_attach(NUC_IRQ_SVCALL, up_svcall);
|
||||||
irq_attach(NUC_IRQ_HARDFAULT, up_hardfault);
|
irq_attach(NUC_IRQ_HARDFAULT, up_hardfault);
|
||||||
|
|
||||||
/* Set the priority of the SVCall interrupt */
|
|
||||||
|
|
||||||
#ifdef CONFIG_ARCH_IRQPRIO
|
|
||||||
/* up_prioritize_irq(NUC_IRQ_PENDSV, NVIC_SYSH_PRIORITY_MIN); */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Attach all other processor exceptions (except reset and sys tick) */
|
/* Attach all other processor exceptions (except reset and sys tick) */
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG
|
#ifdef CONFIG_DEBUG
|
||||||
|
Loading…
Reference in New Issue
Block a user