aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-10-01 12:26:11 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-10-01 12:26:11 +0000
commit2acabf55f6ca9d992803b629157b971358fb76f6 (patch)
tree7a92ab866fa399f1d0da0d7c863f5edb6eb6a1e1
parent422c00db0343feee328b00bfe0b5cf971ed752df (diff)
downloadChibiOS-2acabf55f6ca9d992803b629157b971358fb76f6.tar.gz
ChibiOS-2acabf55f6ca9d992803b629157b971358fb76f6.tar.bz2
ChibiOS-2acabf55f6ca9d992803b629157b971358fb76f6.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6340 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r--demos/rt/RT-STM32F051-DISCOVERY/chconf.h2
-rw-r--r--os/common/ports/ARMCMx/devices/STM32F0xx/cmparams.h7
-rw-r--r--os/common/ports/ARMCMx/devices/STM32F1xx/cmparams.h10
-rw-r--r--os/common/ports/ARMCMx/devices/STM32F30x/cmparams.h7
-rw-r--r--os/common/ports/ARMCMx/devices/STM32F37x/cmparams.h7
-rw-r--r--os/common/ports/ARMCMx/devices/STM32F4xx/cmparams.h7
-rw-r--r--os/common/ports/ARMCMx/devices/STM32L1xx/cmparams.h7
-rw-r--r--os/ext/CMSIS/ST/stm32f0xx.h2
-rw-r--r--os/ext/CMSIS/ST/stm32f10x.h6
-rw-r--r--os/ext/CMSIS/ST/stm32f30x.h2
-rw-r--r--os/ext/CMSIS/ST/stm32f37x.h6
-rw-r--r--os/ext/CMSIS/ST/stm32f4xx.h6
-rw-r--r--os/ext/CMSIS/ST/stm32l1xx.h6
-rw-r--r--os/hal/ports/STM32/GPIOv2/pal_lld.c2
-rw-r--r--os/hal/ports/STM32/stm32.h4
15 files changed, 67 insertions, 14 deletions
diff --git a/demos/rt/RT-STM32F051-DISCOVERY/chconf.h b/demos/rt/RT-STM32F051-DISCOVERY/chconf.h
index adf4cb601..a481e2b0c 100644
--- a/demos/rt/RT-STM32F051-DISCOVERY/chconf.h
+++ b/demos/rt/RT-STM32F051-DISCOVERY/chconf.h
@@ -144,7 +144,7 @@
*
* @note The default is @p TRUE.
*/
-#define CH_CFG_USE_TM TRUE
+#define CH_CFG_USE_TM FALSE
/**
* @brief Threads registry APIs.
diff --git a/os/common/ports/ARMCMx/devices/STM32F0xx/cmparams.h b/os/common/ports/ARMCMx/devices/STM32F0xx/cmparams.h
index e0e842e52..608c7a159 100644
--- a/os/common/ports/ARMCMx/devices/STM32F0xx/cmparams.h
+++ b/os/common/ports/ARMCMx/devices/STM32F0xx/cmparams.h
@@ -63,6 +63,13 @@
asm module.*/
#if !defined(_FROM_ASM_)
+/* If the device type is not externally defined, for example from the Makefile,
+ then a file named board.h is included. This file must contain a device
+ definition compatible with the vendor include file.*/
+#if !defined(STM32F0XX_LD) && !defined(STM32F0XX_MD)
+#include "board.h"
+#endif
+
/* Including the device CMSIS header. Note, we are not using the definitions
from this header because we need this file to be usable also from
assembler source files. We verify that the info matches instead.*/
diff --git a/os/common/ports/ARMCMx/devices/STM32F1xx/cmparams.h b/os/common/ports/ARMCMx/devices/STM32F1xx/cmparams.h
index f3b0be7f9..282f26602 100644
--- a/os/common/ports/ARMCMx/devices/STM32F1xx/cmparams.h
+++ b/os/common/ports/ARMCMx/devices/STM32F1xx/cmparams.h
@@ -63,6 +63,16 @@
asm module.*/
#if !defined(_FROM_ASM_)
+/* If the device type is not externally defined, for example from the Makefile,
+ then a file named board.h is included. This file must contain a device
+ definition compatible with the vendor include file.*/
+#if !defined(STM32F10X_LD) && !defined(STM32F10X_LD_VL) && \
+ !defined(STM32F10X_MD) && !defined(STM32F10X_MD_VL) && \
+ !defined(STM32F10X_HD) && !defined(STM32F10X_HD_VL) && \
+ !defined(STM32F10X_XL) && !defined(STM32F10X_CL)
+#include "board.h"
+#endif
+
/* Including the device CMSIS header. Note, we are not using the definitions
from this header because we need this file to be usable also from
assembler source files. We verify that the info matches instead.*/
diff --git a/os/common/ports/ARMCMx/devices/STM32F30x/cmparams.h b/os/common/ports/ARMCMx/devices/STM32F30x/cmparams.h
index 28bc40724..28e8051c6 100644
--- a/os/common/ports/ARMCMx/devices/STM32F30x/cmparams.h
+++ b/os/common/ports/ARMCMx/devices/STM32F30x/cmparams.h
@@ -63,6 +63,13 @@
asm module.*/
#if !defined(_FROM_ASM_)
+/* If the device type is not externally defined, for example from the Makefile,
+ then a file named board.h is included. This file must contain a device
+ definition compatible with the vendor include file.*/
+#if !defined (STM32F30X)
+#include "board.h"
+#endif
+
/* Including the device CMSIS header. Note, we are not using the definitions
from this header because we need this file to be usable also from
assembler source files. We verify that the info matches instead.*/
diff --git a/os/common/ports/ARMCMx/devices/STM32F37x/cmparams.h b/os/common/ports/ARMCMx/devices/STM32F37x/cmparams.h
index 45a7d1594..274e54193 100644
--- a/os/common/ports/ARMCMx/devices/STM32F37x/cmparams.h
+++ b/os/common/ports/ARMCMx/devices/STM32F37x/cmparams.h
@@ -63,6 +63,13 @@
asm module.*/
#if !defined(_FROM_ASM_)
+/* If the device type is not externally defined, for example from the Makefile,
+ then a file named board.h is included. This file must contain a device
+ definition compatible with the vendor include file.*/
+#if !defined (STM32F37X)
+#include "board.h"
+#endif
+
/* Including the device CMSIS header. Note, we are not using the definitions
from this header because we need this file to be usable also from
assembler source files. We verify that the info matches instead.*/
diff --git a/os/common/ports/ARMCMx/devices/STM32F4xx/cmparams.h b/os/common/ports/ARMCMx/devices/STM32F4xx/cmparams.h
index 3bb79e75f..43277ee96 100644
--- a/os/common/ports/ARMCMx/devices/STM32F4xx/cmparams.h
+++ b/os/common/ports/ARMCMx/devices/STM32F4xx/cmparams.h
@@ -63,6 +63,13 @@
asm module.*/
#if !defined(_FROM_ASM_)
+/* If the device type is not externally defined, for example from the Makefile,
+ then a file named board.h is included. This file must contain a device
+ definition compatible with the vendor include file.*/
+#if !defined(STM32F40XX) && !defined(STM32F427X)
+#include "board.h"
+#endif
+
/* Including the device CMSIS header. Note, we are not using the definitions
from this header because we need this file to be usable also from
assembler source files. We verify that the info matches instead.*/
diff --git a/os/common/ports/ARMCMx/devices/STM32L1xx/cmparams.h b/os/common/ports/ARMCMx/devices/STM32L1xx/cmparams.h
index 39be9d4fa..76dcb200e 100644
--- a/os/common/ports/ARMCMx/devices/STM32L1xx/cmparams.h
+++ b/os/common/ports/ARMCMx/devices/STM32L1xx/cmparams.h
@@ -63,6 +63,13 @@
asm module.*/
#if !defined(_FROM_ASM_)
+/* If the device type is not externally defined, for example from the Makefile,
+ then a file named board.h is included. This file must contain a device
+ definition compatible with the vendor include file.*/
+#if !defined(STM32L1XX_MD) && !defined(STM32L1XX_MDP) && !defined(STM32L1XX_HD)
+#include "board.h"
+#endif
+
/* Including the device CMSIS header. Note, we are not using the definitions
from this header because we need this file to be usable also from
assembler source files. We verify that the info matches instead.*/
diff --git a/os/ext/CMSIS/ST/stm32f0xx.h b/os/ext/CMSIS/ST/stm32f0xx.h
index 28ad5a884..09fb548e9 100644
--- a/os/ext/CMSIS/ST/stm32f0xx.h
+++ b/os/ext/CMSIS/ST/stm32f0xx.h
@@ -67,7 +67,7 @@
#if !defined (STM32F0XX_LD) && !defined (STM32F0XX_MD)
/* #define STM32F0XX_LD*/ /*!< STM32F0xx Low-density devices are STM32F050xx and STM32F060xx microcontrollers where the Flash memory ranges between 16 and 32 Kbytes */
- #define STM32F0XX_MD /*!< STM32F0xx Medium-density devices are STM32F051xx and STM32F061xx microcontrollers where the Flash memory ranges between 16 and 64 Kbytes */
+ /* #define STM32F0XX_MD*/ /*!< STM32F0xx Medium-density devices are STM32F051xx and STM32F061xx microcontrollers where the Flash memory ranges between 16 and 64 Kbytes */
#endif
/* Tip: To avoid modifying this file each time you need to switch between these
devices, you can define the device in your toolchain compiler preprocessor.
diff --git a/os/ext/CMSIS/ST/stm32f10x.h b/os/ext/CMSIS/ST/stm32f10x.h
index df42d3756..f8471f6c6 100644
--- a/os/ext/CMSIS/ST/stm32f10x.h
+++ b/os/ext/CMSIS/ST/stm32f10x.h
@@ -65,7 +65,7 @@
#if !defined (STM32F10X_LD) && !defined (STM32F10X_LD_VL) && !defined (STM32F10X_MD) && !defined (STM32F10X_MD_VL) && !defined (STM32F10X_HD) && !defined (STM32F10X_HD_VL) && !defined (STM32F10X_XL) && !defined (STM32F10X_CL)
/* #define STM32F10X_LD */ /*!< STM32F10X_LD: STM32 Low density devices */
/* #define STM32F10X_LD_VL */ /*!< STM32F10X_LD_VL: STM32 Low density Value Line devices */
- #define STM32F10X_MD /*!< STM32F10X_MD: STM32 Medium density devices */
+ /* #define STM32F10X_MD */ /*!< STM32F10X_MD: STM32 Medium density devices */
/* #define STM32F10X_MD_VL */ /*!< STM32F10X_MD_VL: STM32 Medium density Value Line devices */
/* #define STM32F10X_HD */ /*!< STM32F10X_HD: STM32 High density devices */
/* #define STM32F10X_HD_VL */ /*!< STM32F10X_HD_VL: STM32 High density value line devices */
@@ -93,7 +93,9 @@
*/
#if !defined (STM32F10X_LD) && !defined (STM32F10X_LD_VL) && !defined (STM32F10X_MD) && !defined (STM32F10X_MD_VL) && !defined (STM32F10X_HD) && !defined (STM32F10X_HD_VL) && !defined (STM32F10X_XL) && !defined (STM32F10X_CL)
- #error "Please select first the target STM32F10x device used in your application (in stm32f10x.h file)"
+/* CHIBIOS FIX */
+#include "board.h"
+// #error "Please select first the target STM32F10x device used in your application (in stm32f10x.h file)"
#endif
#if !defined USE_STDPERIPH_DRIVER
diff --git a/os/ext/CMSIS/ST/stm32f30x.h b/os/ext/CMSIS/ST/stm32f30x.h
index 99c6178ee..1c1f66f79 100644
--- a/os/ext/CMSIS/ST/stm32f30x.h
+++ b/os/ext/CMSIS/ST/stm32f30x.h
@@ -66,7 +66,7 @@
*/
#if !defined (STM32F30X)
- #define STM32F30X
+/* #define STM32F30X */
#endif
/* Tip: To avoid modifying this file each time you need to switch between these
diff --git a/os/ext/CMSIS/ST/stm32f37x.h b/os/ext/CMSIS/ST/stm32f37x.h
index 08c7f271c..fa281aa7a 100644
--- a/os/ext/CMSIS/ST/stm32f37x.h
+++ b/os/ext/CMSIS/ST/stm32f37x.h
@@ -63,7 +63,7 @@
*/
#if !defined (STM32F37X)
- #define STM32F37X
+/* #define STM32F37X */
#endif
/* Tip: To avoid modifying this file each time you need to switch between these
@@ -71,7 +71,9 @@
*/
#if !defined (STM32F37X)
- #error "Please select first the target STM32F37X device used in your application (in stm32f37x.h file)"
+/* CHIBIOS FIX */
+#include "board.h"
+// #error "Please select first the target STM32F37X device used in your application (in stm32f37x.h file)"
#endif
#if !defined (USE_STDPERIPH_DRIVER)
diff --git a/os/ext/CMSIS/ST/stm32f4xx.h b/os/ext/CMSIS/ST/stm32f4xx.h
index 11f40e8dc..5d35196f3 100644
--- a/os/ext/CMSIS/ST/stm32f4xx.h
+++ b/os/ext/CMSIS/ST/stm32f4xx.h
@@ -66,7 +66,7 @@
*/
#if !defined (STM32F4XX) && !defined (STM32F40XX) && !defined (STM32F427X)
- #define STM32F40XX /*!< STM32F40xx/41xx Devices */
+ /* #define STM32F40XX */ /*!< STM32F40xx/41xx Devices */
/* #define STM32F427X */ /*!< STM32F427x/437x Devices*/
#endif
@@ -76,7 +76,9 @@
*/
#if !defined (STM32F4XX) && !defined (STM32F40XX) && !defined (STM32F427X)
- #error "Please select first the target STM32F4xx device used in your application (in stm32f4xx.h file)"
+/* CHIBIOS FIX */
+#include "board.h"
+// #error "Please select first the target STM32F4xx device used in your application (in stm32f4xx.h file)"
#endif
#if !defined (USE_STDPERIPH_DRIVER)
diff --git a/os/ext/CMSIS/ST/stm32l1xx.h b/os/ext/CMSIS/ST/stm32l1xx.h
index 116e4378d..da2876851 100644
--- a/os/ext/CMSIS/ST/stm32l1xx.h
+++ b/os/ext/CMSIS/ST/stm32l1xx.h
@@ -68,7 +68,7 @@
#if !defined (STM32L1XX_MD) && !defined (STM32L1XX_MDP) && !defined (STM32L1XX_HD)
- #define STM32L1XX_MD /*!< - Ultra Low Power Medium-density devices: STM32L151x6xx, STM32L151x8xx,
+/* #define STM32L1XX_MD */ /*!< - Ultra Low Power Medium-density devices: STM32L151x6xx, STM32L151x8xx,
STM32L151xBxx, STM32L152x6xx, STM32L152x8xx and STM32L152xBxx.
- Ultra Low Power Medium-density Value Line devices: STM32L100x6xx,
STM32L100x8xx and STM32L100xBxx. */
@@ -83,7 +83,9 @@
*/
#if !defined (STM32L1XX_MD) && !defined (STM32L1XX_MDP) && !defined (STM32L1XX_HD)
- #error "Please select first the target STM32L1xx device used in your application (in stm32l1xx.h file)"
+/* CHIBIOS FIX */
+#include "board.h"
+// #error "Please select first the target STM32L1xx device used in your application (in stm32l1xx.h file)"
#endif
#if !defined USE_STDPERIPH_DRIVER
diff --git a/os/hal/ports/STM32/GPIOv2/pal_lld.c b/os/hal/ports/STM32/GPIOv2/pal_lld.c
index 017b340a0..48290ae9c 100644
--- a/os/hal/ports/STM32/GPIOv2/pal_lld.c
+++ b/os/hal/ports/STM32/GPIOv2/pal_lld.c
@@ -35,7 +35,7 @@
RCC_AHBENR_GPIOCEN | RCC_AHBENR_GPIODEN | \
RCC_AHBENR_GPIOEEN | RCC_AHBENR_GPIOHEN)
#define AHB_LPEN_MASK AHB_EN_MASK
-#elif defined(STM32F0XX)
+#elif defined(STM32F0XX_LD) || defined(STM32F0XX_MD)
#define AHB_EN_MASK (RCC_AHBENR_GPIOAEN | RCC_AHBENR_GPIOBEN | \
RCC_AHBENR_GPIOCEN | RCC_AHBENR_GPIODEN | \
RCC_AHBENR_GPIOFEN)
diff --git a/os/hal/ports/STM32/stm32.h b/os/hal/ports/STM32/stm32.h
index eb8ea8140..1b8b8392a 100644
--- a/os/hal/ports/STM32/stm32.h
+++ b/os/hal/ports/STM32/stm32.h
@@ -52,7 +52,7 @@
#else /* !STM32F1XX_XX */
-#if defined(STM32F0XX)
+#if defined(STM32F0XX_LD) || defined(STM32F0XX_MD)
#include "stm32f0xx.h"
#elif defined(STM32F2XX)
@@ -64,7 +64,7 @@
#elif defined(STM32F37X)
#include "stm32f37x.h"
-#elif defined(STM32F4XX)
+#elif defined(STM32F40XX) || defined(STM32F42XX)
#include "stm32f4xx.h"
#elif defined(STM32L1XX_MD)