1 /****************************************************************************
2 * core/fault_handlers.c
5 * Copyright 2012 Nathael Pajani <nathael.pajani@ed3l.fr>
7 * Example code from frozeneskimo.com :
8 * http://dev.frozeneskimo.com/notes/getting_started_with_cortex_m3_cmsis_and_gnu_tools
10 * This program is free software: you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation, either version 3 of the License, or
13 * (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program. If not, see <http://www.gnu.org/licenses/>.
23 *****************************************************************************/
25 #include "core/lpc_regs_11u3x.h"
27 void fault_info(const char* name, uint32_t len) __attribute__ ((weak, alias ("Dummy_Fault_Handler")));
29 void Dummy_Fault_Handler(const char* name, uint32_t len) {
33 /* Cortex M0 core interrupt handlers */
34 void NMI_Handler(void)
36 fault_info(__FUNCTION__, sizeof(__FUNCTION__));
38 void HardFault_Handler(void)
40 fault_info(__FUNCTION__, sizeof(__FUNCTION__));
42 void SVC_Handler(void)
44 fault_info(__FUNCTION__, sizeof(__FUNCTION__));
46 void PendSV_Handler(void)
48 fault_info(__FUNCTION__, sizeof(__FUNCTION__));