Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to define reserved fields in CortexM vector table. #13851

Merged
merged 1 commit into from Apr 14, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 17 additions & 1 deletion cpu/cortexm_common/vectors_cortexm.c
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