aboutsummaryrefslogtreecommitdiffstats
path: root/os
diff options
context:
space:
mode:
Diffstat (limited to 'os')
-rw-r--r--os/ports/GCC/ARM7/port.dox7
-rw-r--r--os/ports/GCC/ARMCMx/port.dox5
-rw-r--r--os/ports/GCC/AVR/port.dox7
-rw-r--r--os/ports/GCC/MSP430/port.dox7
-rw-r--r--os/ports/GCC/PPC/port.dox7
-rw-r--r--os/ports/RC/STM8/chcore.h23
6 files changed, 47 insertions, 9 deletions
diff --git a/os/ports/GCC/ARM7/port.dox b/os/ports/GCC/ARM7/port.dox
index e3271fffa..7f61bbf63 100644
--- a/os/ports/GCC/ARM7/port.dox
+++ b/os/ports/GCC/ARM7/port.dox
@@ -125,8 +125,8 @@
* @defgroup ARM7_CONF Configuration Options
* @brief ARM7 specific configuration options.
* @details The ARM7 port allows some architecture-specific configurations
- * settings that can be specified externally, as example on the compiler
- * command line:
+ * settings that can be overridden by redefining them in @p chconf.h.
+ * Usually there is no need to change the default values.
* - @p INT_REQUIRED_STACK, this value represent the amount of stack space used
* by an interrupt handler between the @p extctx and @p intctx
* structures.<br>
@@ -138,6 +138,9 @@
* can trim this down by defining the macro externally. This would save
* some valuable RAM space for each thread present in the system.<br>
* The default value is set into <b>./os/ports/GCC/ARM7/chcore.h</b>.
+ * - @p IDLE_THREAD_STACK_SIZE, stack area size to be assigned to the IDLE
+ * thread. Usually there is no need to change this value unless inserting
+ * code in the IDLE thread hook macro.
* .
* @ingroup ARM7
*/
diff --git a/os/ports/GCC/ARMCMx/port.dox b/os/ports/GCC/ARMCMx/port.dox
index 39840fe44..5cef7ea98 100644
--- a/os/ports/GCC/ARMCMx/port.dox
+++ b/os/ports/GCC/ARMCMx/port.dox
@@ -110,13 +110,16 @@
* @brief ARM Cortex-Mx Configuration Options.
* @details The ARMCMx port allows some architecture-specific configurations
* settings that can be overridden by redefining them in @p chconf.h.
-* Usually there is no need to change the default values.
+ * Usually there is no need to change the default values.
* - @p INT_REQUIRED_STACK, this value represent the amount of stack space used
* by an interrupt handler between the @p extctx and @p intctx
* structures.<br>
* In the current implementation this value is guaranteed to be zero so
* there is no need to modify this value unless changes are done at the
* interrupts handling code.
+ * - @p IDLE_THREAD_STACK_SIZE, stack area size to be assigned to the IDLE
+ * thread. Usually there is no need to change this value unless inserting
+ * code in the IDLE thread hook macro.
* - @p CORTEX_BASEPRI_KERNEL, this is the @p BASEPRI value for the kernel lock
* code. Code running at higher priority levels must not invoke any OS API.
* This setting is specific to the ARMv7-M architecture.
diff --git a/os/ports/GCC/AVR/port.dox b/os/ports/GCC/AVR/port.dox
index 508315656..512d7f2e5 100644
--- a/os/ports/GCC/AVR/port.dox
+++ b/os/ports/GCC/AVR/port.dox
@@ -57,13 +57,16 @@
* @defgroup AVR_CONF Configuration Options
* @brief AVR Configuration Options.
* @details The AVR port allows some architecture-specific configurations
- * settingsthat can be specified externally, as example on the compiler
- * command line:
+ * settings that can be overridden by redefining them in @p chconf.h.
+ * Usually there is no need to change the default values.
* - @p INT_REQUIRED_STACK, this value represent the amount of stack space
* used by the interrupt handlers.<br>
* The default for this value is @p 32, this space is allocated for each
* thread so be careful in order to not waste precious RAM space.<br>
* The default value is set into <b>./os/ports/GCC/AVR/chcore.h</b>.
+ * - @p IDLE_THREAD_STACK_SIZE, stack area size to be assigned to the IDLE
+ * thread. Usually there is no need to change this value unless inserting
+ * code in the IDLE thread hook macro.
* .
* @ingroup AVR
*/
diff --git a/os/ports/GCC/MSP430/port.dox b/os/ports/GCC/MSP430/port.dox
index 09cff8a03..c68ac48bc 100644
--- a/os/ports/GCC/MSP430/port.dox
+++ b/os/ports/GCC/MSP430/port.dox
@@ -63,13 +63,16 @@
* @defgroup MSP430_CONF Configuration Options
* @brief MSP430 Configuration Options.
* @details The MSP430 port allows some architecture-specific configurations
- * settings that can be specified externally, as example on the compiler
- * command line:
+ * settings that can be overridden by redefining them in @p chconf.h.
+ * Usually there is no need to change the default values.
* - @p INT_REQUIRED_STACK, this value represent the amount of stack space
* used by the interrupt handlers.<br>
* The default for this value is @p 32, this space is allocated for each
* thread so be careful in order to not waste precious RAM space.<br>
* The default value is set into <b>./os/ports/GCC/MSP430/chcore.h</b>.
+ * - @p IDLE_THREAD_STACK_SIZE, stack area size to be assigned to the IDLE
+ * thread. Usually there is no need to change this value unless inserting
+ * code in the IDLE thread hook macro.
* .
* @ingroup MSP430
*/
diff --git a/os/ports/GCC/PPC/port.dox b/os/ports/GCC/PPC/port.dox
index cc09f3f82..e020387f9 100644
--- a/os/ports/GCC/PPC/port.dox
+++ b/os/ports/GCC/PPC/port.dox
@@ -60,14 +60,17 @@
* @defgroup PPC_CONF Configuration Options
* @brief PowerPC Configuration Options.
* @details The PowerPC port allows some architecture-specific configurations
- * settings that can be specified externally, as example on the compiler
- * command line:
+ * settings that can be overridden by redefining them in @p chconf.h.
+ * Usually there is no need to change the default values.
* - @p INT_REQUIRED_STACK, this value represent the amount of stack space used
* by an interrupt handler between the @p extctx and @p intctx
* structures.
* The default for this value is @p 128 bytes, this space is allocated for
* each thread so be careful in order to not waste precious RAM space.<br>
* The default value is set into <b>./os/ports/GCC/PPC/chcore.h</b>.
+ * - @p IDLE_THREAD_STACK_SIZE, stack area size to be assigned to the IDLE
+ * thread. Usually there is no need to change this value unless inserting
+ * code in the IDLE thread hook macro.
* - @p ENABLE_WFI_IDLE, if set to @p TRUE enables the use of the @p <b>wait</b>
* instruction from within the idle loop. This is defaulted to 0 because
* it can create problems with some debuggers. Setting this option to 1
diff --git a/os/ports/RC/STM8/chcore.h b/os/ports/RC/STM8/chcore.h
index c4f490edc..bc6d43971 100644
--- a/os/ports/RC/STM8/chcore.h
+++ b/os/ports/RC/STM8/chcore.h
@@ -30,6 +30,21 @@
#include <intrins.h>
+/*===========================================================================*/
+/* Port configurable parameters. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables the use of the WFI instruction in the idle thread loop.
+ */
+#ifndef STM8_ENABLE_WFI_IDLE
+#define STM8_ENABLE_WFI_IDLE FALSE
+#endif
+
+/*===========================================================================*/
+/* Port exported info. */
+/*===========================================================================*/
+
/**
* @brief Unique macro for the implemented architecture.
*/
@@ -40,6 +55,10 @@
*/
#define CH_ARCHITECTURE_NAME "STM8"
+/*===========================================================================*/
+/* Port implementation part. */
+/*===========================================================================*/
+
/**
* @brief Base type for stack alignment.
* @note No alignment constraints so uint8_t.
@@ -250,7 +269,11 @@ struct stm8_startctx {
* @brief Enters an architecture-dependent halt mode.
* @note Implemented with the specific "wfi" instruction.
*/
+#if STM8_ENABLE_WFI_IDLE || defined(__DOXYGEN__)
#define port_wait_for_interrupt() _wfi_()
+#else
+#define port_wait_for_interrupt()
+#endif
/**
* @brief Performs a context switch between two threads.