diff options
-rw-r--r-- | os/ports/GCC/ARM7/port.dox | 17 | ||||
-rw-r--r-- | readme.txt | 2 |
2 files changed, 18 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
*/
diff --git a/readme.txt b/readme.txt index cc91a5696..c2589db51 100644 --- a/readme.txt +++ b/readme.txt @@ -90,6 +90,8 @@ - NEW: Added a generic BaseFileStream interface for future File System
implementations or integrations (untested and not sure if it will stay or
change).
+- NEW: Added to the documentation more notes about interrupt handlers in
+ the ARM7 port.
- OPT: Speed optimizations of the STM32 SPI driver, improved latency.
- OPT: Speed optimizations of the STM32 ADC driver.
- CHANGE: Added a parameter to the UART driver callbacks, the pointer to the
|