From 37a6ee0c67b2780f651e0d0a02fb048f55f5cf97 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Fri, 12 Jun 2015 08:52:52 +0000 Subject: Fixed bug #600. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8017 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/common/ports/e200/compilers/GCC/rules.mk | 2 -- os/common/ports/e200/devices/SPC560BCxx/intc.h | 5 +++++ os/common/ports/e200/devices/SPC560Bxx/intc.h | 5 +++++ os/common/ports/e200/devices/SPC560Dxx/intc.h | 5 +++++ os/common/ports/e200/devices/SPC560Pxx/intc.h | 5 +++++ os/common/ports/e200/devices/SPC563Mxx/intc.h | 5 +++++ os/common/ports/e200/devices/SPC564Axx/intc.h | 5 +++++ os/common/ports/e200/devices/SPC56ECxx/intc.h | 5 +++++ os/common/ports/e200/devices/SPC56ELxx/intc.h | 5 +++++ os/common/ports/e200/devices/SPC57EMxx_HSM/intc.h | 5 +++++ os/nil/ports/e200/nilcore.h | 12 ++++++++++++ os/rt/ports/ARMCMx/compilers/GCC/chtypes.h | 1 - os/rt/ports/e200/chcore.h | 12 ++++++++++++ os/rt/ports/e200/compilers/GCC/chtypes.h | 2 +- 14 files changed, 70 insertions(+), 4 deletions(-) (limited to 'os') diff --git a/os/common/ports/e200/compilers/GCC/rules.mk b/os/common/ports/e200/compilers/GCC/rules.mk index f54bb4a9e..c7f9d9b03 100644 --- a/os/common/ports/e200/compilers/GCC/rules.mk +++ b/os/common/ports/e200/compilers/GCC/rules.mk @@ -210,8 +210,6 @@ else @$(OD) $(ODFLAGS) $< > $@ @echo @$(SZ) $< - @echo - @echo Done endif %.list: %.elf $(LDSCRIPT) diff --git a/os/common/ports/e200/devices/SPC560BCxx/intc.h b/os/common/ports/e200/devices/SPC560BCxx/intc.h index 7535fd136..668eac387 100644 --- a/os/common/ports/e200/devices/SPC560BCxx/intc.h +++ b/os/common/ports/e200/devices/SPC560BCxx/intc.h @@ -41,6 +41,11 @@ #define INTC_EOIR_ADDR (INTC_BASE + 0x18) /** @} */ +/** + * @brief INTC priority levels. + */ +#define INTC_PRIORITY_LEVELS 16U + /*===========================================================================*/ /* Module pre-compile time settings. */ /*===========================================================================*/ diff --git a/os/common/ports/e200/devices/SPC560Bxx/intc.h b/os/common/ports/e200/devices/SPC560Bxx/intc.h index 4feacf22a..bde2c94aa 100644 --- a/os/common/ports/e200/devices/SPC560Bxx/intc.h +++ b/os/common/ports/e200/devices/SPC560Bxx/intc.h @@ -41,6 +41,11 @@ #define INTC_EOIR_ADDR (INTC_BASE + 0x18) /** @} */ +/** + * @brief INTC priority levels. + */ +#define INTC_PRIORITY_LEVELS 16U + /*===========================================================================*/ /* Module pre-compile time settings. */ /*===========================================================================*/ diff --git a/os/common/ports/e200/devices/SPC560Dxx/intc.h b/os/common/ports/e200/devices/SPC560Dxx/intc.h index 73843b436..6c3bbec60 100644 --- a/os/common/ports/e200/devices/SPC560Dxx/intc.h +++ b/os/common/ports/e200/devices/SPC560Dxx/intc.h @@ -41,6 +41,11 @@ #define INTC_EOIR_ADDR (INTC_BASE + 0x18) /** @} */ +/** + * @brief INTC priority levels. + */ +#define INTC_PRIORITY_LEVELS 16U + /*===========================================================================*/ /* Module pre-compile time settings. */ /*===========================================================================*/ diff --git a/os/common/ports/e200/devices/SPC560Pxx/intc.h b/os/common/ports/e200/devices/SPC560Pxx/intc.h index 0d76d5be6..75440fb75 100644 --- a/os/common/ports/e200/devices/SPC560Pxx/intc.h +++ b/os/common/ports/e200/devices/SPC560Pxx/intc.h @@ -41,6 +41,11 @@ #define INTC_EOIR_ADDR (INTC_BASE + 0x18) /** @} */ +/** + * @brief INTC priority levels. + */ +#define INTC_PRIORITY_LEVELS 16U + /*===========================================================================*/ /* Module pre-compile time settings. */ /*===========================================================================*/ diff --git a/os/common/ports/e200/devices/SPC563Mxx/intc.h b/os/common/ports/e200/devices/SPC563Mxx/intc.h index 5112d1f81..b7a5d920a 100644 --- a/os/common/ports/e200/devices/SPC563Mxx/intc.h +++ b/os/common/ports/e200/devices/SPC563Mxx/intc.h @@ -41,6 +41,11 @@ #define INTC_EOIR_ADDR (INTC_BASE + 0x18) /** @} */ +/** + * @brief INTC priority levels. + */ +#define INTC_PRIORITY_LEVELS 16U + /*===========================================================================*/ /* Module pre-compile time settings. */ /*===========================================================================*/ diff --git a/os/common/ports/e200/devices/SPC564Axx/intc.h b/os/common/ports/e200/devices/SPC564Axx/intc.h index 480140f18..7f34613d9 100644 --- a/os/common/ports/e200/devices/SPC564Axx/intc.h +++ b/os/common/ports/e200/devices/SPC564Axx/intc.h @@ -41,6 +41,11 @@ #define INTC_EOIR_ADDR (INTC_BASE + 0x18) /** @} */ +/** + * @brief INTC priority levels. + */ +#define INTC_PRIORITY_LEVELS 16U + /*===========================================================================*/ /* Module pre-compile time settings. */ /*===========================================================================*/ diff --git a/os/common/ports/e200/devices/SPC56ECxx/intc.h b/os/common/ports/e200/devices/SPC56ECxx/intc.h index 844d75657..bb8b13dbc 100644 --- a/os/common/ports/e200/devices/SPC56ECxx/intc.h +++ b/os/common/ports/e200/devices/SPC56ECxx/intc.h @@ -41,6 +41,11 @@ #define INTC_EOIR_ADDR (INTC_BASE + 0x18) /** @} */ +/** + * @brief INTC priority levels. + */ +#define INTC_PRIORITY_LEVELS 16U + /*===========================================================================*/ /* Module pre-compile time settings. */ /*===========================================================================*/ diff --git a/os/common/ports/e200/devices/SPC56ELxx/intc.h b/os/common/ports/e200/devices/SPC56ELxx/intc.h index f1ed08baa..bb4c98f57 100644 --- a/os/common/ports/e200/devices/SPC56ELxx/intc.h +++ b/os/common/ports/e200/devices/SPC56ELxx/intc.h @@ -41,6 +41,11 @@ #define INTC_EOIR_ADDR (INTC_BASE + 0x18) /** @} */ +/** + * @brief INTC priority levels. + */ +#define INTC_PRIORITY_LEVELS 16U + /*===========================================================================*/ /* Module pre-compile time settings. */ /*===========================================================================*/ diff --git a/os/common/ports/e200/devices/SPC57EMxx_HSM/intc.h b/os/common/ports/e200/devices/SPC57EMxx_HSM/intc.h index 7060e0674..ef660f195 100644 --- a/os/common/ports/e200/devices/SPC57EMxx_HSM/intc.h +++ b/os/common/ports/e200/devices/SPC57EMxx_HSM/intc.h @@ -41,6 +41,11 @@ #define INTC_EOIR_ADDR (INTC_BASE + 0x30) /** @} */ +/** + * @brief INTC priority levels. + */ +#define INTC_PRIORITY_LEVELS 16U + /*===========================================================================*/ /* Module pre-compile time settings. */ /*===========================================================================*/ diff --git a/os/nil/ports/e200/nilcore.h b/os/nil/ports/e200/nilcore.h index 9da268038..3405a9bc5 100644 --- a/os/nil/ports/e200/nilcore.h +++ b/os/nil/ports/e200/nilcore.h @@ -289,6 +289,18 @@ struct port_intctx { */ #define PORT_FAST_IRQ_HANDLER(id) void id(void) +/** + * @brief Priority level verification macro. + */ +#define PORT_IRQ_IS_VALID_PRIORITY(n) \ + (((n) >= 0U) && ((n) < INTC_PRIORITY_LEVELS)) + +/** + * @brief Priority level verification macro. + */ +#define PORT_IRQ_IS_VALID_KERNEL_PRIORITY(n) \ + (((n) >= 0U) && ((n) < INTC_PRIORITY_LEVELS)) + /** * @brief Performs a context switch between two threads. * @details This is the most critical code in any port, this function diff --git a/os/rt/ports/ARMCMx/compilers/GCC/chtypes.h b/os/rt/ports/ARMCMx/compilers/GCC/chtypes.h index af3349d79..c500da63b 100644 --- a/os/rt/ports/ARMCMx/compilers/GCC/chtypes.h +++ b/os/rt/ports/ARMCMx/compilers/GCC/chtypes.h @@ -40,7 +40,6 @@ */ #if !defined(FALSE) || defined(__DOXYGEN__) #define FALSE 0 - #endif /** diff --git a/os/rt/ports/e200/chcore.h b/os/rt/ports/e200/chcore.h index f1485b81a..c0b96e2df 100644 --- a/os/rt/ports/e200/chcore.h +++ b/os/rt/ports/e200/chcore.h @@ -330,6 +330,18 @@ struct context { */ #define PORT_FAST_IRQ_HANDLER(id) void id(void) +/** + * @brief Priority level verification macro. + */ +#define PORT_IRQ_IS_VALID_PRIORITY(n) \ + (((n) >= 0U) && ((n) < INTC_PRIORITY_LEVELS)) + +/** + * @brief Priority level verification macro. + */ +#define PORT_IRQ_IS_VALID_KERNEL_PRIORITY(n) \ + (((n) >= 0U) && ((n) < INTC_PRIORITY_LEVELS)) + /** * @brief Performs a context switch between two threads. * @details This is the most critical code in any port, this function diff --git a/os/rt/ports/e200/compilers/GCC/chtypes.h b/os/rt/ports/e200/compilers/GCC/chtypes.h index 87bb6b74d..2973f8ef8 100644 --- a/os/rt/ports/e200/compilers/GCC/chtypes.h +++ b/os/rt/ports/e200/compilers/GCC/chtypes.h @@ -98,7 +98,7 @@ typedef uint32_t ucnt_t; /**< Generic unsigned counter. */ /** * @brief Optimized thread function declaration macro. */ -#define PORT_THD_FUNCTION(tname, arg) msg_t tname(void *arg) +#define PORT_THD_FUNCTION(tname, arg) void tname(void *arg) #endif /* _CHTYPES_H_ */ -- cgit v1.2.3