diff --git a/boards/ST_STM32L_DISCOVERY/board.h b/boards/ST_STM32L_DISCOVERY/board.h
index d95480c15..845113f57 100644
--- a/boards/ST_STM32L_DISCOVERY/board.h
+++ b/boards/ST_STM32L_DISCOVERY/board.h
@@ -105,8 +105,8 @@
PIN_PUDR_FLOATING(14) | \
PIN_PUDR_FLOATING(15)))
#define VAL_GPIOA_ODR 0xFFFFFFFF
-#define VAL_GPIOA_AFRL 0x00000000
-#define VAL_GPIOA_AFRH 0x00000000
+#define VAL_GPIOA_AFRL 0x00000000
+#define VAL_GPIOA_AFRH 0x00000000
/*
* Port B setup.
@@ -127,8 +127,8 @@
PIN_PUDR_FLOATING(GPIOB_LED4) | \
PIN_PUDR_FLOATING(GPIOB_LED3)))
#define VAL_GPIOB_ODR 0xFFFFFF3F
-#define VAL_GPIOB_AFRL 0x00000000
-#define VAL_GPIOB_AFRH 0x00000000
+#define VAL_GPIOB_AFRL 0x00000000
+#define VAL_GPIOB_AFRH 0x00000000
/*
* Port C setup.
@@ -142,8 +142,8 @@
#define VAL_GPIOC_PUPDR (~(PIN_PUDR_FLOATING(15) | \
PIN_PUDR_FLOATING(14)))
#define VAL_GPIOC_ODR 0xFFFFFFFF
-#define VAL_GPIOC_AFRL 0x00000000
-#define VAL_GPIOC_AFRH 0x00000000
+#define VAL_GPIOC_AFRL 0x00000000
+#define VAL_GPIOC_AFRH 0x00000000
/*
* Port D setup.
@@ -154,8 +154,8 @@
#define VAL_GPIOD_OSPEEDR 0xFFFFFFFF
#define VAL_GPIOD_PUPDR 0xFFFFFFFF
#define VAL_GPIOD_ODR 0xFFFFFFFF
-#define VAL_GPIOD_AFRL 0x00000000
-#define VAL_GPIOD_AFRH 0x00000000
+#define VAL_GPIOD_AFRL 0x00000000
+#define VAL_GPIOD_AFRH 0x00000000
/*
* Port E setup.
@@ -166,8 +166,8 @@
#define VAL_GPIOE_OSPEEDR 0xFFFFFFFF
#define VAL_GPIOE_PUPDR 0xFFFFFFFF
#define VAL_GPIOE_ODR 0xFFFFFFFF
-#define VAL_GPIOE_AFRL 0x00000000
-#define VAL_GPIOE_AFRH 0x00000000
+#define VAL_GPIOE_AFRL 0x00000000
+#define VAL_GPIOE_AFRH 0x00000000
/*
* Port H setup.
@@ -178,8 +178,8 @@
#define VAL_GPIOH_OSPEEDR 0xFFFFFFFF
#define VAL_GPIOH_PUPDR 0xFFFFFFFF
#define VAL_GPIOH_ODR 0xFFFFFFFF
-#define VAL_GPIOH_AFRL 0x00000000
-#define VAL_GPIOH_AFRH 0x00000000
+#define VAL_GPIOH_AFRL 0x00000000
+#define VAL_GPIOH_AFRH 0x00000000
#if !defined(_FROM_ASM_)
#ifdef __cplusplus
diff --git a/demos/ARMCM3-STM32L152-DISCOVERY/halconf.h b/demos/ARMCM3-STM32L152-DISCOVERY/halconf.h
index 2a5f1806e..b9bee3656 100644
--- a/demos/ARMCM3-STM32L152-DISCOVERY/halconf.h
+++ b/demos/ARMCM3-STM32L152-DISCOVERY/halconf.h
@@ -115,14 +115,14 @@
* @brief Enables the SERIAL subsystem.
*/
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
-#define HAL_USE_SERIAL FALSE
+#define HAL_USE_SERIAL TRUE
#endif
/**
* @brief Enables the SERIAL over USB subsystem.
*/
#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__)
-#define HAL_USE_SERIAL_USB TRUE
+#define HAL_USE_SERIAL_USB FALSE
#endif
/**
@@ -143,7 +143,7 @@
* @brief Enables the USB subsystem.
*/
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
-#define HAL_USE_USB TRUE
+#define HAL_USE_USB FALSE
#endif
/*===========================================================================*/
diff --git a/demos/ARMCM3-STM32L152-DISCOVERY/iar/ch.ewp b/demos/ARMCM3-STM32L152-DISCOVERY/iar/ch.ewp
index 88946580b..d84ff7beb 100644
--- a/demos/ARMCM3-STM32L152-DISCOVERY/iar/ch.ewp
+++ b/demos/ARMCM3-STM32L152-DISCOVERY/iar/ch.ewp
@@ -295,9 +295,14 @@
CCIncludePath2
$PROJ_DIR$\..\
$PROJ_DIR$\..\..\..\os\kernel\include
+ $PROJ_DIR$\..\..\..\os\ports\common\ARMCMx\CMSIS\include
$PROJ_DIR$\..\..\..\os\ports\IAR\ARMCMx
$PROJ_DIR$\..\..\..\os\ports\IAR\ARMCMx\STM32L1xx
$PROJ_DIR$\..\..\..\os\hal\include
+ $PROJ_DIR$\..\..\..\os\hal\platforms\STM32
+ $PROJ_DIR$\..\..\..\os\hal\platforms\STM32\DMAv1
+ $PROJ_DIR$\..\..\..\os\hal\platforms\STM32\GPIOv2
+ $PROJ_DIR$\..\..\..\os\hal\platforms\STM32\USBv1
$PROJ_DIR$\..\..\..\os\hal\platforms\STM32L1xx
$PROJ_DIR$\..\..\..\boards\ST_STM32L_DISCOVERY
$PROJ_DIR$\..\..\..\test
@@ -1198,9 +1203,14 @@
CCIncludePath2
$PROJ_DIR$\..\
$PROJ_DIR$\..\..\..\os\kernel\include
+ $PROJ_DIR$\..\..\..\os\ports\common\ARMCMx\CMSIS\include
$PROJ_DIR$\..\..\..\os\ports\IAR\ARMCMx
$PROJ_DIR$\..\..\..\os\ports\IAR\ARMCMx\STM32L1xx
$PROJ_DIR$\..\..\..\os\hal\include
+ $PROJ_DIR$\..\..\..\os\hal\platforms\STM32
+ $PROJ_DIR$\..\..\..\os\hal\platforms\STM32\DMAv1
+ $PROJ_DIR$\..\..\..\os\hal\platforms\STM32\GPIOv2
+ $PROJ_DIR$\..\..\..\os\hal\platforms\STM32\USBv1
$PROJ_DIR$\..\..\..\os\hal\platforms\STM32L1xx
$PROJ_DIR$\..\..\..\boards\ST_STM32L_DISCOVERY
$PROJ_DIR$\..\..\..\test
@@ -2028,9 +2038,6 @@
platform
-
- $PROJ_DIR$\..\..\..\os\hal\platforms\STM32L1xx\core_cm3.h
-
$PROJ_DIR$\..\..\..\os\hal\platforms\STM32L1xx\hal_lld.c
@@ -2038,16 +2045,22 @@
$PROJ_DIR$\..\..\..\os\hal\platforms\STM32L1xx\hal_lld.h
- $PROJ_DIR$\..\..\..\os\hal\platforms\STM32L1xx\pal_lld.c
+ $PROJ_DIR$\..\..\..\os\hal\platforms\STM32\GPIOv2\pal_lld.c
- $PROJ_DIR$\..\..\..\os\hal\platforms\STM32L1xx\pal_lld.h
+ $PROJ_DIR$\..\..\..\os\hal\platforms\STM32\GPIOv2\pal_lld.h
- $PROJ_DIR$\..\..\..\os\hal\platforms\STM32L1xx\stm32_dma.c
+ $PROJ_DIR$\..\..\..\os\hal\platforms\STM32\serial_lld.c
- $PROJ_DIR$\..\..\..\os\hal\platforms\STM32L1xx\stm32_dma.h
+ $PROJ_DIR$\..\..\..\os\hal\platforms\STM32\serial_lld.h
+
+
+ $PROJ_DIR$\..\..\..\os\hal\platforms\STM32\DMAv1\stm32_dma.c
+
+
+ $PROJ_DIR$\..\..\..\os\hal\platforms\STM32\DMAv1\stm32_dma.h
$PROJ_DIR$\..\..\..\os\hal\platforms\STM32L1xx\stm32l1xx.h
diff --git a/demos/ARMCM3-STM32L152-DISCOVERY/main.c b/demos/ARMCM3-STM32L152-DISCOVERY/main.c
index 6f0ea53a0..3eaddc5fc 100644
--- a/demos/ARMCM3-STM32L152-DISCOVERY/main.c
+++ b/demos/ARMCM3-STM32L152-DISCOVERY/main.c
@@ -61,7 +61,7 @@ int main(void) {
/*
* Activates the serial driver 1 using the driver default configuration.
*/
-// sdStart(&SD1, NULL);
+ sdStart(&SD1, NULL);
/*
* If the user button is pressed after the reset then the test suite is