From 50a41618beccf297631423b10aba8daa3be1e901 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Wed, 10 Aug 2011 09:17:04 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3220 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- demos/ARMCM3-STM32F103/chconf.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'demos') diff --git a/demos/ARMCM3-STM32F103/chconf.h b/demos/ARMCM3-STM32F103/chconf.h index c9c4c286a..afd605633 100644 --- a/demos/ARMCM3-STM32F103/chconf.h +++ b/demos/ARMCM3-STM32F103/chconf.h @@ -358,7 +358,7 @@ * @note The default is @p FALSE. */ #if !defined(CH_DBG_ENABLE_CHECKS) || defined(__DOXYGEN__) -#define CH_DBG_ENABLE_CHECKS FALSE +#define CH_DBG_ENABLE_CHECKS TRUE #endif /** @@ -370,7 +370,7 @@ * @note The default is @p FALSE. */ #if !defined(CH_DBG_ENABLE_ASSERTS) || defined(__DOXYGEN__) -#define CH_DBG_ENABLE_ASSERTS FALSE +#define CH_DBG_ENABLE_ASSERTS TRUE #endif /** @@ -381,7 +381,7 @@ * @note The default is @p FALSE. */ #if !defined(CH_DBG_ENABLE_TRACE) || defined(__DOXYGEN__) -#define CH_DBG_ENABLE_TRACE FALSE +#define CH_DBG_ENABLE_TRACE TRUE #endif /** @@ -395,7 +395,7 @@ * @p panic_msg variable set to @p NULL. */ #if !defined(CH_DBG_ENABLE_STACK_CHECK) || defined(__DOXYGEN__) -#define CH_DBG_ENABLE_STACK_CHECK FALSE +#define CH_DBG_ENABLE_STACK_CHECK TRUE #endif /** @@ -407,7 +407,7 @@ * @note The default is @p FALSE. */ #if !defined(CH_DBG_FILL_THREADS) || defined(__DOXYGEN__) -#define CH_DBG_FILL_THREADS FALSE +#define CH_DBG_FILL_THREADS TRUE #endif /** -- cgit v1.2.3 From b9933c2089f5f0cd93738ae9081c45fcf3df54b7 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Thu, 11 Aug 2011 17:51:37 +0000 Subject: Implemented system state checker debug option, remove the option CH_USE_NESTED_LOCKS. Documentation improvements and fixes. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3221 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- demos/ARM7-AT91SAM7S-FATFS-GCC/chconf.h | 61 ++++++++++++------- demos/ARM7-AT91SAM7S-GCC/chconf.h | 61 ++++++++++++------- demos/ARM7-AT91SAM7X-FATFS-GCC/chconf.h | 61 ++++++++++++------- demos/ARM7-AT91SAM7X-GCC/chconf.h | 61 ++++++++++++------- demos/ARM7-AT91SAM7X-LWIP-GCC/chconf.h | 65 +++++++++++++-------- demos/ARM7-AT91SAM7X-UIP-GCC/chconf.h | 61 ++++++++++++------- demos/ARM7-LPC214x-FATFS-GCC/chconf.h | 61 ++++++++++++------- demos/ARM7-LPC214x-G++/chconf.h | 61 ++++++++++++------- demos/ARM7-LPC214x-GCC/chconf.h | 61 ++++++++++++------- demos/ARMCM0-LPC1114-LPCXPRESSO/chconf.h | 61 ++++++++++++------- demos/ARMCM3-LPC1343-LPCXPRESSO/chconf.h | 61 ++++++++++++------- demos/ARMCM3-STM32F100-DISCOVERY/chconf.h | 61 ++++++++++++------- demos/ARMCM3-STM32F103-FATFS/chconf.h | 61 ++++++++++++------- demos/ARMCM3-STM32F103-G++/chconf.h | 61 ++++++++++++------- demos/ARMCM3-STM32F103/chconf.h | 71 +++++++++++++++-------- demos/ARMCM3-STM32F103ZG-FATFS/chconf.h | 61 ++++++++++++------- demos/ARMCM3-STM32F107/chconf.h | 61 ++++++++++++------- demos/ARMCM3-STM32L152-DISCOVERY/chconf.h | 61 ++++++++++++------- demos/AVR-AT90CANx-GCC/chconf.h | 61 ++++++++++++------- demos/AVR-ATmega128-GCC/chconf.h | 61 ++++++++++++------- demos/MSP430-MSP430x1611-GCC/chconf.h | 61 ++++++++++++------- demos/PPC-SPC563-GCC/chconf.h | 61 ++++++++++++------- demos/Posix-GCC/chconf.h | 61 ++++++++++++------- demos/STM8L-STM8L152-DISCOVERY-STVD/demo/chconf.h | 61 ++++++++++++------- demos/STM8S-STM8S105-DISCOVERY-STVD/demo/chconf.h | 61 ++++++++++++------- demos/STM8S-STM8S208-RC/chconf.h | 61 ++++++++++++------- demos/Win32-MinGW/chconf.h | 61 ++++++++++++------- 27 files changed, 1113 insertions(+), 548 deletions(-) (limited to 'demos') diff --git a/demos/ARM7-AT91SAM7S-FATFS-GCC/chconf.h b/demos/ARM7-AT91SAM7S-FATFS-GCC/chconf.h index c9c4c286a..6a365d96a 100644 --- a/demos/ARM7-AT91SAM7S-FATFS-GCC/chconf.h +++ b/demos/ARM7-AT91SAM7S-FATFS-GCC/chconf.h @@ -33,7 +33,10 @@ #define _CHCONF_H_ /*===========================================================================*/ -/* Kernel parameters. */ +/** + * @name Kernel parameters and options + * @{ + */ /*===========================================================================*/ /** @@ -60,21 +63,6 @@ #define CH_TIME_QUANTUM 20 #endif -/** - * @brief Nested locks. - * @details If enabled then the use of nested @p chSysLock() / @p chSysUnlock() - * operations is allowed.
- * For performance and code size reasons the recommended setting - * is to leave this option disabled.
- * You may use this option if you need to merge ChibiOS/RT with - * external libraries that require nested lock/unlock operations. - * - * @note The default is @p FALSE. - */ -#if !defined(CH_USE_NESTED_LOCKS) || defined(__DOXYGEN__) -#define CH_USE_NESTED_LOCKS FALSE -#endif - /** * @brief Managed RAM size. * @details Size of the RAM area to be managed by the OS. If set to zero @@ -107,8 +95,13 @@ #define CH_NO_IDLE_THREAD FALSE #endif +/** @} */ + /*===========================================================================*/ -/* Performance options. */ +/** + * @name Performance options + * @{ + */ /*===========================================================================*/ /** @@ -123,8 +116,13 @@ #define CH_OPTIMIZE_SPEED TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Subsystem options. */ +/** + * @name Subsystem options + * @{ + */ /*===========================================================================*/ /** @@ -346,10 +344,26 @@ #define CH_USE_DYNAMIC TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Debug options. */ +/** + * @name Debug options + * @{ + */ /*===========================================================================*/ +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) || defined(__DOXYGEN__) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + /** * @brief Debug option, parameters checks. * @details If enabled then the checks on the API functions input @@ -423,8 +437,13 @@ #define CH_DBG_THREADS_PROFILING TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Kernel hooks. */ +/** + * @name Kernel hooks + * @{ + */ /*===========================================================================*/ /** @@ -495,6 +514,8 @@ } #endif +/** @} */ + /*===========================================================================*/ /* Port-specific settings (override port settings defaulted in chcore.h). */ /*===========================================================================*/ diff --git a/demos/ARM7-AT91SAM7S-GCC/chconf.h b/demos/ARM7-AT91SAM7S-GCC/chconf.h index c9c4c286a..6a365d96a 100644 --- a/demos/ARM7-AT91SAM7S-GCC/chconf.h +++ b/demos/ARM7-AT91SAM7S-GCC/chconf.h @@ -33,7 +33,10 @@ #define _CHCONF_H_ /*===========================================================================*/ -/* Kernel parameters. */ +/** + * @name Kernel parameters and options + * @{ + */ /*===========================================================================*/ /** @@ -60,21 +63,6 @@ #define CH_TIME_QUANTUM 20 #endif -/** - * @brief Nested locks. - * @details If enabled then the use of nested @p chSysLock() / @p chSysUnlock() - * operations is allowed.
- * For performance and code size reasons the recommended setting - * is to leave this option disabled.
- * You may use this option if you need to merge ChibiOS/RT with - * external libraries that require nested lock/unlock operations. - * - * @note The default is @p FALSE. - */ -#if !defined(CH_USE_NESTED_LOCKS) || defined(__DOXYGEN__) -#define CH_USE_NESTED_LOCKS FALSE -#endif - /** * @brief Managed RAM size. * @details Size of the RAM area to be managed by the OS. If set to zero @@ -107,8 +95,13 @@ #define CH_NO_IDLE_THREAD FALSE #endif +/** @} */ + /*===========================================================================*/ -/* Performance options. */ +/** + * @name Performance options + * @{ + */ /*===========================================================================*/ /** @@ -123,8 +116,13 @@ #define CH_OPTIMIZE_SPEED TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Subsystem options. */ +/** + * @name Subsystem options + * @{ + */ /*===========================================================================*/ /** @@ -346,10 +344,26 @@ #define CH_USE_DYNAMIC TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Debug options. */ +/** + * @name Debug options + * @{ + */ /*===========================================================================*/ +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) || defined(__DOXYGEN__) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + /** * @brief Debug option, parameters checks. * @details If enabled then the checks on the API functions input @@ -423,8 +437,13 @@ #define CH_DBG_THREADS_PROFILING TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Kernel hooks. */ +/** + * @name Kernel hooks + * @{ + */ /*===========================================================================*/ /** @@ -495,6 +514,8 @@ } #endif +/** @} */ + /*===========================================================================*/ /* Port-specific settings (override port settings defaulted in chcore.h). */ /*===========================================================================*/ diff --git a/demos/ARM7-AT91SAM7X-FATFS-GCC/chconf.h b/demos/ARM7-AT91SAM7X-FATFS-GCC/chconf.h index c9c4c286a..6a365d96a 100644 --- a/demos/ARM7-AT91SAM7X-FATFS-GCC/chconf.h +++ b/demos/ARM7-AT91SAM7X-FATFS-GCC/chconf.h @@ -33,7 +33,10 @@ #define _CHCONF_H_ /*===========================================================================*/ -/* Kernel parameters. */ +/** + * @name Kernel parameters and options + * @{ + */ /*===========================================================================*/ /** @@ -60,21 +63,6 @@ #define CH_TIME_QUANTUM 20 #endif -/** - * @brief Nested locks. - * @details If enabled then the use of nested @p chSysLock() / @p chSysUnlock() - * operations is allowed.
- * For performance and code size reasons the recommended setting - * is to leave this option disabled.
- * You may use this option if you need to merge ChibiOS/RT with - * external libraries that require nested lock/unlock operations. - * - * @note The default is @p FALSE. - */ -#if !defined(CH_USE_NESTED_LOCKS) || defined(__DOXYGEN__) -#define CH_USE_NESTED_LOCKS FALSE -#endif - /** * @brief Managed RAM size. * @details Size of the RAM area to be managed by the OS. If set to zero @@ -107,8 +95,13 @@ #define CH_NO_IDLE_THREAD FALSE #endif +/** @} */ + /*===========================================================================*/ -/* Performance options. */ +/** + * @name Performance options + * @{ + */ /*===========================================================================*/ /** @@ -123,8 +116,13 @@ #define CH_OPTIMIZE_SPEED TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Subsystem options. */ +/** + * @name Subsystem options + * @{ + */ /*===========================================================================*/ /** @@ -346,10 +344,26 @@ #define CH_USE_DYNAMIC TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Debug options. */ +/** + * @name Debug options + * @{ + */ /*===========================================================================*/ +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) || defined(__DOXYGEN__) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + /** * @brief Debug option, parameters checks. * @details If enabled then the checks on the API functions input @@ -423,8 +437,13 @@ #define CH_DBG_THREADS_PROFILING TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Kernel hooks. */ +/** + * @name Kernel hooks + * @{ + */ /*===========================================================================*/ /** @@ -495,6 +514,8 @@ } #endif +/** @} */ + /*===========================================================================*/ /* Port-specific settings (override port settings defaulted in chcore.h). */ /*===========================================================================*/ diff --git a/demos/ARM7-AT91SAM7X-GCC/chconf.h b/demos/ARM7-AT91SAM7X-GCC/chconf.h index c9c4c286a..6a365d96a 100644 --- a/demos/ARM7-AT91SAM7X-GCC/chconf.h +++ b/demos/ARM7-AT91SAM7X-GCC/chconf.h @@ -33,7 +33,10 @@ #define _CHCONF_H_ /*===========================================================================*/ -/* Kernel parameters. */ +/** + * @name Kernel parameters and options + * @{ + */ /*===========================================================================*/ /** @@ -60,21 +63,6 @@ #define CH_TIME_QUANTUM 20 #endif -/** - * @brief Nested locks. - * @details If enabled then the use of nested @p chSysLock() / @p chSysUnlock() - * operations is allowed.
- * For performance and code size reasons the recommended setting - * is to leave this option disabled.
- * You may use this option if you need to merge ChibiOS/RT with - * external libraries that require nested lock/unlock operations. - * - * @note The default is @p FALSE. - */ -#if !defined(CH_USE_NESTED_LOCKS) || defined(__DOXYGEN__) -#define CH_USE_NESTED_LOCKS FALSE -#endif - /** * @brief Managed RAM size. * @details Size of the RAM area to be managed by the OS. If set to zero @@ -107,8 +95,13 @@ #define CH_NO_IDLE_THREAD FALSE #endif +/** @} */ + /*===========================================================================*/ -/* Performance options. */ +/** + * @name Performance options + * @{ + */ /*===========================================================================*/ /** @@ -123,8 +116,13 @@ #define CH_OPTIMIZE_SPEED TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Subsystem options. */ +/** + * @name Subsystem options + * @{ + */ /*===========================================================================*/ /** @@ -346,10 +344,26 @@ #define CH_USE_DYNAMIC TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Debug options. */ +/** + * @name Debug options + * @{ + */ /*===========================================================================*/ +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) || defined(__DOXYGEN__) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + /** * @brief Debug option, parameters checks. * @details If enabled then the checks on the API functions input @@ -423,8 +437,13 @@ #define CH_DBG_THREADS_PROFILING TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Kernel hooks. */ +/** + * @name Kernel hooks + * @{ + */ /*===========================================================================*/ /** @@ -495,6 +514,8 @@ } #endif +/** @} */ + /*===========================================================================*/ /* Port-specific settings (override port settings defaulted in chcore.h). */ /*===========================================================================*/ diff --git a/demos/ARM7-AT91SAM7X-LWIP-GCC/chconf.h b/demos/ARM7-AT91SAM7X-LWIP-GCC/chconf.h index 202dfc511..6a365d96a 100644 --- a/demos/ARM7-AT91SAM7X-LWIP-GCC/chconf.h +++ b/demos/ARM7-AT91SAM7X-LWIP-GCC/chconf.h @@ -33,7 +33,10 @@ #define _CHCONF_H_ /*===========================================================================*/ -/* Kernel parameters. */ +/** + * @name Kernel parameters and options + * @{ + */ /*===========================================================================*/ /** @@ -60,21 +63,6 @@ #define CH_TIME_QUANTUM 20 #endif -/** - * @brief Nested locks. - * @details If enabled then the use of nested @p chSysLock() / @p chSysUnlock() - * operations is allowed.
- * For performance and code size reasons the recommended setting - * is to leave this option disabled.
- * You may use this option if you need to merge ChibiOS/RT with - * external libraries that require nested lock/unlock operations. - * - * @note The default is @p FALSE. - */ -#if !defined(CH_USE_NESTED_LOCKS) || defined(__DOXYGEN__) -#define CH_USE_NESTED_LOCKS TRUE -#endif - /** * @brief Managed RAM size. * @details Size of the RAM area to be managed by the OS. If set to zero @@ -107,8 +95,13 @@ #define CH_NO_IDLE_THREAD FALSE #endif +/** @} */ + /*===========================================================================*/ -/* Performance options. */ +/** + * @name Performance options + * @{ + */ /*===========================================================================*/ /** @@ -123,8 +116,13 @@ #define CH_OPTIMIZE_SPEED TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Subsystem options. */ +/** + * @name Subsystem options + * @{ + */ /*===========================================================================*/ /** @@ -346,10 +344,26 @@ #define CH_USE_DYNAMIC TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Debug options. */ +/** + * @name Debug options + * @{ + */ /*===========================================================================*/ +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) || defined(__DOXYGEN__) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + /** * @brief Debug option, parameters checks. * @details If enabled then the checks on the API functions input @@ -423,8 +437,13 @@ #define CH_DBG_THREADS_PROFILING TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Kernel hooks. */ +/** + * @name Kernel hooks + * @{ + */ /*===========================================================================*/ /** @@ -433,9 +452,7 @@ */ #if !defined(THREAD_EXT_FIELDS) || defined(__DOXYGEN__) #define THREAD_EXT_FIELDS \ -struct { \ - /* Add threads custom fields here.*/ \ -}; + /* Add threads custom fields here.*/ #endif /** @@ -497,6 +514,8 @@ struct { \ } #endif +/** @} */ + /*===========================================================================*/ /* Port-specific settings (override port settings defaulted in chcore.h). */ /*===========================================================================*/ diff --git a/demos/ARM7-AT91SAM7X-UIP-GCC/chconf.h b/demos/ARM7-AT91SAM7X-UIP-GCC/chconf.h index c9c4c286a..6a365d96a 100644 --- a/demos/ARM7-AT91SAM7X-UIP-GCC/chconf.h +++ b/demos/ARM7-AT91SAM7X-UIP-GCC/chconf.h @@ -33,7 +33,10 @@ #define _CHCONF_H_ /*===========================================================================*/ -/* Kernel parameters. */ +/** + * @name Kernel parameters and options + * @{ + */ /*===========================================================================*/ /** @@ -60,21 +63,6 @@ #define CH_TIME_QUANTUM 20 #endif -/** - * @brief Nested locks. - * @details If enabled then the use of nested @p chSysLock() / @p chSysUnlock() - * operations is allowed.
- * For performance and code size reasons the recommended setting - * is to leave this option disabled.
- * You may use this option if you need to merge ChibiOS/RT with - * external libraries that require nested lock/unlock operations. - * - * @note The default is @p FALSE. - */ -#if !defined(CH_USE_NESTED_LOCKS) || defined(__DOXYGEN__) -#define CH_USE_NESTED_LOCKS FALSE -#endif - /** * @brief Managed RAM size. * @details Size of the RAM area to be managed by the OS. If set to zero @@ -107,8 +95,13 @@ #define CH_NO_IDLE_THREAD FALSE #endif +/** @} */ + /*===========================================================================*/ -/* Performance options. */ +/** + * @name Performance options + * @{ + */ /*===========================================================================*/ /** @@ -123,8 +116,13 @@ #define CH_OPTIMIZE_SPEED TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Subsystem options. */ +/** + * @name Subsystem options + * @{ + */ /*===========================================================================*/ /** @@ -346,10 +344,26 @@ #define CH_USE_DYNAMIC TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Debug options. */ +/** + * @name Debug options + * @{ + */ /*===========================================================================*/ +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) || defined(__DOXYGEN__) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + /** * @brief Debug option, parameters checks. * @details If enabled then the checks on the API functions input @@ -423,8 +437,13 @@ #define CH_DBG_THREADS_PROFILING TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Kernel hooks. */ +/** + * @name Kernel hooks + * @{ + */ /*===========================================================================*/ /** @@ -495,6 +514,8 @@ } #endif +/** @} */ + /*===========================================================================*/ /* Port-specific settings (override port settings defaulted in chcore.h). */ /*===========================================================================*/ diff --git a/demos/ARM7-LPC214x-FATFS-GCC/chconf.h b/demos/ARM7-LPC214x-FATFS-GCC/chconf.h index c9c4c286a..6a365d96a 100644 --- a/demos/ARM7-LPC214x-FATFS-GCC/chconf.h +++ b/demos/ARM7-LPC214x-FATFS-GCC/chconf.h @@ -33,7 +33,10 @@ #define _CHCONF_H_ /*===========================================================================*/ -/* Kernel parameters. */ +/** + * @name Kernel parameters and options + * @{ + */ /*===========================================================================*/ /** @@ -60,21 +63,6 @@ #define CH_TIME_QUANTUM 20 #endif -/** - * @brief Nested locks. - * @details If enabled then the use of nested @p chSysLock() / @p chSysUnlock() - * operations is allowed.
- * For performance and code size reasons the recommended setting - * is to leave this option disabled.
- * You may use this option if you need to merge ChibiOS/RT with - * external libraries that require nested lock/unlock operations. - * - * @note The default is @p FALSE. - */ -#if !defined(CH_USE_NESTED_LOCKS) || defined(__DOXYGEN__) -#define CH_USE_NESTED_LOCKS FALSE -#endif - /** * @brief Managed RAM size. * @details Size of the RAM area to be managed by the OS. If set to zero @@ -107,8 +95,13 @@ #define CH_NO_IDLE_THREAD FALSE #endif +/** @} */ + /*===========================================================================*/ -/* Performance options. */ +/** + * @name Performance options + * @{ + */ /*===========================================================================*/ /** @@ -123,8 +116,13 @@ #define CH_OPTIMIZE_SPEED TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Subsystem options. */ +/** + * @name Subsystem options + * @{ + */ /*===========================================================================*/ /** @@ -346,10 +344,26 @@ #define CH_USE_DYNAMIC TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Debug options. */ +/** + * @name Debug options + * @{ + */ /*===========================================================================*/ +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) || defined(__DOXYGEN__) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + /** * @brief Debug option, parameters checks. * @details If enabled then the checks on the API functions input @@ -423,8 +437,13 @@ #define CH_DBG_THREADS_PROFILING TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Kernel hooks. */ +/** + * @name Kernel hooks + * @{ + */ /*===========================================================================*/ /** @@ -495,6 +514,8 @@ } #endif +/** @} */ + /*===========================================================================*/ /* Port-specific settings (override port settings defaulted in chcore.h). */ /*===========================================================================*/ diff --git a/demos/ARM7-LPC214x-G++/chconf.h b/demos/ARM7-LPC214x-G++/chconf.h index c9c4c286a..6a365d96a 100644 --- a/demos/ARM7-LPC214x-G++/chconf.h +++ b/demos/ARM7-LPC214x-G++/chconf.h @@ -33,7 +33,10 @@ #define _CHCONF_H_ /*===========================================================================*/ -/* Kernel parameters. */ +/** + * @name Kernel parameters and options + * @{ + */ /*===========================================================================*/ /** @@ -60,21 +63,6 @@ #define CH_TIME_QUANTUM 20 #endif -/** - * @brief Nested locks. - * @details If enabled then the use of nested @p chSysLock() / @p chSysUnlock() - * operations is allowed.
- * For performance and code size reasons the recommended setting - * is to leave this option disabled.
- * You may use this option if you need to merge ChibiOS/RT with - * external libraries that require nested lock/unlock operations. - * - * @note The default is @p FALSE. - */ -#if !defined(CH_USE_NESTED_LOCKS) || defined(__DOXYGEN__) -#define CH_USE_NESTED_LOCKS FALSE -#endif - /** * @brief Managed RAM size. * @details Size of the RAM area to be managed by the OS. If set to zero @@ -107,8 +95,13 @@ #define CH_NO_IDLE_THREAD FALSE #endif +/** @} */ + /*===========================================================================*/ -/* Performance options. */ +/** + * @name Performance options + * @{ + */ /*===========================================================================*/ /** @@ -123,8 +116,13 @@ #define CH_OPTIMIZE_SPEED TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Subsystem options. */ +/** + * @name Subsystem options + * @{ + */ /*===========================================================================*/ /** @@ -346,10 +344,26 @@ #define CH_USE_DYNAMIC TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Debug options. */ +/** + * @name Debug options + * @{ + */ /*===========================================================================*/ +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) || defined(__DOXYGEN__) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + /** * @brief Debug option, parameters checks. * @details If enabled then the checks on the API functions input @@ -423,8 +437,13 @@ #define CH_DBG_THREADS_PROFILING TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Kernel hooks. */ +/** + * @name Kernel hooks + * @{ + */ /*===========================================================================*/ /** @@ -495,6 +514,8 @@ } #endif +/** @} */ + /*===========================================================================*/ /* Port-specific settings (override port settings defaulted in chcore.h). */ /*===========================================================================*/ diff --git a/demos/ARM7-LPC214x-GCC/chconf.h b/demos/ARM7-LPC214x-GCC/chconf.h index c9c4c286a..6a365d96a 100644 --- a/demos/ARM7-LPC214x-GCC/chconf.h +++ b/demos/ARM7-LPC214x-GCC/chconf.h @@ -33,7 +33,10 @@ #define _CHCONF_H_ /*===========================================================================*/ -/* Kernel parameters. */ +/** + * @name Kernel parameters and options + * @{ + */ /*===========================================================================*/ /** @@ -60,21 +63,6 @@ #define CH_TIME_QUANTUM 20 #endif -/** - * @brief Nested locks. - * @details If enabled then the use of nested @p chSysLock() / @p chSysUnlock() - * operations is allowed.
- * For performance and code size reasons the recommended setting - * is to leave this option disabled.
- * You may use this option if you need to merge ChibiOS/RT with - * external libraries that require nested lock/unlock operations. - * - * @note The default is @p FALSE. - */ -#if !defined(CH_USE_NESTED_LOCKS) || defined(__DOXYGEN__) -#define CH_USE_NESTED_LOCKS FALSE -#endif - /** * @brief Managed RAM size. * @details Size of the RAM area to be managed by the OS. If set to zero @@ -107,8 +95,13 @@ #define CH_NO_IDLE_THREAD FALSE #endif +/** @} */ + /*===========================================================================*/ -/* Performance options. */ +/** + * @name Performance options + * @{ + */ /*===========================================================================*/ /** @@ -123,8 +116,13 @@ #define CH_OPTIMIZE_SPEED TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Subsystem options. */ +/** + * @name Subsystem options + * @{ + */ /*===========================================================================*/ /** @@ -346,10 +344,26 @@ #define CH_USE_DYNAMIC TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Debug options. */ +/** + * @name Debug options + * @{ + */ /*===========================================================================*/ +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) || defined(__DOXYGEN__) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + /** * @brief Debug option, parameters checks. * @details If enabled then the checks on the API functions input @@ -423,8 +437,13 @@ #define CH_DBG_THREADS_PROFILING TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Kernel hooks. */ +/** + * @name Kernel hooks + * @{ + */ /*===========================================================================*/ /** @@ -495,6 +514,8 @@ } #endif +/** @} */ + /*===========================================================================*/ /* Port-specific settings (override port settings defaulted in chcore.h). */ /*===========================================================================*/ diff --git a/demos/ARMCM0-LPC1114-LPCXPRESSO/chconf.h b/demos/ARMCM0-LPC1114-LPCXPRESSO/chconf.h index c9c4c286a..6a365d96a 100644 --- a/demos/ARMCM0-LPC1114-LPCXPRESSO/chconf.h +++ b/demos/ARMCM0-LPC1114-LPCXPRESSO/chconf.h @@ -33,7 +33,10 @@ #define _CHCONF_H_ /*===========================================================================*/ -/* Kernel parameters. */ +/** + * @name Kernel parameters and options + * @{ + */ /*===========================================================================*/ /** @@ -60,21 +63,6 @@ #define CH_TIME_QUANTUM 20 #endif -/** - * @brief Nested locks. - * @details If enabled then the use of nested @p chSysLock() / @p chSysUnlock() - * operations is allowed.
- * For performance and code size reasons the recommended setting - * is to leave this option disabled.
- * You may use this option if you need to merge ChibiOS/RT with - * external libraries that require nested lock/unlock operations. - * - * @note The default is @p FALSE. - */ -#if !defined(CH_USE_NESTED_LOCKS) || defined(__DOXYGEN__) -#define CH_USE_NESTED_LOCKS FALSE -#endif - /** * @brief Managed RAM size. * @details Size of the RAM area to be managed by the OS. If set to zero @@ -107,8 +95,13 @@ #define CH_NO_IDLE_THREAD FALSE #endif +/** @} */ + /*===========================================================================*/ -/* Performance options. */ +/** + * @name Performance options + * @{ + */ /*===========================================================================*/ /** @@ -123,8 +116,13 @@ #define CH_OPTIMIZE_SPEED TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Subsystem options. */ +/** + * @name Subsystem options + * @{ + */ /*===========================================================================*/ /** @@ -346,10 +344,26 @@ #define CH_USE_DYNAMIC TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Debug options. */ +/** + * @name Debug options + * @{ + */ /*===========================================================================*/ +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) || defined(__DOXYGEN__) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + /** * @brief Debug option, parameters checks. * @details If enabled then the checks on the API functions input @@ -423,8 +437,13 @@ #define CH_DBG_THREADS_PROFILING TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Kernel hooks. */ +/** + * @name Kernel hooks + * @{ + */ /*===========================================================================*/ /** @@ -495,6 +514,8 @@ } #endif +/** @} */ + /*===========================================================================*/ /* Port-specific settings (override port settings defaulted in chcore.h). */ /*===========================================================================*/ diff --git a/demos/ARMCM3-LPC1343-LPCXPRESSO/chconf.h b/demos/ARMCM3-LPC1343-LPCXPRESSO/chconf.h index c9c4c286a..6a365d96a 100644 --- a/demos/ARMCM3-LPC1343-LPCXPRESSO/chconf.h +++ b/demos/ARMCM3-LPC1343-LPCXPRESSO/chconf.h @@ -33,7 +33,10 @@ #define _CHCONF_H_ /*===========================================================================*/ -/* Kernel parameters. */ +/** + * @name Kernel parameters and options + * @{ + */ /*===========================================================================*/ /** @@ -60,21 +63,6 @@ #define CH_TIME_QUANTUM 20 #endif -/** - * @brief Nested locks. - * @details If enabled then the use of nested @p chSysLock() / @p chSysUnlock() - * operations is allowed.
- * For performance and code size reasons the recommended setting - * is to leave this option disabled.
- * You may use this option if you need to merge ChibiOS/RT with - * external libraries that require nested lock/unlock operations. - * - * @note The default is @p FALSE. - */ -#if !defined(CH_USE_NESTED_LOCKS) || defined(__DOXYGEN__) -#define CH_USE_NESTED_LOCKS FALSE -#endif - /** * @brief Managed RAM size. * @details Size of the RAM area to be managed by the OS. If set to zero @@ -107,8 +95,13 @@ #define CH_NO_IDLE_THREAD FALSE #endif +/** @} */ + /*===========================================================================*/ -/* Performance options. */ +/** + * @name Performance options + * @{ + */ /*===========================================================================*/ /** @@ -123,8 +116,13 @@ #define CH_OPTIMIZE_SPEED TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Subsystem options. */ +/** + * @name Subsystem options + * @{ + */ /*===========================================================================*/ /** @@ -346,10 +344,26 @@ #define CH_USE_DYNAMIC TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Debug options. */ +/** + * @name Debug options + * @{ + */ /*===========================================================================*/ +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) || defined(__DOXYGEN__) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + /** * @brief Debug option, parameters checks. * @details If enabled then the checks on the API functions input @@ -423,8 +437,13 @@ #define CH_DBG_THREADS_PROFILING TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Kernel hooks. */ +/** + * @name Kernel hooks + * @{ + */ /*===========================================================================*/ /** @@ -495,6 +514,8 @@ } #endif +/** @} */ + /*===========================================================================*/ /* Port-specific settings (override port settings defaulted in chcore.h). */ /*===========================================================================*/ diff --git a/demos/ARMCM3-STM32F100-DISCOVERY/chconf.h b/demos/ARMCM3-STM32F100-DISCOVERY/chconf.h index c9c4c286a..6a365d96a 100644 --- a/demos/ARMCM3-STM32F100-DISCOVERY/chconf.h +++ b/demos/ARMCM3-STM32F100-DISCOVERY/chconf.h @@ -33,7 +33,10 @@ #define _CHCONF_H_ /*===========================================================================*/ -/* Kernel parameters. */ +/** + * @name Kernel parameters and options + * @{ + */ /*===========================================================================*/ /** @@ -60,21 +63,6 @@ #define CH_TIME_QUANTUM 20 #endif -/** - * @brief Nested locks. - * @details If enabled then the use of nested @p chSysLock() / @p chSysUnlock() - * operations is allowed.
- * For performance and code size reasons the recommended setting - * is to leave this option disabled.
- * You may use this option if you need to merge ChibiOS/RT with - * external libraries that require nested lock/unlock operations. - * - * @note The default is @p FALSE. - */ -#if !defined(CH_USE_NESTED_LOCKS) || defined(__DOXYGEN__) -#define CH_USE_NESTED_LOCKS FALSE -#endif - /** * @brief Managed RAM size. * @details Size of the RAM area to be managed by the OS. If set to zero @@ -107,8 +95,13 @@ #define CH_NO_IDLE_THREAD FALSE #endif +/** @} */ + /*===========================================================================*/ -/* Performance options. */ +/** + * @name Performance options + * @{ + */ /*===========================================================================*/ /** @@ -123,8 +116,13 @@ #define CH_OPTIMIZE_SPEED TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Subsystem options. */ +/** + * @name Subsystem options + * @{ + */ /*===========================================================================*/ /** @@ -346,10 +344,26 @@ #define CH_USE_DYNAMIC TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Debug options. */ +/** + * @name Debug options + * @{ + */ /*===========================================================================*/ +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) || defined(__DOXYGEN__) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + /** * @brief Debug option, parameters checks. * @details If enabled then the checks on the API functions input @@ -423,8 +437,13 @@ #define CH_DBG_THREADS_PROFILING TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Kernel hooks. */ +/** + * @name Kernel hooks + * @{ + */ /*===========================================================================*/ /** @@ -495,6 +514,8 @@ } #endif +/** @} */ + /*===========================================================================*/ /* Port-specific settings (override port settings defaulted in chcore.h). */ /*===========================================================================*/ diff --git a/demos/ARMCM3-STM32F103-FATFS/chconf.h b/demos/ARMCM3-STM32F103-FATFS/chconf.h index c9c4c286a..6a365d96a 100644 --- a/demos/ARMCM3-STM32F103-FATFS/chconf.h +++ b/demos/ARMCM3-STM32F103-FATFS/chconf.h @@ -33,7 +33,10 @@ #define _CHCONF_H_ /*===========================================================================*/ -/* Kernel parameters. */ +/** + * @name Kernel parameters and options + * @{ + */ /*===========================================================================*/ /** @@ -60,21 +63,6 @@ #define CH_TIME_QUANTUM 20 #endif -/** - * @brief Nested locks. - * @details If enabled then the use of nested @p chSysLock() / @p chSysUnlock() - * operations is allowed.
- * For performance and code size reasons the recommended setting - * is to leave this option disabled.
- * You may use this option if you need to merge ChibiOS/RT with - * external libraries that require nested lock/unlock operations. - * - * @note The default is @p FALSE. - */ -#if !defined(CH_USE_NESTED_LOCKS) || defined(__DOXYGEN__) -#define CH_USE_NESTED_LOCKS FALSE -#endif - /** * @brief Managed RAM size. * @details Size of the RAM area to be managed by the OS. If set to zero @@ -107,8 +95,13 @@ #define CH_NO_IDLE_THREAD FALSE #endif +/** @} */ + /*===========================================================================*/ -/* Performance options. */ +/** + * @name Performance options + * @{ + */ /*===========================================================================*/ /** @@ -123,8 +116,13 @@ #define CH_OPTIMIZE_SPEED TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Subsystem options. */ +/** + * @name Subsystem options + * @{ + */ /*===========================================================================*/ /** @@ -346,10 +344,26 @@ #define CH_USE_DYNAMIC TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Debug options. */ +/** + * @name Debug options + * @{ + */ /*===========================================================================*/ +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) || defined(__DOXYGEN__) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + /** * @brief Debug option, parameters checks. * @details If enabled then the checks on the API functions input @@ -423,8 +437,13 @@ #define CH_DBG_THREADS_PROFILING TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Kernel hooks. */ +/** + * @name Kernel hooks + * @{ + */ /*===========================================================================*/ /** @@ -495,6 +514,8 @@ } #endif +/** @} */ + /*===========================================================================*/ /* Port-specific settings (override port settings defaulted in chcore.h). */ /*===========================================================================*/ diff --git a/demos/ARMCM3-STM32F103-G++/chconf.h b/demos/ARMCM3-STM32F103-G++/chconf.h index c9c4c286a..6a365d96a 100644 --- a/demos/ARMCM3-STM32F103-G++/chconf.h +++ b/demos/ARMCM3-STM32F103-G++/chconf.h @@ -33,7 +33,10 @@ #define _CHCONF_H_ /*===========================================================================*/ -/* Kernel parameters. */ +/** + * @name Kernel parameters and options + * @{ + */ /*===========================================================================*/ /** @@ -60,21 +63,6 @@ #define CH_TIME_QUANTUM 20 #endif -/** - * @brief Nested locks. - * @details If enabled then the use of nested @p chSysLock() / @p chSysUnlock() - * operations is allowed.
- * For performance and code size reasons the recommended setting - * is to leave this option disabled.
- * You may use this option if you need to merge ChibiOS/RT with - * external libraries that require nested lock/unlock operations. - * - * @note The default is @p FALSE. - */ -#if !defined(CH_USE_NESTED_LOCKS) || defined(__DOXYGEN__) -#define CH_USE_NESTED_LOCKS FALSE -#endif - /** * @brief Managed RAM size. * @details Size of the RAM area to be managed by the OS. If set to zero @@ -107,8 +95,13 @@ #define CH_NO_IDLE_THREAD FALSE #endif +/** @} */ + /*===========================================================================*/ -/* Performance options. */ +/** + * @name Performance options + * @{ + */ /*===========================================================================*/ /** @@ -123,8 +116,13 @@ #define CH_OPTIMIZE_SPEED TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Subsystem options. */ +/** + * @name Subsystem options + * @{ + */ /*===========================================================================*/ /** @@ -346,10 +344,26 @@ #define CH_USE_DYNAMIC TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Debug options. */ +/** + * @name Debug options + * @{ + */ /*===========================================================================*/ +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) || defined(__DOXYGEN__) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + /** * @brief Debug option, parameters checks. * @details If enabled then the checks on the API functions input @@ -423,8 +437,13 @@ #define CH_DBG_THREADS_PROFILING TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Kernel hooks. */ +/** + * @name Kernel hooks + * @{ + */ /*===========================================================================*/ /** @@ -495,6 +514,8 @@ } #endif +/** @} */ + /*===========================================================================*/ /* Port-specific settings (override port settings defaulted in chcore.h). */ /*===========================================================================*/ diff --git a/demos/ARMCM3-STM32F103/chconf.h b/demos/ARMCM3-STM32F103/chconf.h index afd605633..6a365d96a 100644 --- a/demos/ARMCM3-STM32F103/chconf.h +++ b/demos/ARMCM3-STM32F103/chconf.h @@ -33,7 +33,10 @@ #define _CHCONF_H_ /*===========================================================================*/ -/* Kernel parameters. */ +/** + * @name Kernel parameters and options + * @{ + */ /*===========================================================================*/ /** @@ -60,21 +63,6 @@ #define CH_TIME_QUANTUM 20 #endif -/** - * @brief Nested locks. - * @details If enabled then the use of nested @p chSysLock() / @p chSysUnlock() - * operations is allowed.
- * For performance and code size reasons the recommended setting - * is to leave this option disabled.
- * You may use this option if you need to merge ChibiOS/RT with - * external libraries that require nested lock/unlock operations. - * - * @note The default is @p FALSE. - */ -#if !defined(CH_USE_NESTED_LOCKS) || defined(__DOXYGEN__) -#define CH_USE_NESTED_LOCKS FALSE -#endif - /** * @brief Managed RAM size. * @details Size of the RAM area to be managed by the OS. If set to zero @@ -107,8 +95,13 @@ #define CH_NO_IDLE_THREAD FALSE #endif +/** @} */ + /*===========================================================================*/ -/* Performance options. */ +/** + * @name Performance options + * @{ + */ /*===========================================================================*/ /** @@ -123,8 +116,13 @@ #define CH_OPTIMIZE_SPEED TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Subsystem options. */ +/** + * @name Subsystem options + * @{ + */ /*===========================================================================*/ /** @@ -346,10 +344,26 @@ #define CH_USE_DYNAMIC TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Debug options. */ +/** + * @name Debug options + * @{ + */ /*===========================================================================*/ +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) || defined(__DOXYGEN__) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + /** * @brief Debug option, parameters checks. * @details If enabled then the checks on the API functions input @@ -358,7 +372,7 @@ * @note The default is @p FALSE. */ #if !defined(CH_DBG_ENABLE_CHECKS) || defined(__DOXYGEN__) -#define CH_DBG_ENABLE_CHECKS TRUE +#define CH_DBG_ENABLE_CHECKS FALSE #endif /** @@ -370,7 +384,7 @@ * @note The default is @p FALSE. */ #if !defined(CH_DBG_ENABLE_ASSERTS) || defined(__DOXYGEN__) -#define CH_DBG_ENABLE_ASSERTS TRUE +#define CH_DBG_ENABLE_ASSERTS FALSE #endif /** @@ -381,7 +395,7 @@ * @note The default is @p FALSE. */ #if !defined(CH_DBG_ENABLE_TRACE) || defined(__DOXYGEN__) -#define CH_DBG_ENABLE_TRACE TRUE +#define CH_DBG_ENABLE_TRACE FALSE #endif /** @@ -395,7 +409,7 @@ * @p panic_msg variable set to @p NULL. */ #if !defined(CH_DBG_ENABLE_STACK_CHECK) || defined(__DOXYGEN__) -#define CH_DBG_ENABLE_STACK_CHECK TRUE +#define CH_DBG_ENABLE_STACK_CHECK FALSE #endif /** @@ -407,7 +421,7 @@ * @note The default is @p FALSE. */ #if !defined(CH_DBG_FILL_THREADS) || defined(__DOXYGEN__) -#define CH_DBG_FILL_THREADS TRUE +#define CH_DBG_FILL_THREADS FALSE #endif /** @@ -423,8 +437,13 @@ #define CH_DBG_THREADS_PROFILING TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Kernel hooks. */ +/** + * @name Kernel hooks + * @{ + */ /*===========================================================================*/ /** @@ -495,6 +514,8 @@ } #endif +/** @} */ + /*===========================================================================*/ /* Port-specific settings (override port settings defaulted in chcore.h). */ /*===========================================================================*/ diff --git a/demos/ARMCM3-STM32F103ZG-FATFS/chconf.h b/demos/ARMCM3-STM32F103ZG-FATFS/chconf.h index c9c4c286a..6a365d96a 100644 --- a/demos/ARMCM3-STM32F103ZG-FATFS/chconf.h +++ b/demos/ARMCM3-STM32F103ZG-FATFS/chconf.h @@ -33,7 +33,10 @@ #define _CHCONF_H_ /*===========================================================================*/ -/* Kernel parameters. */ +/** + * @name Kernel parameters and options + * @{ + */ /*===========================================================================*/ /** @@ -60,21 +63,6 @@ #define CH_TIME_QUANTUM 20 #endif -/** - * @brief Nested locks. - * @details If enabled then the use of nested @p chSysLock() / @p chSysUnlock() - * operations is allowed.
- * For performance and code size reasons the recommended setting - * is to leave this option disabled.
- * You may use this option if you need to merge ChibiOS/RT with - * external libraries that require nested lock/unlock operations. - * - * @note The default is @p FALSE. - */ -#if !defined(CH_USE_NESTED_LOCKS) || defined(__DOXYGEN__) -#define CH_USE_NESTED_LOCKS FALSE -#endif - /** * @brief Managed RAM size. * @details Size of the RAM area to be managed by the OS. If set to zero @@ -107,8 +95,13 @@ #define CH_NO_IDLE_THREAD FALSE #endif +/** @} */ + /*===========================================================================*/ -/* Performance options. */ +/** + * @name Performance options + * @{ + */ /*===========================================================================*/ /** @@ -123,8 +116,13 @@ #define CH_OPTIMIZE_SPEED TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Subsystem options. */ +/** + * @name Subsystem options + * @{ + */ /*===========================================================================*/ /** @@ -346,10 +344,26 @@ #define CH_USE_DYNAMIC TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Debug options. */ +/** + * @name Debug options + * @{ + */ /*===========================================================================*/ +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) || defined(__DOXYGEN__) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + /** * @brief Debug option, parameters checks. * @details If enabled then the checks on the API functions input @@ -423,8 +437,13 @@ #define CH_DBG_THREADS_PROFILING TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Kernel hooks. */ +/** + * @name Kernel hooks + * @{ + */ /*===========================================================================*/ /** @@ -495,6 +514,8 @@ } #endif +/** @} */ + /*===========================================================================*/ /* Port-specific settings (override port settings defaulted in chcore.h). */ /*===========================================================================*/ diff --git a/demos/ARMCM3-STM32F107/chconf.h b/demos/ARMCM3-STM32F107/chconf.h index c9c4c286a..6a365d96a 100644 --- a/demos/ARMCM3-STM32F107/chconf.h +++ b/demos/ARMCM3-STM32F107/chconf.h @@ -33,7 +33,10 @@ #define _CHCONF_H_ /*===========================================================================*/ -/* Kernel parameters. */ +/** + * @name Kernel parameters and options + * @{ + */ /*===========================================================================*/ /** @@ -60,21 +63,6 @@ #define CH_TIME_QUANTUM 20 #endif -/** - * @brief Nested locks. - * @details If enabled then the use of nested @p chSysLock() / @p chSysUnlock() - * operations is allowed.
- * For performance and code size reasons the recommended setting - * is to leave this option disabled.
- * You may use this option if you need to merge ChibiOS/RT with - * external libraries that require nested lock/unlock operations. - * - * @note The default is @p FALSE. - */ -#if !defined(CH_USE_NESTED_LOCKS) || defined(__DOXYGEN__) -#define CH_USE_NESTED_LOCKS FALSE -#endif - /** * @brief Managed RAM size. * @details Size of the RAM area to be managed by the OS. If set to zero @@ -107,8 +95,13 @@ #define CH_NO_IDLE_THREAD FALSE #endif +/** @} */ + /*===========================================================================*/ -/* Performance options. */ +/** + * @name Performance options + * @{ + */ /*===========================================================================*/ /** @@ -123,8 +116,13 @@ #define CH_OPTIMIZE_SPEED TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Subsystem options. */ +/** + * @name Subsystem options + * @{ + */ /*===========================================================================*/ /** @@ -346,10 +344,26 @@ #define CH_USE_DYNAMIC TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Debug options. */ +/** + * @name Debug options + * @{ + */ /*===========================================================================*/ +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) || defined(__DOXYGEN__) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + /** * @brief Debug option, parameters checks. * @details If enabled then the checks on the API functions input @@ -423,8 +437,13 @@ #define CH_DBG_THREADS_PROFILING TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Kernel hooks. */ +/** + * @name Kernel hooks + * @{ + */ /*===========================================================================*/ /** @@ -495,6 +514,8 @@ } #endif +/** @} */ + /*===========================================================================*/ /* Port-specific settings (override port settings defaulted in chcore.h). */ /*===========================================================================*/ diff --git a/demos/ARMCM3-STM32L152-DISCOVERY/chconf.h b/demos/ARMCM3-STM32L152-DISCOVERY/chconf.h index c9c4c286a..6a365d96a 100644 --- a/demos/ARMCM3-STM32L152-DISCOVERY/chconf.h +++ b/demos/ARMCM3-STM32L152-DISCOVERY/chconf.h @@ -33,7 +33,10 @@ #define _CHCONF_H_ /*===========================================================================*/ -/* Kernel parameters. */ +/** + * @name Kernel parameters and options + * @{ + */ /*===========================================================================*/ /** @@ -60,21 +63,6 @@ #define CH_TIME_QUANTUM 20 #endif -/** - * @brief Nested locks. - * @details If enabled then the use of nested @p chSysLock() / @p chSysUnlock() - * operations is allowed.
- * For performance and code size reasons the recommended setting - * is to leave this option disabled.
- * You may use this option if you need to merge ChibiOS/RT with - * external libraries that require nested lock/unlock operations. - * - * @note The default is @p FALSE. - */ -#if !defined(CH_USE_NESTED_LOCKS) || defined(__DOXYGEN__) -#define CH_USE_NESTED_LOCKS FALSE -#endif - /** * @brief Managed RAM size. * @details Size of the RAM area to be managed by the OS. If set to zero @@ -107,8 +95,13 @@ #define CH_NO_IDLE_THREAD FALSE #endif +/** @} */ + /*===========================================================================*/ -/* Performance options. */ +/** + * @name Performance options + * @{ + */ /*===========================================================================*/ /** @@ -123,8 +116,13 @@ #define CH_OPTIMIZE_SPEED TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Subsystem options. */ +/** + * @name Subsystem options + * @{ + */ /*===========================================================================*/ /** @@ -346,10 +344,26 @@ #define CH_USE_DYNAMIC TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Debug options. */ +/** + * @name Debug options + * @{ + */ /*===========================================================================*/ +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) || defined(__DOXYGEN__) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + /** * @brief Debug option, parameters checks. * @details If enabled then the checks on the API functions input @@ -423,8 +437,13 @@ #define CH_DBG_THREADS_PROFILING TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Kernel hooks. */ +/** + * @name Kernel hooks + * @{ + */ /*===========================================================================*/ /** @@ -495,6 +514,8 @@ } #endif +/** @} */ + /*===========================================================================*/ /* Port-specific settings (override port settings defaulted in chcore.h). */ /*===========================================================================*/ diff --git a/demos/AVR-AT90CANx-GCC/chconf.h b/demos/AVR-AT90CANx-GCC/chconf.h index 15e938e53..cb22265a2 100644 --- a/demos/AVR-AT90CANx-GCC/chconf.h +++ b/demos/AVR-AT90CANx-GCC/chconf.h @@ -33,7 +33,10 @@ #define _CHCONF_H_ /*===========================================================================*/ -/* Kernel parameters. */ +/** + * @name Kernel parameters and options + * @{ + */ /*===========================================================================*/ /** @@ -60,21 +63,6 @@ #define CH_TIME_QUANTUM 20 #endif -/** - * @brief Nested locks. - * @details If enabled then the use of nested @p chSysLock() / @p chSysUnlock() - * operations is allowed.
- * For performance and code size reasons the recommended setting - * is to leave this option disabled.
- * You may use this option if you need to merge ChibiOS/RT with - * external libraries that require nested lock/unlock operations. - * - * @note The default is @p FALSE. - */ -#if !defined(CH_USE_NESTED_LOCKS) || defined(__DOXYGEN__) -#define CH_USE_NESTED_LOCKS FALSE -#endif - /** * @brief Managed RAM size. * @details Size of the RAM area to be managed by the OS. If set to zero @@ -107,8 +95,13 @@ #define CH_NO_IDLE_THREAD FALSE #endif +/** @} */ + /*===========================================================================*/ -/* Performance options. */ +/** + * @name Performance options + * @{ + */ /*===========================================================================*/ /** @@ -123,8 +116,13 @@ #define CH_OPTIMIZE_SPEED TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Subsystem options. */ +/** + * @name Subsystem options + * @{ + */ /*===========================================================================*/ /** @@ -346,10 +344,26 @@ #define CH_USE_DYNAMIC FALSE #endif +/** @} */ + /*===========================================================================*/ -/* Debug options. */ +/** + * @name Debug options + * @{ + */ /*===========================================================================*/ +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) || defined(__DOXYGEN__) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + /** * @brief Debug option, parameters checks. * @details If enabled then the checks on the API functions input @@ -423,8 +437,13 @@ #define CH_DBG_THREADS_PROFILING TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Kernel hooks. */ +/** + * @name Kernel hooks + * @{ + */ /*===========================================================================*/ /** @@ -495,6 +514,8 @@ } #endif +/** @} */ + /*===========================================================================*/ /* Port-specific settings (override port settings defaulted in chcore.h). */ /*===========================================================================*/ diff --git a/demos/AVR-ATmega128-GCC/chconf.h b/demos/AVR-ATmega128-GCC/chconf.h index 15e938e53..cb22265a2 100644 --- a/demos/AVR-ATmega128-GCC/chconf.h +++ b/demos/AVR-ATmega128-GCC/chconf.h @@ -33,7 +33,10 @@ #define _CHCONF_H_ /*===========================================================================*/ -/* Kernel parameters. */ +/** + * @name Kernel parameters and options + * @{ + */ /*===========================================================================*/ /** @@ -60,21 +63,6 @@ #define CH_TIME_QUANTUM 20 #endif -/** - * @brief Nested locks. - * @details If enabled then the use of nested @p chSysLock() / @p chSysUnlock() - * operations is allowed.
- * For performance and code size reasons the recommended setting - * is to leave this option disabled.
- * You may use this option if you need to merge ChibiOS/RT with - * external libraries that require nested lock/unlock operations. - * - * @note The default is @p FALSE. - */ -#if !defined(CH_USE_NESTED_LOCKS) || defined(__DOXYGEN__) -#define CH_USE_NESTED_LOCKS FALSE -#endif - /** * @brief Managed RAM size. * @details Size of the RAM area to be managed by the OS. If set to zero @@ -107,8 +95,13 @@ #define CH_NO_IDLE_THREAD FALSE #endif +/** @} */ + /*===========================================================================*/ -/* Performance options. */ +/** + * @name Performance options + * @{ + */ /*===========================================================================*/ /** @@ -123,8 +116,13 @@ #define CH_OPTIMIZE_SPEED TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Subsystem options. */ +/** + * @name Subsystem options + * @{ + */ /*===========================================================================*/ /** @@ -346,10 +344,26 @@ #define CH_USE_DYNAMIC FALSE #endif +/** @} */ + /*===========================================================================*/ -/* Debug options. */ +/** + * @name Debug options + * @{ + */ /*===========================================================================*/ +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) || defined(__DOXYGEN__) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + /** * @brief Debug option, parameters checks. * @details If enabled then the checks on the API functions input @@ -423,8 +437,13 @@ #define CH_DBG_THREADS_PROFILING TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Kernel hooks. */ +/** + * @name Kernel hooks + * @{ + */ /*===========================================================================*/ /** @@ -495,6 +514,8 @@ } #endif +/** @} */ + /*===========================================================================*/ /* Port-specific settings (override port settings defaulted in chcore.h). */ /*===========================================================================*/ diff --git a/demos/MSP430-MSP430x1611-GCC/chconf.h b/demos/MSP430-MSP430x1611-GCC/chconf.h index 59112cded..51b833cc2 100644 --- a/demos/MSP430-MSP430x1611-GCC/chconf.h +++ b/demos/MSP430-MSP430x1611-GCC/chconf.h @@ -33,7 +33,10 @@ #define _CHCONF_H_ /*===========================================================================*/ -/* Kernel parameters. */ +/** + * @name Kernel parameters and options + * @{ + */ /*===========================================================================*/ /** @@ -60,21 +63,6 @@ #define CH_TIME_QUANTUM 10 #endif -/** - * @brief Nested locks. - * @details If enabled then the use of nested @p chSysLock() / @p chSysUnlock() - * operations is allowed.
- * For performance and code size reasons the recommended setting - * is to leave this option disabled.
- * You may use this option if you need to merge ChibiOS/RT with - * external libraries that require nested lock/unlock operations. - * - * @note The default is @p FALSE. - */ -#if !defined(CH_USE_NESTED_LOCKS) || defined(__DOXYGEN__) -#define CH_USE_NESTED_LOCKS FALSE -#endif - /** * @brief Managed RAM size. * @details Size of the RAM area to be managed by the OS. If set to zero @@ -107,8 +95,13 @@ #define CH_NO_IDLE_THREAD FALSE #endif +/** @} */ + /*===========================================================================*/ -/* Performance options. */ +/** + * @name Performance options + * @{ + */ /*===========================================================================*/ /** @@ -123,8 +116,13 @@ #define CH_OPTIMIZE_SPEED TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Subsystem options. */ +/** + * @name Subsystem options + * @{ + */ /*===========================================================================*/ /** @@ -346,10 +344,26 @@ #define CH_USE_DYNAMIC TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Debug options. */ +/** + * @name Debug options + * @{ + */ /*===========================================================================*/ +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) || defined(__DOXYGEN__) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + /** * @brief Debug option, parameters checks. * @details If enabled then the checks on the API functions input @@ -423,8 +437,13 @@ #define CH_DBG_THREADS_PROFILING TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Kernel hooks. */ +/** + * @name Kernel hooks + * @{ + */ /*===========================================================================*/ /** @@ -495,6 +514,8 @@ } #endif +/** @} */ + /*===========================================================================*/ /* Port-specific settings (override port settings defaulted in chcore.h). */ /*===========================================================================*/ diff --git a/demos/PPC-SPC563-GCC/chconf.h b/demos/PPC-SPC563-GCC/chconf.h index c9c4c286a..6a365d96a 100644 --- a/demos/PPC-SPC563-GCC/chconf.h +++ b/demos/PPC-SPC563-GCC/chconf.h @@ -33,7 +33,10 @@ #define _CHCONF_H_ /*===========================================================================*/ -/* Kernel parameters. */ +/** + * @name Kernel parameters and options + * @{ + */ /*===========================================================================*/ /** @@ -60,21 +63,6 @@ #define CH_TIME_QUANTUM 20 #endif -/** - * @brief Nested locks. - * @details If enabled then the use of nested @p chSysLock() / @p chSysUnlock() - * operations is allowed.
- * For performance and code size reasons the recommended setting - * is to leave this option disabled.
- * You may use this option if you need to merge ChibiOS/RT with - * external libraries that require nested lock/unlock operations. - * - * @note The default is @p FALSE. - */ -#if !defined(CH_USE_NESTED_LOCKS) || defined(__DOXYGEN__) -#define CH_USE_NESTED_LOCKS FALSE -#endif - /** * @brief Managed RAM size. * @details Size of the RAM area to be managed by the OS. If set to zero @@ -107,8 +95,13 @@ #define CH_NO_IDLE_THREAD FALSE #endif +/** @} */ + /*===========================================================================*/ -/* Performance options. */ +/** + * @name Performance options + * @{ + */ /*===========================================================================*/ /** @@ -123,8 +116,13 @@ #define CH_OPTIMIZE_SPEED TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Subsystem options. */ +/** + * @name Subsystem options + * @{ + */ /*===========================================================================*/ /** @@ -346,10 +344,26 @@ #define CH_USE_DYNAMIC TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Debug options. */ +/** + * @name Debug options + * @{ + */ /*===========================================================================*/ +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) || defined(__DOXYGEN__) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + /** * @brief Debug option, parameters checks. * @details If enabled then the checks on the API functions input @@ -423,8 +437,13 @@ #define CH_DBG_THREADS_PROFILING TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Kernel hooks. */ +/** + * @name Kernel hooks + * @{ + */ /*===========================================================================*/ /** @@ -495,6 +514,8 @@ } #endif +/** @} */ + /*===========================================================================*/ /* Port-specific settings (override port settings defaulted in chcore.h). */ /*===========================================================================*/ diff --git a/demos/Posix-GCC/chconf.h b/demos/Posix-GCC/chconf.h index e571b2800..4572090b0 100644 --- a/demos/Posix-GCC/chconf.h +++ b/demos/Posix-GCC/chconf.h @@ -33,7 +33,10 @@ #define _CHCONF_H_ /*===========================================================================*/ -/* Kernel parameters. */ +/** + * @name Kernel parameters and options + * @{ + */ /*===========================================================================*/ /** @@ -60,21 +63,6 @@ #define CH_TIME_QUANTUM 20 #endif -/** - * @brief Nested locks. - * @details If enabled then the use of nested @p chSysLock() / @p chSysUnlock() - * operations is allowed.
- * For performance and code size reasons the recommended setting - * is to leave this option disabled.
- * You may use this option if you need to merge ChibiOS/RT with - * external libraries that require nested lock/unlock operations. - * - * @note The default is @p FALSE. - */ -#if !defined(CH_USE_NESTED_LOCKS) || defined(__DOXYGEN__) -#define CH_USE_NESTED_LOCKS FALSE -#endif - /** * @brief Managed RAM size. * @details Size of the RAM area to be managed by the OS. If set to zero @@ -107,8 +95,13 @@ #define CH_NO_IDLE_THREAD FALSE #endif +/** @} */ + /*===========================================================================*/ -/* Performance options. */ +/** + * @name Performance options + * @{ + */ /*===========================================================================*/ /** @@ -123,8 +116,13 @@ #define CH_OPTIMIZE_SPEED TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Subsystem options. */ +/** + * @name Subsystem options + * @{ + */ /*===========================================================================*/ /** @@ -346,10 +344,26 @@ #define CH_USE_DYNAMIC TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Debug options. */ +/** + * @name Debug options + * @{ + */ /*===========================================================================*/ +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) || defined(__DOXYGEN__) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + /** * @brief Debug option, parameters checks. * @details If enabled then the checks on the API functions input @@ -423,8 +437,13 @@ #define CH_DBG_THREADS_PROFILING TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Kernel hooks. */ +/** + * @name Kernel hooks + * @{ + */ /*===========================================================================*/ /** @@ -495,6 +514,8 @@ } #endif +/** @} */ + /*===========================================================================*/ /* Port-specific settings (override port settings defaulted in chcore.h). */ /*===========================================================================*/ diff --git a/demos/STM8L-STM8L152-DISCOVERY-STVD/demo/chconf.h b/demos/STM8L-STM8L152-DISCOVERY-STVD/demo/chconf.h index cd12e6e2b..d7a106c5b 100644 --- a/demos/STM8L-STM8L152-DISCOVERY-STVD/demo/chconf.h +++ b/demos/STM8L-STM8L152-DISCOVERY-STVD/demo/chconf.h @@ -33,7 +33,10 @@ #define _CHCONF_H_ /*===========================================================================*/ -/* Kernel parameters. */ +/** + * @name Kernel parameters and options + * @{ + */ /*===========================================================================*/ /** @@ -60,21 +63,6 @@ #define CH_TIME_QUANTUM 10 #endif -/** - * @brief Nested locks. - * @details If enabled then the use of nested @p chSysLock() / @p chSysUnlock() - * operations is allowed.
- * For performance and code size reasons the recommended setting - * is to leave this option disabled.
- * You may use this option if you need to merge ChibiOS/RT with - * external libraries that require nested lock/unlock operations. - * - * @note The default is @p FALSE. - */ -#if !defined(CH_USE_NESTED_LOCKS) || defined(__DOXYGEN__) -#define CH_USE_NESTED_LOCKS FALSE -#endif - /** * @brief Managed RAM size. * @details Size of the RAM area to be managed by the OS. If set to zero @@ -107,8 +95,13 @@ #define CH_NO_IDLE_THREAD FALSE #endif +/** @} */ + /*===========================================================================*/ -/* Performance options. */ +/** + * @name Performance options + * @{ + */ /*===========================================================================*/ /** @@ -123,8 +116,13 @@ #define CH_OPTIMIZE_SPEED FALSE #endif +/** @} */ + /*===========================================================================*/ -/* Subsystem options. */ +/** + * @name Subsystem options + * @{ + */ /*===========================================================================*/ /** @@ -346,10 +344,26 @@ #define CH_USE_DYNAMIC TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Debug options. */ +/** + * @name Debug options + * @{ + */ /*===========================================================================*/ +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) || defined(__DOXYGEN__) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + /** * @brief Debug option, parameters checks. * @details If enabled then the checks on the API functions input @@ -423,8 +437,13 @@ #define CH_DBG_THREADS_PROFILING TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Kernel hooks. */ +/** + * @name Kernel hooks + * @{ + */ /*===========================================================================*/ /** @@ -495,6 +514,8 @@ } #endif +/** @} */ + /*===========================================================================*/ /* Port-specific settings (override port settings defaulted in chcore.h). */ /*===========================================================================*/ diff --git a/demos/STM8S-STM8S105-DISCOVERY-STVD/demo/chconf.h b/demos/STM8S-STM8S105-DISCOVERY-STVD/demo/chconf.h index cd12e6e2b..d7a106c5b 100644 --- a/demos/STM8S-STM8S105-DISCOVERY-STVD/demo/chconf.h +++ b/demos/STM8S-STM8S105-DISCOVERY-STVD/demo/chconf.h @@ -33,7 +33,10 @@ #define _CHCONF_H_ /*===========================================================================*/ -/* Kernel parameters. */ +/** + * @name Kernel parameters and options + * @{ + */ /*===========================================================================*/ /** @@ -60,21 +63,6 @@ #define CH_TIME_QUANTUM 10 #endif -/** - * @brief Nested locks. - * @details If enabled then the use of nested @p chSysLock() / @p chSysUnlock() - * operations is allowed.
- * For performance and code size reasons the recommended setting - * is to leave this option disabled.
- * You may use this option if you need to merge ChibiOS/RT with - * external libraries that require nested lock/unlock operations. - * - * @note The default is @p FALSE. - */ -#if !defined(CH_USE_NESTED_LOCKS) || defined(__DOXYGEN__) -#define CH_USE_NESTED_LOCKS FALSE -#endif - /** * @brief Managed RAM size. * @details Size of the RAM area to be managed by the OS. If set to zero @@ -107,8 +95,13 @@ #define CH_NO_IDLE_THREAD FALSE #endif +/** @} */ + /*===========================================================================*/ -/* Performance options. */ +/** + * @name Performance options + * @{ + */ /*===========================================================================*/ /** @@ -123,8 +116,13 @@ #define CH_OPTIMIZE_SPEED FALSE #endif +/** @} */ + /*===========================================================================*/ -/* Subsystem options. */ +/** + * @name Subsystem options + * @{ + */ /*===========================================================================*/ /** @@ -346,10 +344,26 @@ #define CH_USE_DYNAMIC TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Debug options. */ +/** + * @name Debug options + * @{ + */ /*===========================================================================*/ +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) || defined(__DOXYGEN__) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + /** * @brief Debug option, parameters checks. * @details If enabled then the checks on the API functions input @@ -423,8 +437,13 @@ #define CH_DBG_THREADS_PROFILING TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Kernel hooks. */ +/** + * @name Kernel hooks + * @{ + */ /*===========================================================================*/ /** @@ -495,6 +514,8 @@ } #endif +/** @} */ + /*===========================================================================*/ /* Port-specific settings (override port settings defaulted in chcore.h). */ /*===========================================================================*/ diff --git a/demos/STM8S-STM8S208-RC/chconf.h b/demos/STM8S-STM8S208-RC/chconf.h index cd12e6e2b..d7a106c5b 100644 --- a/demos/STM8S-STM8S208-RC/chconf.h +++ b/demos/STM8S-STM8S208-RC/chconf.h @@ -33,7 +33,10 @@ #define _CHCONF_H_ /*===========================================================================*/ -/* Kernel parameters. */ +/** + * @name Kernel parameters and options + * @{ + */ /*===========================================================================*/ /** @@ -60,21 +63,6 @@ #define CH_TIME_QUANTUM 10 #endif -/** - * @brief Nested locks. - * @details If enabled then the use of nested @p chSysLock() / @p chSysUnlock() - * operations is allowed.
- * For performance and code size reasons the recommended setting - * is to leave this option disabled.
- * You may use this option if you need to merge ChibiOS/RT with - * external libraries that require nested lock/unlock operations. - * - * @note The default is @p FALSE. - */ -#if !defined(CH_USE_NESTED_LOCKS) || defined(__DOXYGEN__) -#define CH_USE_NESTED_LOCKS FALSE -#endif - /** * @brief Managed RAM size. * @details Size of the RAM area to be managed by the OS. If set to zero @@ -107,8 +95,13 @@ #define CH_NO_IDLE_THREAD FALSE #endif +/** @} */ + /*===========================================================================*/ -/* Performance options. */ +/** + * @name Performance options + * @{ + */ /*===========================================================================*/ /** @@ -123,8 +116,13 @@ #define CH_OPTIMIZE_SPEED FALSE #endif +/** @} */ + /*===========================================================================*/ -/* Subsystem options. */ +/** + * @name Subsystem options + * @{ + */ /*===========================================================================*/ /** @@ -346,10 +344,26 @@ #define CH_USE_DYNAMIC TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Debug options. */ +/** + * @name Debug options + * @{ + */ /*===========================================================================*/ +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) || defined(__DOXYGEN__) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + /** * @brief Debug option, parameters checks. * @details If enabled then the checks on the API functions input @@ -423,8 +437,13 @@ #define CH_DBG_THREADS_PROFILING TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Kernel hooks. */ +/** + * @name Kernel hooks + * @{ + */ /*===========================================================================*/ /** @@ -495,6 +514,8 @@ } #endif +/** @} */ + /*===========================================================================*/ /* Port-specific settings (override port settings defaulted in chcore.h). */ /*===========================================================================*/ diff --git a/demos/Win32-MinGW/chconf.h b/demos/Win32-MinGW/chconf.h index e571b2800..4572090b0 100644 --- a/demos/Win32-MinGW/chconf.h +++ b/demos/Win32-MinGW/chconf.h @@ -33,7 +33,10 @@ #define _CHCONF_H_ /*===========================================================================*/ -/* Kernel parameters. */ +/** + * @name Kernel parameters and options + * @{ + */ /*===========================================================================*/ /** @@ -60,21 +63,6 @@ #define CH_TIME_QUANTUM 20 #endif -/** - * @brief Nested locks. - * @details If enabled then the use of nested @p chSysLock() / @p chSysUnlock() - * operations is allowed.
- * For performance and code size reasons the recommended setting - * is to leave this option disabled.
- * You may use this option if you need to merge ChibiOS/RT with - * external libraries that require nested lock/unlock operations. - * - * @note The default is @p FALSE. - */ -#if !defined(CH_USE_NESTED_LOCKS) || defined(__DOXYGEN__) -#define CH_USE_NESTED_LOCKS FALSE -#endif - /** * @brief Managed RAM size. * @details Size of the RAM area to be managed by the OS. If set to zero @@ -107,8 +95,13 @@ #define CH_NO_IDLE_THREAD FALSE #endif +/** @} */ + /*===========================================================================*/ -/* Performance options. */ +/** + * @name Performance options + * @{ + */ /*===========================================================================*/ /** @@ -123,8 +116,13 @@ #define CH_OPTIMIZE_SPEED TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Subsystem options. */ +/** + * @name Subsystem options + * @{ + */ /*===========================================================================*/ /** @@ -346,10 +344,26 @@ #define CH_USE_DYNAMIC TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Debug options. */ +/** + * @name Debug options + * @{ + */ /*===========================================================================*/ +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) || defined(__DOXYGEN__) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + /** * @brief Debug option, parameters checks. * @details If enabled then the checks on the API functions input @@ -423,8 +437,13 @@ #define CH_DBG_THREADS_PROFILING TRUE #endif +/** @} */ + /*===========================================================================*/ -/* Kernel hooks. */ +/** + * @name Kernel hooks + * @{ + */ /*===========================================================================*/ /** @@ -495,6 +514,8 @@ } #endif +/** @} */ + /*===========================================================================*/ /* Port-specific settings (override port settings defaulted in chcore.h). */ /*===========================================================================*/ -- cgit v1.2.3 From 43752ee8d132fc57028a9ff15156c5bfcd81c013 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Fri, 12 Aug 2011 11:10:19 +0000 Subject: Extended state check to all kernel I-class and s-class APIs, corrected some test cases where call protocol rules were not strictly observerd. No the whole test suite pass with the state checker enabled. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3223 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- demos/ARMCM3-STM32F103/chconf.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'demos') diff --git a/demos/ARMCM3-STM32F103/chconf.h b/demos/ARMCM3-STM32F103/chconf.h index 6a365d96a..eb4087969 100644 --- a/demos/ARMCM3-STM32F103/chconf.h +++ b/demos/ARMCM3-STM32F103/chconf.h @@ -361,7 +361,7 @@ * @note The default is @p FALSE. */ #if !defined(CH_DBG_SYSTEM_STATE_CHECK) || defined(__DOXYGEN__) -#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#define CH_DBG_SYSTEM_STATE_CHECK TRUE #endif /** @@ -372,7 +372,7 @@ * @note The default is @p FALSE. */ #if !defined(CH_DBG_ENABLE_CHECKS) || defined(__DOXYGEN__) -#define CH_DBG_ENABLE_CHECKS FALSE +#define CH_DBG_ENABLE_CHECKS TRUE #endif /** @@ -384,7 +384,7 @@ * @note The default is @p FALSE. */ #if !defined(CH_DBG_ENABLE_ASSERTS) || defined(__DOXYGEN__) -#define CH_DBG_ENABLE_ASSERTS FALSE +#define CH_DBG_ENABLE_ASSERTS TRUE #endif /** @@ -395,7 +395,7 @@ * @note The default is @p FALSE. */ #if !defined(CH_DBG_ENABLE_TRACE) || defined(__DOXYGEN__) -#define CH_DBG_ENABLE_TRACE FALSE +#define CH_DBG_ENABLE_TRACE TRUE #endif /** @@ -409,7 +409,7 @@ * @p panic_msg variable set to @p NULL. */ #if !defined(CH_DBG_ENABLE_STACK_CHECK) || defined(__DOXYGEN__) -#define CH_DBG_ENABLE_STACK_CHECK FALSE +#define CH_DBG_ENABLE_STACK_CHECK TRUE #endif /** @@ -421,7 +421,7 @@ * @note The default is @p FALSE. */ #if !defined(CH_DBG_FILL_THREADS) || defined(__DOXYGEN__) -#define CH_DBG_FILL_THREADS FALSE +#define CH_DBG_FILL_THREADS TRUE #endif /** -- cgit v1.2.3 From 978e34eed2ed391f57b25e007b63f2938f8af0f6 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sat, 13 Aug 2011 12:32:10 +0000 Subject: System state check verified in ARM GCC port. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3225 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- demos/ARM7-LPC214x-GCC/chconf.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'demos') diff --git a/demos/ARM7-LPC214x-GCC/chconf.h b/demos/ARM7-LPC214x-GCC/chconf.h index 6a365d96a..eb4087969 100644 --- a/demos/ARM7-LPC214x-GCC/chconf.h +++ b/demos/ARM7-LPC214x-GCC/chconf.h @@ -361,7 +361,7 @@ * @note The default is @p FALSE. */ #if !defined(CH_DBG_SYSTEM_STATE_CHECK) || defined(__DOXYGEN__) -#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#define CH_DBG_SYSTEM_STATE_CHECK TRUE #endif /** @@ -372,7 +372,7 @@ * @note The default is @p FALSE. */ #if !defined(CH_DBG_ENABLE_CHECKS) || defined(__DOXYGEN__) -#define CH_DBG_ENABLE_CHECKS FALSE +#define CH_DBG_ENABLE_CHECKS TRUE #endif /** @@ -384,7 +384,7 @@ * @note The default is @p FALSE. */ #if !defined(CH_DBG_ENABLE_ASSERTS) || defined(__DOXYGEN__) -#define CH_DBG_ENABLE_ASSERTS FALSE +#define CH_DBG_ENABLE_ASSERTS TRUE #endif /** @@ -395,7 +395,7 @@ * @note The default is @p FALSE. */ #if !defined(CH_DBG_ENABLE_TRACE) || defined(__DOXYGEN__) -#define CH_DBG_ENABLE_TRACE FALSE +#define CH_DBG_ENABLE_TRACE TRUE #endif /** @@ -409,7 +409,7 @@ * @p panic_msg variable set to @p NULL. */ #if !defined(CH_DBG_ENABLE_STACK_CHECK) || defined(__DOXYGEN__) -#define CH_DBG_ENABLE_STACK_CHECK FALSE +#define CH_DBG_ENABLE_STACK_CHECK TRUE #endif /** @@ -421,7 +421,7 @@ * @note The default is @p FALSE. */ #if !defined(CH_DBG_FILL_THREADS) || defined(__DOXYGEN__) -#define CH_DBG_FILL_THREADS FALSE +#define CH_DBG_FILL_THREADS TRUE #endif /** -- cgit v1.2.3 From 5cee2c08d787d1b14c62d5595b72644a773fe443 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sat, 13 Aug 2011 15:40:57 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3226 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- demos/ARM7-AT91SAM7S-FATFS-GCC/chconf.h | 10 ++++++++++ demos/ARM7-AT91SAM7S-GCC/chconf.h | 10 ++++++++++ demos/ARM7-AT91SAM7X-FATFS-GCC/chconf.h | 10 ++++++++++ demos/ARM7-AT91SAM7X-GCC/chconf.h | 10 ++++++++++ demos/ARM7-AT91SAM7X-LWIP-GCC/chconf.h | 10 ++++++++++ demos/ARM7-AT91SAM7X-UIP-GCC/chconf.h | 10 ++++++++++ demos/ARM7-LPC214x-FATFS-GCC/chconf.h | 10 ++++++++++ demos/ARM7-LPC214x-G++/chconf.h | 10 ++++++++++ demos/ARM7-LPC214x-GCC/chconf.h | 10 ++++++++++ demos/ARMCM0-LPC1114-LPCXPRESSO/chconf.h | 10 ++++++++++ demos/ARMCM3-LPC1343-LPCXPRESSO/chconf.h | 10 ++++++++++ demos/ARMCM3-STM32F100-DISCOVERY/chconf.h | 10 ++++++++++ demos/ARMCM3-STM32F103-FATFS/chconf.h | 10 ++++++++++ demos/ARMCM3-STM32F103-G++/chconf.h | 10 ++++++++++ demos/ARMCM3-STM32F103/chconf.h | 10 ++++++++++ demos/ARMCM3-STM32F103ZG-FATFS/chconf.h | 10 ++++++++++ demos/ARMCM3-STM32F107/chconf.h | 10 ++++++++++ demos/ARMCM3-STM32L152-DISCOVERY/chconf.h | 10 ++++++++++ demos/AVR-AT90CANx-GCC/chconf.h | 10 ++++++++++ demos/AVR-ATmega128-GCC/chconf.h | 10 ++++++++++ demos/MSP430-MSP430x1611-GCC/chconf.h | 10 ++++++++++ demos/PPC-SPC563-GCC/chconf.h | 10 ++++++++++ demos/Posix-GCC/chconf.h | 11 +++++++++++ demos/STM8L-STM8L152-DISCOVERY-STVD/demo/chconf.h | 10 ++++++++++ demos/STM8S-STM8S105-DISCOVERY-STVD/demo/chconf.h | 10 ++++++++++ demos/STM8S-STM8S208-RC/chconf.h | 10 ++++++++++ demos/Win32-MinGW/chconf.h | 11 +++++++++++ 27 files changed, 272 insertions(+) (limited to 'demos') diff --git a/demos/ARM7-AT91SAM7S-FATFS-GCC/chconf.h b/demos/ARM7-AT91SAM7S-FATFS-GCC/chconf.h index 6a365d96a..9dd831c96 100644 --- a/demos/ARM7-AT91SAM7S-FATFS-GCC/chconf.h +++ b/demos/ARM7-AT91SAM7S-FATFS-GCC/chconf.h @@ -482,6 +482,16 @@ } #endif +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#if !defined(THREAD_CONTEXT_SWITCH_HOOK) || defined(__DOXYGEN__) +#define THREAD_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* System halt code here.*/ \ +} +#endif + /** * @brief Idle Loop hook. * @details This hook is continuously invoked by the idle thread loop. diff --git a/demos/ARM7-AT91SAM7S-GCC/chconf.h b/demos/ARM7-AT91SAM7S-GCC/chconf.h index 6a365d96a..9dd831c96 100644 --- a/demos/ARM7-AT91SAM7S-GCC/chconf.h +++ b/demos/ARM7-AT91SAM7S-GCC/chconf.h @@ -482,6 +482,16 @@ } #endif +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#if !defined(THREAD_CONTEXT_SWITCH_HOOK) || defined(__DOXYGEN__) +#define THREAD_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* System halt code here.*/ \ +} +#endif + /** * @brief Idle Loop hook. * @details This hook is continuously invoked by the idle thread loop. diff --git a/demos/ARM7-AT91SAM7X-FATFS-GCC/chconf.h b/demos/ARM7-AT91SAM7X-FATFS-GCC/chconf.h index 6a365d96a..9dd831c96 100644 --- a/demos/ARM7-AT91SAM7X-FATFS-GCC/chconf.h +++ b/demos/ARM7-AT91SAM7X-FATFS-GCC/chconf.h @@ -482,6 +482,16 @@ } #endif +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#if !defined(THREAD_CONTEXT_SWITCH_HOOK) || defined(__DOXYGEN__) +#define THREAD_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* System halt code here.*/ \ +} +#endif + /** * @brief Idle Loop hook. * @details This hook is continuously invoked by the idle thread loop. diff --git a/demos/ARM7-AT91SAM7X-GCC/chconf.h b/demos/ARM7-AT91SAM7X-GCC/chconf.h index 6a365d96a..9dd831c96 100644 --- a/demos/ARM7-AT91SAM7X-GCC/chconf.h +++ b/demos/ARM7-AT91SAM7X-GCC/chconf.h @@ -482,6 +482,16 @@ } #endif +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#if !defined(THREAD_CONTEXT_SWITCH_HOOK) || defined(__DOXYGEN__) +#define THREAD_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* System halt code here.*/ \ +} +#endif + /** * @brief Idle Loop hook. * @details This hook is continuously invoked by the idle thread loop. diff --git a/demos/ARM7-AT91SAM7X-LWIP-GCC/chconf.h b/demos/ARM7-AT91SAM7X-LWIP-GCC/chconf.h index 6a365d96a..9dd831c96 100644 --- a/demos/ARM7-AT91SAM7X-LWIP-GCC/chconf.h +++ b/demos/ARM7-AT91SAM7X-LWIP-GCC/chconf.h @@ -482,6 +482,16 @@ } #endif +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#if !defined(THREAD_CONTEXT_SWITCH_HOOK) || defined(__DOXYGEN__) +#define THREAD_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* System halt code here.*/ \ +} +#endif + /** * @brief Idle Loop hook. * @details This hook is continuously invoked by the idle thread loop. diff --git a/demos/ARM7-AT91SAM7X-UIP-GCC/chconf.h b/demos/ARM7-AT91SAM7X-UIP-GCC/chconf.h index 6a365d96a..9dd831c96 100644 --- a/demos/ARM7-AT91SAM7X-UIP-GCC/chconf.h +++ b/demos/ARM7-AT91SAM7X-UIP-GCC/chconf.h @@ -482,6 +482,16 @@ } #endif +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#if !defined(THREAD_CONTEXT_SWITCH_HOOK) || defined(__DOXYGEN__) +#define THREAD_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* System halt code here.*/ \ +} +#endif + /** * @brief Idle Loop hook. * @details This hook is continuously invoked by the idle thread loop. diff --git a/demos/ARM7-LPC214x-FATFS-GCC/chconf.h b/demos/ARM7-LPC214x-FATFS-GCC/chconf.h index 6a365d96a..9dd831c96 100644 --- a/demos/ARM7-LPC214x-FATFS-GCC/chconf.h +++ b/demos/ARM7-LPC214x-FATFS-GCC/chconf.h @@ -482,6 +482,16 @@ } #endif +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#if !defined(THREAD_CONTEXT_SWITCH_HOOK) || defined(__DOXYGEN__) +#define THREAD_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* System halt code here.*/ \ +} +#endif + /** * @brief Idle Loop hook. * @details This hook is continuously invoked by the idle thread loop. diff --git a/demos/ARM7-LPC214x-G++/chconf.h b/demos/ARM7-LPC214x-G++/chconf.h index 6a365d96a..9dd831c96 100644 --- a/demos/ARM7-LPC214x-G++/chconf.h +++ b/demos/ARM7-LPC214x-G++/chconf.h @@ -482,6 +482,16 @@ } #endif +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#if !defined(THREAD_CONTEXT_SWITCH_HOOK) || defined(__DOXYGEN__) +#define THREAD_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* System halt code here.*/ \ +} +#endif + /** * @brief Idle Loop hook. * @details This hook is continuously invoked by the idle thread loop. diff --git a/demos/ARM7-LPC214x-GCC/chconf.h b/demos/ARM7-LPC214x-GCC/chconf.h index eb4087969..a5d129956 100644 --- a/demos/ARM7-LPC214x-GCC/chconf.h +++ b/demos/ARM7-LPC214x-GCC/chconf.h @@ -482,6 +482,16 @@ } #endif +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#if !defined(THREAD_CONTEXT_SWITCH_HOOK) || defined(__DOXYGEN__) +#define THREAD_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* System halt code here.*/ \ +} +#endif + /** * @brief Idle Loop hook. * @details This hook is continuously invoked by the idle thread loop. diff --git a/demos/ARMCM0-LPC1114-LPCXPRESSO/chconf.h b/demos/ARMCM0-LPC1114-LPCXPRESSO/chconf.h index 6a365d96a..9dd831c96 100644 --- a/demos/ARMCM0-LPC1114-LPCXPRESSO/chconf.h +++ b/demos/ARMCM0-LPC1114-LPCXPRESSO/chconf.h @@ -482,6 +482,16 @@ } #endif +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#if !defined(THREAD_CONTEXT_SWITCH_HOOK) || defined(__DOXYGEN__) +#define THREAD_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* System halt code here.*/ \ +} +#endif + /** * @brief Idle Loop hook. * @details This hook is continuously invoked by the idle thread loop. diff --git a/demos/ARMCM3-LPC1343-LPCXPRESSO/chconf.h b/demos/ARMCM3-LPC1343-LPCXPRESSO/chconf.h index 6a365d96a..9dd831c96 100644 --- a/demos/ARMCM3-LPC1343-LPCXPRESSO/chconf.h +++ b/demos/ARMCM3-LPC1343-LPCXPRESSO/chconf.h @@ -482,6 +482,16 @@ } #endif +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#if !defined(THREAD_CONTEXT_SWITCH_HOOK) || defined(__DOXYGEN__) +#define THREAD_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* System halt code here.*/ \ +} +#endif + /** * @brief Idle Loop hook. * @details This hook is continuously invoked by the idle thread loop. diff --git a/demos/ARMCM3-STM32F100-DISCOVERY/chconf.h b/demos/ARMCM3-STM32F100-DISCOVERY/chconf.h index 6a365d96a..9dd831c96 100644 --- a/demos/ARMCM3-STM32F100-DISCOVERY/chconf.h +++ b/demos/ARMCM3-STM32F100-DISCOVERY/chconf.h @@ -482,6 +482,16 @@ } #endif +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#if !defined(THREAD_CONTEXT_SWITCH_HOOK) || defined(__DOXYGEN__) +#define THREAD_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* System halt code here.*/ \ +} +#endif + /** * @brief Idle Loop hook. * @details This hook is continuously invoked by the idle thread loop. diff --git a/demos/ARMCM3-STM32F103-FATFS/chconf.h b/demos/ARMCM3-STM32F103-FATFS/chconf.h index 6a365d96a..9dd831c96 100644 --- a/demos/ARMCM3-STM32F103-FATFS/chconf.h +++ b/demos/ARMCM3-STM32F103-FATFS/chconf.h @@ -482,6 +482,16 @@ } #endif +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#if !defined(THREAD_CONTEXT_SWITCH_HOOK) || defined(__DOXYGEN__) +#define THREAD_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* System halt code here.*/ \ +} +#endif + /** * @brief Idle Loop hook. * @details This hook is continuously invoked by the idle thread loop. diff --git a/demos/ARMCM3-STM32F103-G++/chconf.h b/demos/ARMCM3-STM32F103-G++/chconf.h index 6a365d96a..9dd831c96 100644 --- a/demos/ARMCM3-STM32F103-G++/chconf.h +++ b/demos/ARMCM3-STM32F103-G++/chconf.h @@ -482,6 +482,16 @@ } #endif +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#if !defined(THREAD_CONTEXT_SWITCH_HOOK) || defined(__DOXYGEN__) +#define THREAD_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* System halt code here.*/ \ +} +#endif + /** * @brief Idle Loop hook. * @details This hook is continuously invoked by the idle thread loop. diff --git a/demos/ARMCM3-STM32F103/chconf.h b/demos/ARMCM3-STM32F103/chconf.h index eb4087969..a5d129956 100644 --- a/demos/ARMCM3-STM32F103/chconf.h +++ b/demos/ARMCM3-STM32F103/chconf.h @@ -482,6 +482,16 @@ } #endif +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#if !defined(THREAD_CONTEXT_SWITCH_HOOK) || defined(__DOXYGEN__) +#define THREAD_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* System halt code here.*/ \ +} +#endif + /** * @brief Idle Loop hook. * @details This hook is continuously invoked by the idle thread loop. diff --git a/demos/ARMCM3-STM32F103ZG-FATFS/chconf.h b/demos/ARMCM3-STM32F103ZG-FATFS/chconf.h index 6a365d96a..9dd831c96 100644 --- a/demos/ARMCM3-STM32F103ZG-FATFS/chconf.h +++ b/demos/ARMCM3-STM32F103ZG-FATFS/chconf.h @@ -482,6 +482,16 @@ } #endif +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#if !defined(THREAD_CONTEXT_SWITCH_HOOK) || defined(__DOXYGEN__) +#define THREAD_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* System halt code here.*/ \ +} +#endif + /** * @brief Idle Loop hook. * @details This hook is continuously invoked by the idle thread loop. diff --git a/demos/ARMCM3-STM32F107/chconf.h b/demos/ARMCM3-STM32F107/chconf.h index 6a365d96a..9dd831c96 100644 --- a/demos/ARMCM3-STM32F107/chconf.h +++ b/demos/ARMCM3-STM32F107/chconf.h @@ -482,6 +482,16 @@ } #endif +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#if !defined(THREAD_CONTEXT_SWITCH_HOOK) || defined(__DOXYGEN__) +#define THREAD_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* System halt code here.*/ \ +} +#endif + /** * @brief Idle Loop hook. * @details This hook is continuously invoked by the idle thread loop. diff --git a/demos/ARMCM3-STM32L152-DISCOVERY/chconf.h b/demos/ARMCM3-STM32L152-DISCOVERY/chconf.h index 6a365d96a..9dd831c96 100644 --- a/demos/ARMCM3-STM32L152-DISCOVERY/chconf.h +++ b/demos/ARMCM3-STM32L152-DISCOVERY/chconf.h @@ -482,6 +482,16 @@ } #endif +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#if !defined(THREAD_CONTEXT_SWITCH_HOOK) || defined(__DOXYGEN__) +#define THREAD_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* System halt code here.*/ \ +} +#endif + /** * @brief Idle Loop hook. * @details This hook is continuously invoked by the idle thread loop. diff --git a/demos/AVR-AT90CANx-GCC/chconf.h b/demos/AVR-AT90CANx-GCC/chconf.h index cb22265a2..7a50c5b5a 100644 --- a/demos/AVR-AT90CANx-GCC/chconf.h +++ b/demos/AVR-AT90CANx-GCC/chconf.h @@ -482,6 +482,16 @@ } #endif +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#if !defined(THREAD_CONTEXT_SWITCH_HOOK) || defined(__DOXYGEN__) +#define THREAD_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* System halt code here.*/ \ +} +#endif + /** * @brief Idle Loop hook. * @details This hook is continuously invoked by the idle thread loop. diff --git a/demos/AVR-ATmega128-GCC/chconf.h b/demos/AVR-ATmega128-GCC/chconf.h index cb22265a2..7a50c5b5a 100644 --- a/demos/AVR-ATmega128-GCC/chconf.h +++ b/demos/AVR-ATmega128-GCC/chconf.h @@ -482,6 +482,16 @@ } #endif +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#if !defined(THREAD_CONTEXT_SWITCH_HOOK) || defined(__DOXYGEN__) +#define THREAD_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* System halt code here.*/ \ +} +#endif + /** * @brief Idle Loop hook. * @details This hook is continuously invoked by the idle thread loop. diff --git a/demos/MSP430-MSP430x1611-GCC/chconf.h b/demos/MSP430-MSP430x1611-GCC/chconf.h index 51b833cc2..058dd1cb3 100644 --- a/demos/MSP430-MSP430x1611-GCC/chconf.h +++ b/demos/MSP430-MSP430x1611-GCC/chconf.h @@ -482,6 +482,16 @@ } #endif +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#if !defined(THREAD_CONTEXT_SWITCH_HOOK) || defined(__DOXYGEN__) +#define THREAD_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* System halt code here.*/ \ +} +#endif + /** * @brief Idle Loop hook. * @details This hook is continuously invoked by the idle thread loop. diff --git a/demos/PPC-SPC563-GCC/chconf.h b/demos/PPC-SPC563-GCC/chconf.h index 6a365d96a..9dd831c96 100644 --- a/demos/PPC-SPC563-GCC/chconf.h +++ b/demos/PPC-SPC563-GCC/chconf.h @@ -482,6 +482,16 @@ } #endif +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#if !defined(THREAD_CONTEXT_SWITCH_HOOK) || defined(__DOXYGEN__) +#define THREAD_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* System halt code here.*/ \ +} +#endif + /** * @brief Idle Loop hook. * @details This hook is continuously invoked by the idle thread loop. diff --git a/demos/Posix-GCC/chconf.h b/demos/Posix-GCC/chconf.h index 4572090b0..fa22f7210 100644 --- a/demos/Posix-GCC/chconf.h +++ b/demos/Posix-GCC/chconf.h @@ -482,6 +482,16 @@ } #endif +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#if !defined(THREAD_CONTEXT_SWITCH_HOOK) || defined(__DOXYGEN__) +#define THREAD_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* System halt code here.*/ \ +} +#endif + /** * @brief Idle Loop hook. * @details This hook is continuously invoked by the idle thread loop. @@ -503,6 +513,7 @@ } #endif + /** * @brief System halt hook. * @details This hook is invoked in case to a system halting error before diff --git a/demos/STM8L-STM8L152-DISCOVERY-STVD/demo/chconf.h b/demos/STM8L-STM8L152-DISCOVERY-STVD/demo/chconf.h index d7a106c5b..c004cf310 100644 --- a/demos/STM8L-STM8L152-DISCOVERY-STVD/demo/chconf.h +++ b/demos/STM8L-STM8L152-DISCOVERY-STVD/demo/chconf.h @@ -482,6 +482,16 @@ } #endif +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#if !defined(THREAD_CONTEXT_SWITCH_HOOK) || defined(__DOXYGEN__) +#define THREAD_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* System halt code here.*/ \ +} +#endif + /** * @brief Idle Loop hook. * @details This hook is continuously invoked by the idle thread loop. diff --git a/demos/STM8S-STM8S105-DISCOVERY-STVD/demo/chconf.h b/demos/STM8S-STM8S105-DISCOVERY-STVD/demo/chconf.h index d7a106c5b..c004cf310 100644 --- a/demos/STM8S-STM8S105-DISCOVERY-STVD/demo/chconf.h +++ b/demos/STM8S-STM8S105-DISCOVERY-STVD/demo/chconf.h @@ -482,6 +482,16 @@ } #endif +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#if !defined(THREAD_CONTEXT_SWITCH_HOOK) || defined(__DOXYGEN__) +#define THREAD_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* System halt code here.*/ \ +} +#endif + /** * @brief Idle Loop hook. * @details This hook is continuously invoked by the idle thread loop. diff --git a/demos/STM8S-STM8S208-RC/chconf.h b/demos/STM8S-STM8S208-RC/chconf.h index d7a106c5b..c004cf310 100644 --- a/demos/STM8S-STM8S208-RC/chconf.h +++ b/demos/STM8S-STM8S208-RC/chconf.h @@ -482,6 +482,16 @@ } #endif +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#if !defined(THREAD_CONTEXT_SWITCH_HOOK) || defined(__DOXYGEN__) +#define THREAD_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* System halt code here.*/ \ +} +#endif + /** * @brief Idle Loop hook. * @details This hook is continuously invoked by the idle thread loop. diff --git a/demos/Win32-MinGW/chconf.h b/demos/Win32-MinGW/chconf.h index 4572090b0..fa22f7210 100644 --- a/demos/Win32-MinGW/chconf.h +++ b/demos/Win32-MinGW/chconf.h @@ -482,6 +482,16 @@ } #endif +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#if !defined(THREAD_CONTEXT_SWITCH_HOOK) || defined(__DOXYGEN__) +#define THREAD_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* System halt code here.*/ \ +} +#endif + /** * @brief Idle Loop hook. * @details This hook is continuously invoked by the idle thread loop. @@ -503,6 +513,7 @@ } #endif + /** * @brief System halt hook. * @details This hook is invoked in case to a system halting error before -- cgit v1.2.3 From 698e37b41c08fd2a3b250ba3d0737c942af14f19 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Mon, 15 Aug 2011 08:49:20 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3236 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- demos/Posix-GCC/Makefile | 1 + demos/Posix-GCC/main.c | 64 ++++++++++++++++++++++++++++++++++++++++++---- demos/Win32-MinGW/Makefile | 1 + demos/Win32-MinGW/main.c | 32 +++++++++++------------ 4 files changed, 76 insertions(+), 22 deletions(-) (limited to 'demos') diff --git a/demos/Posix-GCC/Makefile b/demos/Posix-GCC/Makefile index 3a8b43c90..55fa40fb7 100644 --- a/demos/Posix-GCC/Makefile +++ b/demos/Posix-GCC/Makefile @@ -72,6 +72,7 @@ SRC = ${PORTSRC} \ ${PLATFORMSRC} \ $(BOARDSRC) \ ${CHIBIOS}/os/various/shell.c \ + ${CHIBIOS}/os/various/chprintf.c \ main.c # List ASM source files here diff --git a/demos/Posix-GCC/main.c b/demos/Posix-GCC/main.c index adfcf6925..543386a85 100644 --- a/demos/Posix-GCC/main.c +++ b/demos/Posix-GCC/main.c @@ -24,6 +24,7 @@ #include "hal.h" #include "test.h" #include "shell.h" +#include "chprintf.h" #define SHELL_WA_SIZE THD_WA_SIZE(4096) #define CONSOLE_WA_SIZE THD_WA_SIZE(4096) @@ -35,24 +36,76 @@ static Thread *cdtp; static Thread *shelltp1; static Thread *shelltp2; -void cmd_test(BaseChannel *chp, int argc, char *argv[]) { +static void cmd_mem(BaseChannel *chp, int argc, char *argv[]) { + size_t n, size; + + (void)argv; + if (argc > 0) { + chprintf(chp, "Usage: mem\r\n"); + return; + } + n = chHeapStatus(NULL, &size); + chprintf(chp, "core free memory : %u bytes\r\n", chCoreStatus()); + chprintf(chp, "heap fragments : %u\r\n", n); + chprintf(chp, "heap free total : %u bytes\r\n", size); +} + +static void cmd_threads(BaseChannel *chp, int argc, char *argv[]) { + static const char *states[] = { + "READY", + "CURRENT", + "SUSPENDED", + "WTSEM", + "WTMTX", + "WTCOND", + "SLEEPING", + "WTEXIT", + "WTOREVT", + "WTANDEVT", + "SNDMSGQ", + "SNDMSG", + "WTMSG", + "WTQUEUE", + "FINAL" + }; + Thread *tp; + + (void)argv; + if (argc > 0) { + chprintf(chp, "Usage: threads\r\n"); + return; + } + chprintf(chp, " addr stack prio refs state time\r\n"); + tp = chRegFirstThread(); + do { + chprintf(chp, "%.8lx %.8lx %4lu %4lu %9s %lu\r\n", + (uint32_t)tp, (uint32_t)tp->p_ctx.esp, + (uint32_t)tp->p_prio, (uint32_t)(tp->p_refs - 1), + states[tp->p_state], (uint32_t)tp->p_time); + tp = chRegNextThread(tp); + } while (tp != NULL); +} + +static void cmd_test(BaseChannel *chp, int argc, char *argv[]) { Thread *tp; (void)argv; if (argc > 0) { - shellPrintLine(chp, "Usage: test"); + chprintf(chp, "Usage: test\r\n"); return; } tp = chThdCreateFromHeap(NULL, TEST_WA_SIZE, chThdGetPriority(), TestThread, chp); if (tp == NULL) { - shellPrintLine(chp, "out of memory"); + chprintf(chp, "out of memory\r\n"); return; } chThdWait(tp); } static const ShellCommand commands[] = { + {"mem", cmd_mem}, + {"threads", cmd_threads}, {"test", cmd_test}, {NULL, NULL} }; @@ -76,9 +129,10 @@ static msg_t console_thread(void *arg) { (void)arg; while (!chThdShouldTerminate()) { - puts((char *)chMsgWait()); + Thread *tp = chMsgWait(); + puts((char *)chMsgGet(tp)); fflush(stdout); - chMsgRelease(RDY_OK); + chMsgRelease(tp, RDY_OK); } return 0; } diff --git a/demos/Win32-MinGW/Makefile b/demos/Win32-MinGW/Makefile index 652c60b44..73e938d44 100644 --- a/demos/Win32-MinGW/Makefile +++ b/demos/Win32-MinGW/Makefile @@ -72,6 +72,7 @@ SRC = ${PORTSRC} \ ${PLATFORMSRC} \ $(BOARDSRC) \ ${CHIBIOS}/os/various/shell.c \ + ${CHIBIOS}/os/various/chprintf.c \ main.c # List ASM source files here diff --git a/demos/Win32-MinGW/main.c b/demos/Win32-MinGW/main.c index 8540afed5..a735dfa0c 100644 --- a/demos/Win32-MinGW/main.c +++ b/demos/Win32-MinGW/main.c @@ -22,6 +22,7 @@ #include "hal.h" #include "test.h" #include "shell.h" +#include "chprintf.h" #define SHELL_WA_SIZE THD_WA_SIZE(4096) #define CONSOLE_WA_SIZE THD_WA_SIZE(4096) @@ -35,20 +36,16 @@ static Thread *shelltp2; static void cmd_mem(BaseChannel *chp, int argc, char *argv[]) { size_t n, size; - char buf[52]; (void)argv; if (argc > 0) { - shellPrintLine(chp, "Usage: mem"); + chprintf(chp, "Usage: mem\r\n"); return; } n = chHeapStatus(NULL, &size); - sprintf(buf, "core free memory : %i bytes", chCoreStatus()); - shellPrintLine(chp, buf); - sprintf(buf, "heap fragments : %i", n); - shellPrintLine(chp, buf); - sprintf(buf, "heap free total : %i bytes", size); - shellPrintLine(chp, buf); + chprintf(chp, "core free memory : %u bytes\r\n", chCoreStatus()); + chprintf(chp, "heap fragments : %u\r\n", n); + chprintf(chp, "heap free total : %u bytes\r\n", size); } static void cmd_threads(BaseChannel *chp, int argc, char *argv[]) { @@ -63,25 +60,26 @@ static void cmd_threads(BaseChannel *chp, int argc, char *argv[]) { "WTEXIT", "WTOREVT", "WTANDEVT", + "SNDMSGQ", "SNDMSG", "WTMSG", + "WTQUEUE", "FINAL" }; Thread *tp; - char buf[60]; (void)argv; if (argc > 0) { - shellPrintLine(chp, "Usage: threads"); + chprintf(chp, "Usage: threads\r\n"); return; } - shellPrintLine(chp, " addr stack prio refs state time"); + chprintf(chp, " addr stack prio refs state time\r\n"); tp = chRegFirstThread(); do { - sprintf(buf, "%8p %8p %4i %4i %9s %i", - tp, tp->p_ctx.esp, tp->p_prio, tp->p_refs - 1, - states[tp->p_state], tp->p_time); - shellPrintLine(chp, buf); + chprintf(chp, "%.8lx %.8lx %4lu %4lu %9s %lu\r\n", + (uint32_t)tp, (uint32_t)tp->p_ctx.r13, + (uint32_t)tp->p_prio, (uint32_t)(tp->p_refs - 1), + states[tp->p_state], (uint32_t)tp->p_time); tp = chRegNextThread(tp); } while (tp != NULL); } @@ -91,13 +89,13 @@ static void cmd_test(BaseChannel *chp, int argc, char *argv[]) { (void)argv; if (argc > 0) { - shellPrintLine(chp, "Usage: test"); + chprintf(chp, "Usage: test\r\n"); return; } tp = chThdCreateFromHeap(NULL, TEST_WA_SIZE, chThdGetPriority(), TestThread, chp); if (tp == NULL) { - shellPrintLine(chp, "out of memory"); + chprintf(chp, "out of memory\r\n"); return; } chThdWait(tp); -- cgit v1.2.3