Loading...
Searching...
No Matches
vectors_cortexm.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2015 Freie Universität Berlin
3 *
4 * This file is subject to the terms and conditions of the GNU Lesser
5 * General Public License v2.1. See the file LICENSE in the top level
6 * directory for more details.
7 */
8
19#ifndef VECTORS_CORTEXM_H
20#define VECTORS_CORTEXM_H
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
26#include "cpu_conf.h"
27
32#define WEAK_DEFAULT __attribute__((weak,alias("dummy_handler")))
33
41#define ISR_VECTOR(x) __attribute__((used,section(".vectors." # x )))
42
49#define CPU_NONISR_EXCEPTIONS (15)
50
54typedef void (*isr_t)(void);
55
59typedef struct {
60 void* _estack;
63
75
83void nmi_handler(void);
84
93
94/* The following four exceptions are only present for Cortex-M3 and -M4 CPUs */
95#if defined(CPU_CORE_CORTEX_M3) || defined(CPU_CORE_CORTEX_M4) || \
96 defined(CPU_CORE_CORTEX_M4F) || defined(CPU_CORE_CORTEX_M7)
103void mem_manage_default(void);
104
110void bus_fault_default(void);
111
119void usage_fault_default(void);
120
127void debug_mon_default(void);
128#endif
129
139
140#ifdef __cplusplus
141}
142#endif
143
144#endif /* VECTORS_CORTEXM_H */
Structure of Cortex-M basic vector table.
void * _estack
exception stack pointer
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.