Loading...
Searching...
No Matches
vectors_cortexm.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2015 Freie Universität Berlin
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
17
18#ifdef __cplusplus
19extern "C" {
20#endif
21
22#include "cpu_conf.h"
23
28#define WEAK_DEFAULT __attribute__((weak,alias("dummy_handler")))
29
37#define ISR_VECTOR(x) __attribute__((used,section(".vectors." # x )))
38
45#define CPU_NONISR_EXCEPTIONS (15)
46
50typedef void (*isr_t)(void);
51
59
71
79void nmi_handler(void);
80
89
90/* The following four exceptions are only present for Cortex-M3 and -M4 CPUs */
91#if defined(CPU_CORE_CORTEX_M3) || defined(CPU_CORE_CORTEX_M4) || \
92 defined(CPU_CORE_CORTEX_M4F) || defined(CPU_CORE_CORTEX_M7)
99void mem_manage_default(void);
100
106void bus_fault_default(void);
107
115void usage_fault_default(void);
116
123void debug_mon_default(void);
124#endif
125
135
136#ifdef __cplusplus
137}
138#endif
139
Structure of Cortex-M basic vector table.
void * _estack
exception stack pointer
isr_t vectors[CPU_NONISR_EXCEPTIONS]
shared Cortex-M vectors
void hard_fault_default(void)
Hard fault exception handler.
void(* isr_t)(void)
All ISR functions have this type.
void reset_handler_default(void)
This function is the default entry point after a system reset.
void nmi_handler(void)
Non-maskable interrupt handler.
#define CPU_NONISR_EXCEPTIONS
Number of Cortex-M non-ISR exceptions.
void dummy_handler_default(void)
Default handler used as weak alias for not implemented ISR vectors.