diff options
author | keepkeyjon <jon@keepkey.com> | 2018-03-07 17:53:11 +0300 |
---|---|---|
committer | Karl Palsson <karlp@tweak.net.au> | 2018-07-29 23:31:17 +0300 |
commit | f53e12d2da3f9730dd842bdf7d1e680cb5877a15 (patch) | |
tree | 1643bf30ece6d1868ea8fcaf76baea0a3a8e9f0d | |
parent | f2589bc7d861f4e9ccbf80ee1228e34cfc6f3511 (diff) |
cm3: Only inline asm is allowed in naked functions
According to: https://gcc.gnu.org/onlinedocs/gcc-6.2.0/gcc/ARM-Function-Attributes.html
"Only basic asm statements can safely be included in naked functions (see Basic
Asm). While using extended asm or a mixture of basic asm and C code may appear
to work, they cannot be depended upon to work reliably and are not supported."
-rw-r--r-- | include/libopencm3/cm3/scb.h | 4 | ||||
-rw-r--r-- | lib/cm3/vector.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/include/libopencm3/cm3/scb.h b/include/libopencm3/cm3/scb.h index 416ff963..8c2465da 100644 --- a/include/libopencm3/cm3/scb.h +++ b/include/libopencm3/cm3/scb.h @@ -437,11 +437,11 @@ struct scb_exception_stack_frame { : [frameptr]"=r" (f)); \ } while (0) -void scb_reset_system(void) __attribute__((noreturn, naked)); +void scb_reset_system(void) __attribute__((noreturn)); /* Those defined only on ARMv7 and above */ #if defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__) -void scb_reset_core(void) __attribute__((noreturn, naked)); +void scb_reset_core(void) __attribute__((noreturn)); void scb_set_priority_grouping(uint32_t prigroup); #endif diff --git a/lib/cm3/vector.c b/lib/cm3/vector.c index 97217787..af92ed72 100644 --- a/lib/cm3/vector.c +++ b/lib/cm3/vector.c @@ -59,7 +59,7 @@ vector_table_t vector_table = { } }; -void __attribute__ ((weak, naked)) reset_handler(void) +void __attribute__ ((weak)) reset_handler(void) { volatile unsigned *src, *dest; funcp_t *fp; |