Skip to content

Commit

Permalink
Merge pull request RIOT-OS#13851 from iosabi/vectors_cortexm
Browse files Browse the repository at this point in the history
Allow to define reserved fields in CortexM vector table.
  • Loading branch information
benpicco authored Apr 14, 2020
2 parents 83df1d1 + 7e7b6e1 commit b9fda56
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion cpu/cortexm_common/vectors_cortexm.c
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,9 @@ __attribute__((weak,alias("dummy_handler_default"))) void isr_svc(void);
__attribute__((weak,alias("dummy_handler_default"))) void isr_pendsv(void);
__attribute__((weak,alias("dummy_handler_default"))) void isr_systick(void);

/* define Cortex-M base interrupt vectors */
/* define Cortex-M base interrupt vectors
* IRQ entries -9 to -6 inclusive (offsets 0x1c to 0x2c of cortexm_base_t)
* are reserved entries. */
ISR_VECTOR(0) const cortexm_base_t cortex_vector_base = {
&_estack,
{
Expand All @@ -472,6 +474,20 @@ ISR_VECTOR(0) const cortexm_base_t cortex_vector_base = {
/* [-1] SysTick interrupt, not used in RIOT */
[14] = isr_systick,

/* -9 to -6 reserved entries can be defined by the cpu module */
#ifdef CORTEXM_VECTOR_RESERVED_0X1C
[6] = (isr_t)(CORTEXM_VECTOR_RESERVED_0X1C),
#endif /* CORTEXM_VECTOR_RESERVED_0X1C */
#ifdef CORTEXM_VECTOR_RESERVED_0X20
[7] = (isr_t)(CORTEXM_VECTOR_RESERVED_0X20),
#endif /* CORTEXM_VECTOR_RESERVED_0X20 */
#ifdef CORTEXM_VECTOR_RESERVED_0X24
[8] = (isr_t)(CORTEXM_VECTOR_RESERVED_0X24),
#endif /* CORTEXM_VECTOR_RESERVED_0X24 */
#ifdef CORTEXM_VECTOR_RESERVED_0X28
[9] = (isr_t)(CORTEXM_VECTOR_RESERVED_0X28),
#endif /* CORTEXM_VECTOR_RESERVED_0X28 */

/* additional vectors used by M3, M4(F), and M7 */
#if defined(CPU_ARCH_CORTEX_M3) || defined(CPU_ARCH_CORTEX_M4) || \
defined(CPU_ARCH_CORTEX_M4F) || defined(CPU_ARCH_CORTEX_M7)
Expand Down

0 comments on commit b9fda56

Please sign in to comment.