git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2005 35acf78f-673a-0410-8e92-d51de3d6d3f4

This commit is contained in:
gdisirio 2010-06-05 10:11:06 +00:00
parent 3da2df07a9
commit d54e8eb64d
7 changed files with 50 additions and 10 deletions

View File

@ -125,8 +125,8 @@
* @defgroup ARM7_CONF Configuration Options * @defgroup ARM7_CONF Configuration Options
* @brief ARM7 specific configuration options. * @brief ARM7 specific configuration options.
* @details The ARM7 port allows some architecture-specific configurations * @details The ARM7 port allows some architecture-specific configurations
* settings that can be specified externally, as example on the compiler * settings that can be overridden by redefining them in @p chconf.h.
* command line: * Usually there is no need to change the default values.
* - @p INT_REQUIRED_STACK, this value represent the amount of stack space used * - @p INT_REQUIRED_STACK, this value represent the amount of stack space used
* by an interrupt handler between the @p extctx and @p intctx * by an interrupt handler between the @p extctx and @p intctx
* structures.<br> * structures.<br>
@ -138,6 +138,9 @@
* can trim this down by defining the macro externally. This would save * can trim this down by defining the macro externally. This would save
* some valuable RAM space for each thread present in the system.<br> * 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>. * 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 * @ingroup ARM7
*/ */

View File

@ -117,6 +117,9 @@
* In the current implementation this value is guaranteed to be zero so * 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 * there is no need to modify this value unless changes are done at the
* interrupts handling code. * 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 * - @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. * code. Code running at higher priority levels must not invoke any OS API.
* This setting is specific to the ARMv7-M architecture. * This setting is specific to the ARMv7-M architecture.

View File

@ -57,13 +57,16 @@
* @defgroup AVR_CONF Configuration Options * @defgroup AVR_CONF Configuration Options
* @brief AVR Configuration Options. * @brief AVR Configuration Options.
* @details The AVR port allows some architecture-specific configurations * @details The AVR port allows some architecture-specific configurations
* settingsthat can be specified externally, as example on the compiler * settings that can be overridden by redefining them in @p chconf.h.
* command line: * Usually there is no need to change the default values.
* - @p INT_REQUIRED_STACK, this value represent the amount of stack space * - @p INT_REQUIRED_STACK, this value represent the amount of stack space
* used by the interrupt handlers.<br> * used by the interrupt handlers.<br>
* The default for this value is @p 32, this space is allocated for each * 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> * 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>. * 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 * @ingroup AVR
*/ */

View File

@ -63,13 +63,16 @@
* @defgroup MSP430_CONF Configuration Options * @defgroup MSP430_CONF Configuration Options
* @brief MSP430 Configuration Options. * @brief MSP430 Configuration Options.
* @details The MSP430 port allows some architecture-specific configurations * @details The MSP430 port allows some architecture-specific configurations
* settings that can be specified externally, as example on the compiler * settings that can be overridden by redefining them in @p chconf.h.
* command line: * Usually there is no need to change the default values.
* - @p INT_REQUIRED_STACK, this value represent the amount of stack space * - @p INT_REQUIRED_STACK, this value represent the amount of stack space
* used by the interrupt handlers.<br> * used by the interrupt handlers.<br>
* The default for this value is @p 32, this space is allocated for each * 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> * 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>. * 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 * @ingroup MSP430
*/ */

View File

@ -60,14 +60,17 @@
* @defgroup PPC_CONF Configuration Options * @defgroup PPC_CONF Configuration Options
* @brief PowerPC Configuration Options. * @brief PowerPC Configuration Options.
* @details The PowerPC port allows some architecture-specific configurations * @details The PowerPC port allows some architecture-specific configurations
* settings that can be specified externally, as example on the compiler * settings that can be overridden by redefining them in @p chconf.h.
* command line: * Usually there is no need to change the default values.
* - @p INT_REQUIRED_STACK, this value represent the amount of stack space used * - @p INT_REQUIRED_STACK, this value represent the amount of stack space used
* by an interrupt handler between the @p extctx and @p intctx * by an interrupt handler between the @p extctx and @p intctx
* structures. * structures.
* The default for this value is @p 128 bytes, this space is allocated for * 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> * 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>. * 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> * - @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 * instruction from within the idle loop. This is defaulted to 0 because
* it can create problems with some debuggers. Setting this option to 1 * it can create problems with some debuggers. Setting this option to 1

View File

@ -30,6 +30,21 @@
#include <intrins.h> #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. * @brief Unique macro for the implemented architecture.
*/ */
@ -40,6 +55,10 @@
*/ */
#define CH_ARCHITECTURE_NAME "STM8" #define CH_ARCHITECTURE_NAME "STM8"
/*===========================================================================*/
/* Port implementation part. */
/*===========================================================================*/
/** /**
* @brief Base type for stack alignment. * @brief Base type for stack alignment.
* @note No alignment constraints so uint8_t. * @note No alignment constraints so uint8_t.
@ -250,7 +269,11 @@ struct stm8_startctx {
* @brief Enters an architecture-dependent halt mode. * @brief Enters an architecture-dependent halt mode.
* @note Implemented with the specific "wfi" instruction. * @note Implemented with the specific "wfi" instruction.
*/ */
#if STM8_ENABLE_WFI_IDLE || defined(__DOXYGEN__)
#define port_wait_for_interrupt() _wfi_() #define port_wait_for_interrupt() _wfi_()
#else
#define port_wait_for_interrupt()
#endif
/** /**
* @brief Performs a context switch between two threads. * @brief Performs a context switch between two threads.

View File

@ -61,13 +61,15 @@
*** 1.5.9 *** *** 1.5.9 ***
- FIX: Fixed STM8 baud rate setup error (bug 3010990). - FIX: Fixed STM8 baud rate setup error (bug 3010990).
- FIX: Fixed STM8 UART3 driver (bug 3009145). - 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: Small size optimization in the semaphores subsystem.
- OPT: Improvements in the STM8 port, the code is now smaller and generally - OPT: Improvements in the STM8 port, the code is now smaller and generally
faster, also saved few bytes of RAM. faster, also saved few bytes of RAM.
- Added explicit casts in chevents.h, chqueues.h, chqueues.c in order to - Added explicit casts in chevents.h, chqueues.h, chqueues.c in order to
silence some warnings on a specific compiler. silence some warnings on a specific compiler.
- Added a section in chconf.h where redefine the port-related configuration - 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 *** *** 1.5.8 ***
- FIX: Fixed missing files from ST library zip file (bug 3006629). - FIX: Fixed missing files from ST library zip file (bug 3006629).