aboutsummaryrefslogtreecommitdiffstats
path: root/os/ports
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-08-27 08:03:53 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-08-27 08:03:53 +0000
commitf58963c966bfd71eb7cf55daecb691b39f6f91cd (patch)
treed0789581a2e8c3a88eeaf49f882c47a3fe6460a2 /os/ports
parent138c0f900d823b2c953038048bc40b14610f958a (diff)
downloadChibiOS-f58963c966bfd71eb7cf55daecb691b39f6f91cd.tar.gz
ChibiOS-f58963c966bfd71eb7cf55daecb691b39f6f91cd.tar.bz2
ChibiOS-f58963c966bfd71eb7cf55daecb691b39f6f91cd.zip
Added ARM7 ISRs notes to the documentation.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2137 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/ports')
-rw-r--r--os/ports/GCC/ARM7/port.dox17
1 files changed, 16 insertions, 1 deletions
diff --git a/os/ports/GCC/ARM7/port.dox b/os/ports/GCC/ARM7/port.dox
index b70d230e7..afe419db7 100644
--- a/os/ports/GCC/ARM7/port.dox
+++ b/os/ports/GCC/ARM7/port.dox
@@ -115,7 +115,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.<br>
+ * 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(__GNU__)
+ * __attribute__((noinline))
+ * #endif
+ * static void serve_interrupt(void) {
+ * }
+ * @endcode
+ * Note that several commercial compilers support a GNU-like functions
+ * attribute mechanism.<br>
+ * Alternative ways are to use an appropriate #pragma directive or disable
+ * inlining optimizations in the modules containing the interrupt handlers.
*
* @ingroup gcc
*/