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:
parent
7490dc21a0
commit
a5449bcbd4
@ -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) || \
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user