1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

cpu/cortexm_common: only set naked attribute on DEVELHELP hardfault handler

Fixes error on LLVM/Clang:

   cpu/cortexm_common/vectors_cortexm.c:287:5: error: non-ASM statement in naked function is not supported
       core_panic(PANIC_HARD_FAULT, "HARD FAULT HANDLER");
       ^
   cpu/cortexm_common/include/vectors_cortexm.h:65:46: note: attribute is here
   void hard_fault_default(void) __attribute__((naked));
                                                ^
   1 error generated.
This commit is contained in:
Joakim Nohlgård 2015-10-22 08:16:25 +02:00
parent 7490dc21a0
commit a5449bcbd4
2 changed files with 2 additions and 2 deletions

View File

@ -62,7 +62,7 @@ void nmi_default(void);
* causes of hard faults are access to un-aligned pointers on Cortex-M0 CPUs
* and calls of function pointers that are set to NULL.
*/
void hard_fault_default(void) __attribute__((naked));
void hard_fault_default(void);
/* The following four exceptions are only present for Cortex-M3 and -M4 CPUs */
#if defined(CPU_ARCH_CORTEX_M3) || defined(CPU_ARCH_CORTEX_M4) || \

View File

@ -134,7 +134,7 @@ static inline int _stack_size_left(uint32_t required)
}
/* Trampoline function to save stack pointer before calling hard fault handler */
void hard_fault_default(void)
__attribute__((naked)) void hard_fault_default(void)
{
/* Get stack pointer where exception stack frame lies */
__ASM volatile