From 37a6ee0c67b2780f651e0d0a02fb048f55f5cf97 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Fri, 12 Jun 2015 08:52:52 +0000 Subject: [PATCH] Fixed bug #600. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8017 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- demos/SPC5/RT-SPC560B-EVB/Makefile | 2 +- demos/SPC5/RT-SPC560D-EVB/Makefile | 2 +- demos/SPC5/RT-SPC560P-EVB/Makefile | 2 +- demos/SPC5/RT-SPC563M-EVB/Makefile | 2 +- demos/SPC5/RT-SPC564A-EVB/Makefile | 2 +- demos/SPC5/RT-SPC56EC-EVB/Makefile | 2 +- demos/SPC5/RT-SPC56EL-EVB/Makefile | 2 +- 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 +- readme.txt | 5 ++++- 22 files changed, 81 insertions(+), 12 deletions(-) diff --git a/demos/SPC5/RT-SPC560B-EVB/Makefile b/demos/SPC5/RT-SPC560B-EVB/Makefile index 1045c3f1b..92707c9a2 100644 --- a/demos/SPC5/RT-SPC560B-EVB/Makefile +++ b/demos/SPC5/RT-SPC560B-EVB/Makefile @@ -114,7 +114,7 @@ ASMSRC = $(PORTASM) INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \ $(HALINC) $(OSALINC) $(PLATFORMINC) $(BOARDINC) \ - $(CHIBIOS)/os/various + $(CHIBIOS)/os/hal/lib/streams $(CHIBIOS)/os/various # # Project, sources and paths diff --git a/demos/SPC5/RT-SPC560D-EVB/Makefile b/demos/SPC5/RT-SPC560D-EVB/Makefile index 7fb832d42..5806581da 100644 --- a/demos/SPC5/RT-SPC560D-EVB/Makefile +++ b/demos/SPC5/RT-SPC560D-EVB/Makefile @@ -114,7 +114,7 @@ ASMSRC = $(PORTASM) INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \ $(HALINC) $(OSALINC) $(PLATFORMINC) $(BOARDINC) \ - $(CHIBIOS)/os/various + $(CHIBIOS)/os/hal/lib/streams $(CHIBIOS)/os/various # # Project, sources and paths diff --git a/demos/SPC5/RT-SPC560P-EVB/Makefile b/demos/SPC5/RT-SPC560P-EVB/Makefile index bb6e2ef1b..2b046fd7d 100644 --- a/demos/SPC5/RT-SPC560P-EVB/Makefile +++ b/demos/SPC5/RT-SPC560P-EVB/Makefile @@ -114,7 +114,7 @@ ASMSRC = $(PORTASM) INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \ $(HALINC) $(OSALINC) $(PLATFORMINC) $(BOARDINC) \ - $(CHIBIOS)/os/various + $(CHIBIOS)/os/hal/lib/streams $(CHIBIOS)/os/various # # Project, sources and paths diff --git a/demos/SPC5/RT-SPC563M-EVB/Makefile b/demos/SPC5/RT-SPC563M-EVB/Makefile index baa7b47fa..3c78b47f6 100644 --- a/demos/SPC5/RT-SPC563M-EVB/Makefile +++ b/demos/SPC5/RT-SPC563M-EVB/Makefile @@ -114,7 +114,7 @@ ASMSRC = $(PORTASM) INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \ $(HALINC) $(OSALINC) $(PLATFORMINC) $(BOARDINC) \ - $(CHIBIOS)/os/various + $(CHIBIOS)/os/hal/lib/streams $(CHIBIOS)/os/various # # Project, sources and paths diff --git a/demos/SPC5/RT-SPC564A-EVB/Makefile b/demos/SPC5/RT-SPC564A-EVB/Makefile index dea7fc945..c35a0a124 100644 --- a/demos/SPC5/RT-SPC564A-EVB/Makefile +++ b/demos/SPC5/RT-SPC564A-EVB/Makefile @@ -114,7 +114,7 @@ ASMSRC = $(PORTASM) INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \ $(HALINC) $(OSALINC) $(PLATFORMINC) $(BOARDINC) \ - $(CHIBIOS)/os/various + $(CHIBIOS)/os/hal/lib/streams $(CHIBIOS)/os/various # # Project, sources and paths diff --git a/demos/SPC5/RT-SPC56EC-EVB/Makefile b/demos/SPC5/RT-SPC56EC-EVB/Makefile index 5afb4779e..f952c8a4e 100644 --- a/demos/SPC5/RT-SPC56EC-EVB/Makefile +++ b/demos/SPC5/RT-SPC56EC-EVB/Makefile @@ -114,7 +114,7 @@ ASMSRC = $(PORTASM) INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \ $(HALINC) $(OSALINC) $(PLATFORMINC) $(BOARDINC) \ - $(CHIBIOS)/os/various + $(CHIBIOS)/os/hal/lib/streams $(CHIBIOS)/os/various # # Project, sources and paths diff --git a/demos/SPC5/RT-SPC56EL-EVB/Makefile b/demos/SPC5/RT-SPC56EL-EVB/Makefile index 55dee886d..648d677dc 100644 --- a/demos/SPC5/RT-SPC56EL-EVB/Makefile +++ b/demos/SPC5/RT-SPC56EL-EVB/Makefile @@ -114,7 +114,7 @@ ASMSRC = $(PORTASM) INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \ $(HALINC) $(OSALINC) $(PLATFORMINC) $(BOARDINC) \ - $(CHIBIOS)/os/various + $(CHIBIOS)/os/hal/lib/streams $(CHIBIOS)/os/various # # Project, sources and paths 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_ */ diff --git a/readme.txt b/readme.txt index def0b1893..ad62b2636 100644 --- a/readme.txt +++ b/readme.txt @@ -74,8 +74,11 @@ ***************************************************************************** *** 3.0.0p6 *** +- NIL: Added INTC priorities check to the e200z port. +- RT: Added INTC priorities check to the e200z port. +- DEM: Fixed missing paths in e200z demos (bug #600). - HAL: Added support for extra DMA channels in STM32F072 devices. -- HAL: Fixed error in platofm_f105_f107.mk file (bug #599). +- HAL: Fixed error in platform_f105_f107.mk file (bug #599). - HAL: Fixed issue in DMA drivers when channels share ISRs (bug #597). *** 3.0.0p5 ***