From d54e8eb64d3a79872e55dc246f4adc85d476144f Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sat, 5 Jun 2010 10:11:06 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2005 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/ports/GCC/ARM7/port.dox | 7 +++++-- os/ports/GCC/ARMCMx/port.dox | 5 ++++- os/ports/GCC/AVR/port.dox | 7 +++++-- os/ports/GCC/MSP430/port.dox | 7 +++++-- os/ports/GCC/PPC/port.dox | 7 +++++-- os/ports/RC/STM8/chcore.h | 23 +++++++++++++++++++++++ readme.txt | 4 +++- 7 files changed, 50 insertions(+), 10 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.
@@ -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.
* The default value is set into ./os/ports/GCC/ARM7/chcore.h. + * - @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.
* 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.
* 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.
* The default value is set into ./os/ports/GCC/AVR/chcore.h. + * - @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.
* 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.
* The default value is set into ./os/ports/GCC/MSP430/chcore.h. + * - @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.
* The default value is set into ./os/ports/GCC/PPC/chcore.h. + * - @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 wait * 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 +/*===========================================================================*/ +/* 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. diff --git a/readme.txt b/readme.txt index f49689c30..9f48123cb 100644 --- a/readme.txt +++ b/readme.txt @@ -61,13 +61,15 @@ *** 1.5.9 *** - FIX: Fixed STM8 baud rate setup error (bug 3010990). - FIX: Fixed STM8 UART3 driver (bug 3009145). +- NEW: Added a STM8_ENABLE_WFI_IDLE option to the STM8 port, the default + is FALSE. - OPT: Small size optimization in the semaphores subsystem. - OPT: Improvements in the STM8 port, the code is now smaller and generally faster, also saved few bytes of RAM. - Added explicit casts in chevents.h, chqueues.h, chqueues.c in order to silence some warnings on a specific compiler. - Added a section in chconf.h where redefine the port-related configuration - parameters, also added a note to the configuration about this. + parameters, also added notes into the documentation about this. *** 1.5.8 *** - FIX: Fixed missing files from ST library zip file (bug 3006629). -- cgit v1.2.3