From a03d3b88ad81117230a0fbf63bbc1a7d46b0606e Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sat, 16 Oct 2010 17:29:04 +0000 Subject: [PATCH] git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/stable_2.0.x@2263 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/ports/GCC/ARM7/port.dox | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/os/ports/GCC/ARM7/port.dox b/os/ports/GCC/ARM7/port.dox index d77cf6031..e85ffe7a1 100644 --- a/os/ports/GCC/ARM7/port.dox +++ b/os/ports/GCC/ARM7/port.dox @@ -123,7 +123,22 @@ * have interrupt handlers compiled in thumb mode without have to use an * interworking mode (the mode switch is hidden in the macros), this * greatly improves code efficiency and size. You can look at the serial - * driver for real examples of interrupt handlers. + * driver for real examples of interrupt handlers.
+ * It is important that the serve_interrupt() interrupt function is not + * inlined by the compiler into the ISR or the code could still modify + * the unsaved registers, this can be accomplished using GCC by adding + * the attribute "noinline" to the function: + * @code + * #if defined(__GNUC__) + * __attribute__((noinline)) + * #endif + * static void serve_interrupt(void) { + * } + * @endcode + * Note that several commercial compilers support a GNU-like functions + * attribute mechanism.
+ * Alternative ways are to use an appropriate pragma directive or disable + * inlining optimizations in the modules containing the interrupt handlers. * * @ingroup ports */