From c44f71c52d3a90ccb5c302df378e610e25723f2a Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sun, 8 Sep 2013 13:49:19 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6278 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- .../ports/ARMCMx/devices/STM32L1xx/cmparams.h | 2 +- os/ext/CMSIS/ST/stm32l1xx.h | 4 +- os/hal/boards/ARDUINO_MEGA/board.c | 1 - os/hal/boards/ARDUINO_MEGA/board.mk | 4 +- os/hal/boards/EA_LPCXPRESSO_11C24/board.c | 1 - os/hal/boards/EA_LPCXPRESSO_11C24/board.mk | 4 +- os/hal/boards/EA_LPCXPRESSO_BB_1114/board.c | 1 - os/hal/boards/EA_LPCXPRESSO_BB_1114/board.mk | 4 +- os/hal/boards/EA_LPCXPRESSO_BB_11U14/board.c | 1 - os/hal/boards/EA_LPCXPRESSO_BB_11U14/board.mk | 4 +- os/hal/boards/EA_LPCXPRESSO_BB_1343/board.c | 1 - os/hal/boards/EA_LPCXPRESSO_BB_1343/board.mk | 4 +- os/hal/boards/EA_LPCXPRESSO_LPC812/board.c | 1 - os/hal/boards/EA_LPCXPRESSO_LPC812/board.mk | 4 +- os/hal/boards/MAPLEMINI_STM32_F103/board.c | 1 - os/hal/boards/MAPLEMINI_STM32_F103/board.mk | 4 +- os/hal/boards/NGX_BB_LPC11U14/board.c | 1 - os/hal/boards/NGX_BB_LPC11U14/board.mk | 4 +- os/hal/boards/OLIMEX_AVR_CAN/board.c | 1 - os/hal/boards/OLIMEX_AVR_CAN/board.mk | 4 +- os/hal/boards/OLIMEX_AVR_MT_128/board.c | 1 - os/hal/boards/OLIMEX_AVR_MT_128/board.mk | 4 +- os/hal/boards/OLIMEX_LPC-P1227/board.c | 1 - os/hal/boards/OLIMEX_LPC-P1227/board.mk | 4 +- os/hal/boards/OLIMEX_LPC_P1343/board.c | 1 - os/hal/boards/OLIMEX_LPC_P1343/board.mk | 4 +- os/hal/boards/OLIMEX_LPC_P2148/board.c | 1 - os/hal/boards/OLIMEX_LPC_P2148/board.mk | 4 +- os/hal/boards/OLIMEX_LPC_P2148/buzzer.c | 1 - os/hal/boards/OLIMEX_MSP430_P1611/board.c | 1 - os/hal/boards/OLIMEX_MSP430_P1611/board.mk | 4 +- os/hal/boards/OLIMEX_SAM7_EX256/board.c | 1 - os/hal/boards/OLIMEX_SAM7_EX256/board.mk | 4 +- os/hal/boards/OLIMEX_SAM7_P256/board.c | 1 - os/hal/boards/OLIMEX_SAM7_P256/board.mk | 4 +- os/hal/boards/OLIMEX_STM32_103STK/board.c | 1 - os/hal/boards/OLIMEX_STM32_103STK/board.mk | 4 +- os/hal/boards/OLIMEX_STM32_E407/board.c | 1 - os/hal/boards/OLIMEX_STM32_E407/board.mk | 4 +- os/hal/boards/OLIMEX_STM32_H103/board.c | 1 - os/hal/boards/OLIMEX_STM32_H103/board.mk | 4 +- os/hal/boards/OLIMEX_STM32_LCD/board.c | 1 - os/hal/boards/OLIMEX_STM32_LCD/board.mk | 4 +- os/hal/boards/OLIMEX_STM32_P103/board.c | 1 - os/hal/boards/OLIMEX_STM32_P103/board.mk | 4 +- os/hal/boards/OLIMEX_STM32_P107/board.c | 1 - os/hal/boards/OLIMEX_STM32_P107/board.mk | 4 +- os/hal/boards/OLIMEX_STM32_P407/board.c | 1 - os/hal/boards/OLIMEX_STM32_P407/board.mk | 4 +- os/hal/boards/RAISONANCE_REVA_STM8S/board.c | 1 - os/hal/boards/STUDIEL_AT91SAM7A3_EK/board.c | 1 - os/hal/boards/ST_EVB_SPC560BC/board.c | 1 - os/hal/boards/ST_EVB_SPC560BC/board.mk | 4 +- os/hal/boards/ST_EVB_SPC560D/board.c | 1 - os/hal/boards/ST_EVB_SPC560D/board.mk | 4 +- os/hal/boards/ST_EVB_SPC560P/board.c | 1 - os/hal/boards/ST_EVB_SPC560P/board.mk | 4 +- os/hal/boards/ST_EVB_SPC563M/board.c | 1 - os/hal/boards/ST_EVB_SPC563M/board.mk | 4 +- os/hal/boards/ST_EVB_SPC564A/board.c | 1 - os/hal/boards/ST_EVB_SPC564A/board.mk | 4 +- os/hal/boards/ST_EVB_SPC56EL/board.c | 1 - os/hal/boards/ST_EVB_SPC56EL/board.mk | 4 +- os/hal/boards/ST_STM3210C_EVAL/board.c | 1 - os/hal/boards/ST_STM3210C_EVAL/board.mk | 4 +- os/hal/boards/ST_STM3210E_EVAL/board.c | 1 - os/hal/boards/ST_STM3210E_EVAL/board.mk | 4 +- os/hal/boards/ST_STM3220G_EVAL/board.c | 1 - os/hal/boards/ST_STM3220G_EVAL/board.mk | 4 +- os/hal/boards/ST_STM32L_DISCOVERY/board.c | 1 - os/hal/boards/ST_STM32L_DISCOVERY/board.mk | 4 +- os/hal/boards/ST_STM32VL_DISCOVERY/board.c | 1 - os/hal/boards/ST_STM32VL_DISCOVERY/board.mk | 4 +- os/hal/boards/ST_STM8L_DISCOVERY/board.c | 1 - os/hal/boards/ST_STM8S_DISCOVERY/board.c | 1 - os/hal/boards/simulator/board.c | 1 - os/hal/boards/simulator/board.mk | 4 +- os/hal/ports/STM32/SPIv1/spi_lld.c | 1 - os/hal/ports/STM32/USARTv1/uart_lld.c | 1 - os/hal/ports/STM32F37x/adc_lld.h | 2 +- os/hal/ports/STM32F37x/hal_lld.h | 35 +-- os/hal/ports/STM32L1xx/adc_lld.c | 20 +- os/hal/ports/STM32L1xx/adc_lld.h | 2 +- os/hal/ports/STM32L1xx/ext_lld_isr.c | 118 +++++----- os/hal/ports/STM32L1xx/hal_lld.c | 12 - os/hal/ports/STM32L1xx/hal_lld.h | 249 +-------------------- os/hal/ports/STM32L1xx/platform.mk | 47 ++-- os/hal/ports/STM32L1xx/stm32_dma.c | 59 +++-- os/hal/ports/STM32L1xx/stm32_dma.h | 8 +- os/hal/ports/STM32L1xx/stm32_registry.h | 175 +++++++++++++++ .../ARMCMx/compilers/GCC/mk/port_stm32l1xx.mk | 15 ++ .../ARMCMx/compilers/GCC/mk/port_stm32l1xx.mk | 15 ++ 92 files changed, 404 insertions(+), 541 deletions(-) create mode 100644 os/hal/ports/STM32L1xx/stm32_registry.h create mode 100644 os/nil/ports/ARMCMx/compilers/GCC/mk/port_stm32l1xx.mk create mode 100644 os/rt/ports/ARMCMx/compilers/GCC/mk/port_stm32l1xx.mk (limited to 'os') diff --git a/os/common/ports/ARMCMx/devices/STM32L1xx/cmparams.h b/os/common/ports/ARMCMx/devices/STM32L1xx/cmparams.h index bd22a1973..39be9d4fa 100644 --- a/os/common/ports/ARMCMx/devices/STM32L1xx/cmparams.h +++ b/os/common/ports/ARMCMx/devices/STM32L1xx/cmparams.h @@ -45,7 +45,7 @@ /** * @brief Floating Point unit presence. */ -#define CORTEX_HAS_FPU 1 +#define CORTEX_HAS_FPU 0 /** * @brief Number of bits in priority masks. diff --git a/os/ext/CMSIS/ST/stm32l1xx.h b/os/ext/CMSIS/ST/stm32l1xx.h index 3bfcbbb85..ce2d7788e 100644 --- a/os/ext/CMSIS/ST/stm32l1xx.h +++ b/os/ext/CMSIS/ST/stm32l1xx.h @@ -175,7 +175,9 @@ typedef enum IRQn MemoryManagement_IRQn = -12, /*!< 4 Cortex-M3 Memory Management Interrupt */ BusFault_IRQn = -11, /*!< 5 Cortex-M3 Bus Fault Interrupt */ UsageFault_IRQn = -10, /*!< 6 Cortex-M3 Usage Fault Interrupt */ - SVC_IRQn = -5, /*!< 11 Cortex-M3 SV Call Interrupt */ + /* CHIBIOS FIX */ + SVCall_IRQn = -5, /*!< 11 Cortex-M3 SV Call Interrupt */ +/* SVC_IRQn = -5,*/ /*!< 11 Cortex-M3 SV Call Interrupt */ DebugMonitor_IRQn = -4, /*!< 12 Cortex-M3 Debug Monitor Interrupt */ PendSV_IRQn = -2, /*!< 14 Cortex-M3 Pend SV Interrupt */ SysTick_IRQn = -1, /*!< 15 Cortex-M3 System Tick Interrupt */ diff --git a/os/hal/boards/ARDUINO_MEGA/board.c b/os/hal/boards/ARDUINO_MEGA/board.c index a33d693ad..c3b9957f0 100644 --- a/os/hal/boards/ARDUINO_MEGA/board.c +++ b/os/hal/boards/ARDUINO_MEGA/board.c @@ -14,7 +14,6 @@ limitations under the License. */ -#include "ch.h" #include "hal.h" /** diff --git a/os/hal/boards/ARDUINO_MEGA/board.mk b/os/hal/boards/ARDUINO_MEGA/board.mk index 8e7f1117e..2eab5ef46 100644 --- a/os/hal/boards/ARDUINO_MEGA/board.mk +++ b/os/hal/boards/ARDUINO_MEGA/board.mk @@ -1,5 +1,5 @@ # List of all the board related files. -BOARDSRC = ${CHIBIOS}/boards/ARDUINO_MEGA/board.c +BOARDSRC = ${CHIBIOS}/os/hal/boards/ARDUINO_MEGA/board.c # Required include directories -BOARDINC = ${CHIBIOS}/boards/ARDUINO_MEGA +BOARDINC = ${CHIBIOS}/os/hal/boards/ARDUINO_MEGA diff --git a/os/hal/boards/EA_LPCXPRESSO_11C24/board.c b/os/hal/boards/EA_LPCXPRESSO_11C24/board.c index 0e00ff2a3..117e5252b 100644 --- a/os/hal/boards/EA_LPCXPRESSO_11C24/board.c +++ b/os/hal/boards/EA_LPCXPRESSO_11C24/board.c @@ -15,7 +15,6 @@ limitations under the License. */ -#include "ch.h" #include "hal.h" /** diff --git a/os/hal/boards/EA_LPCXPRESSO_11C24/board.mk b/os/hal/boards/EA_LPCXPRESSO_11C24/board.mk index d60e6ea6d..52bba5b94 100644 --- a/os/hal/boards/EA_LPCXPRESSO_11C24/board.mk +++ b/os/hal/boards/EA_LPCXPRESSO_11C24/board.mk @@ -1,5 +1,5 @@ # List of all the board related files. -BOARDSRC = ${CHIBIOS}/boards/EA_LPCXPRESSO_11C24/board.c +BOARDSRC = ${CHIBIOS}/os/hal/boards/EA_LPCXPRESSO_11C24/board.c # Required include directories -BOARDINC = ${CHIBIOS}/boards/EA_LPCXPRESSO_11C24 +BOARDINC = ${CHIBIOS}/os/hal/boards/EA_LPCXPRESSO_11C24 diff --git a/os/hal/boards/EA_LPCXPRESSO_BB_1114/board.c b/os/hal/boards/EA_LPCXPRESSO_BB_1114/board.c index a0af7d697..2267e54cc 100644 --- a/os/hal/boards/EA_LPCXPRESSO_BB_1114/board.c +++ b/os/hal/boards/EA_LPCXPRESSO_BB_1114/board.c @@ -14,7 +14,6 @@ limitations under the License. */ -#include "ch.h" #include "hal.h" /** diff --git a/os/hal/boards/EA_LPCXPRESSO_BB_1114/board.mk b/os/hal/boards/EA_LPCXPRESSO_BB_1114/board.mk index affca2d05..0c7ddc599 100644 --- a/os/hal/boards/EA_LPCXPRESSO_BB_1114/board.mk +++ b/os/hal/boards/EA_LPCXPRESSO_BB_1114/board.mk @@ -1,5 +1,5 @@ # List of all the board related files. -BOARDSRC = ${CHIBIOS}/boards/EA_LPCXPRESSO_BB_1114/board.c +BOARDSRC = ${CHIBIOS}/os/hal/boards/EA_LPCXPRESSO_BB_1114/board.c # Required include directories -BOARDINC = ${CHIBIOS}/boards/EA_LPCXPRESSO_BB_1114 +BOARDINC = ${CHIBIOS}/os/hal/boards/EA_LPCXPRESSO_BB_1114 diff --git a/os/hal/boards/EA_LPCXPRESSO_BB_11U14/board.c b/os/hal/boards/EA_LPCXPRESSO_BB_11U14/board.c index 117e78c0e..f1ad1c014 100644 --- a/os/hal/boards/EA_LPCXPRESSO_BB_11U14/board.c +++ b/os/hal/boards/EA_LPCXPRESSO_BB_11U14/board.c @@ -14,7 +14,6 @@ limitations under the License. */ -#include "ch.h" #include "hal.h" /** diff --git a/os/hal/boards/EA_LPCXPRESSO_BB_11U14/board.mk b/os/hal/boards/EA_LPCXPRESSO_BB_11U14/board.mk index 1c5d132d2..47c26c176 100644 --- a/os/hal/boards/EA_LPCXPRESSO_BB_11U14/board.mk +++ b/os/hal/boards/EA_LPCXPRESSO_BB_11U14/board.mk @@ -1,5 +1,5 @@ # List of all the board related files. -BOARDSRC = ${CHIBIOS}/boards/EA_LPCXPRESSO_BB_11U14/board.c +BOARDSRC = ${CHIBIOS}/os/hal/boards/EA_LPCXPRESSO_BB_11U14/board.c # Required include directories -BOARDINC = ${CHIBIOS}/boards/EA_LPCXPRESSO_BB_11U14 +BOARDINC = ${CHIBIOS}/os/hal/boards/EA_LPCXPRESSO_BB_11U14 diff --git a/os/hal/boards/EA_LPCXPRESSO_BB_1343/board.c b/os/hal/boards/EA_LPCXPRESSO_BB_1343/board.c index d25d93d20..5061d62ad 100644 --- a/os/hal/boards/EA_LPCXPRESSO_BB_1343/board.c +++ b/os/hal/boards/EA_LPCXPRESSO_BB_1343/board.c @@ -14,7 +14,6 @@ limitations under the License. */ -#include "ch.h" #include "hal.h" /** diff --git a/os/hal/boards/EA_LPCXPRESSO_BB_1343/board.mk b/os/hal/boards/EA_LPCXPRESSO_BB_1343/board.mk index da59e98c4..84c902422 100644 --- a/os/hal/boards/EA_LPCXPRESSO_BB_1343/board.mk +++ b/os/hal/boards/EA_LPCXPRESSO_BB_1343/board.mk @@ -1,5 +1,5 @@ # List of all the board related files. -BOARDSRC = ${CHIBIOS}/boards/EA_LPCXPRESSO_BB_1343/board.c +BOARDSRC = ${CHIBIOS}/os/hal/boards/EA_LPCXPRESSO_BB_1343/board.c # Required include directories -BOARDINC = ${CHIBIOS}/boards/EA_LPCXPRESSO_BB_1343 +BOARDINC = ${CHIBIOS}/os/hal/boards/EA_LPCXPRESSO_BB_1343 diff --git a/os/hal/boards/EA_LPCXPRESSO_LPC812/board.c b/os/hal/boards/EA_LPCXPRESSO_LPC812/board.c index 1f1952dbf..053ed1a3e 100644 --- a/os/hal/boards/EA_LPCXPRESSO_LPC812/board.c +++ b/os/hal/boards/EA_LPCXPRESSO_LPC812/board.c @@ -14,7 +14,6 @@ limitations under the License. */ -#include "ch.h" #include "hal.h" /** diff --git a/os/hal/boards/EA_LPCXPRESSO_LPC812/board.mk b/os/hal/boards/EA_LPCXPRESSO_LPC812/board.mk index de80424bb..05fab9303 100644 --- a/os/hal/boards/EA_LPCXPRESSO_LPC812/board.mk +++ b/os/hal/boards/EA_LPCXPRESSO_LPC812/board.mk @@ -1,5 +1,5 @@ # List of all the board related files. -BOARDSRC = ${CHIBIOS}/boards/EA_LPCXPRESSO_LPC812/board.c +BOARDSRC = ${CHIBIOS}/os/hal/boards/EA_LPCXPRESSO_LPC812/board.c # Required include directories -BOARDINC = ${CHIBIOS}/boards/EA_LPCXPRESSO_LPC812 +BOARDINC = ${CHIBIOS}/os/hal/boards/EA_LPCXPRESSO_LPC812 diff --git a/os/hal/boards/MAPLEMINI_STM32_F103/board.c b/os/hal/boards/MAPLEMINI_STM32_F103/board.c index 91ae5c34a..bd21d1738 100644 --- a/os/hal/boards/MAPLEMINI_STM32_F103/board.c +++ b/os/hal/boards/MAPLEMINI_STM32_F103/board.c @@ -14,7 +14,6 @@ limitations under the License. */ -#include "ch.h" #include "hal.h" /** diff --git a/os/hal/boards/MAPLEMINI_STM32_F103/board.mk b/os/hal/boards/MAPLEMINI_STM32_F103/board.mk index ab4b30cac..b0a16f987 100644 --- a/os/hal/boards/MAPLEMINI_STM32_F103/board.mk +++ b/os/hal/boards/MAPLEMINI_STM32_F103/board.mk @@ -1,5 +1,5 @@ # List of all the board related files. -BOARDSRC = ${CHIBIOS}/boards/MAPLEMINI_STM32_F103/board.c +BOARDSRC = ${CHIBIOS}/os/hal/boards/MAPLEMINI_STM32_F103/board.c # Required include directories -BOARDINC = ${CHIBIOS}/boards/MAPLEMINI_STM32_F103 +BOARDINC = ${CHIBIOS}/os/hal/boards/MAPLEMINI_STM32_F103 diff --git a/os/hal/boards/NGX_BB_LPC11U14/board.c b/os/hal/boards/NGX_BB_LPC11U14/board.c index 3f3c3d726..690cc0e8b 100644 --- a/os/hal/boards/NGX_BB_LPC11U14/board.c +++ b/os/hal/boards/NGX_BB_LPC11U14/board.c @@ -14,7 +14,6 @@ limitations under the License. */ -#include "ch.h" #include "hal.h" /** diff --git a/os/hal/boards/NGX_BB_LPC11U14/board.mk b/os/hal/boards/NGX_BB_LPC11U14/board.mk index 451d160dd..6e52eb45d 100644 --- a/os/hal/boards/NGX_BB_LPC11U14/board.mk +++ b/os/hal/boards/NGX_BB_LPC11U14/board.mk @@ -1,5 +1,5 @@ # List of all the board related files. -BOARDSRC = ${CHIBIOS}/boards/NGX_BB_LPC11U14/board.c +BOARDSRC = ${CHIBIOS}/os/hal/boards/NGX_BB_LPC11U14/board.c # Required include directories -BOARDINC = ${CHIBIOS}/boards/NGX_BB_LPC11U14 +BOARDINC = ${CHIBIOS}/os/hal/boards/NGX_BB_LPC11U14 diff --git a/os/hal/boards/OLIMEX_AVR_CAN/board.c b/os/hal/boards/OLIMEX_AVR_CAN/board.c index f7e458d9b..9d379b08d 100644 --- a/os/hal/boards/OLIMEX_AVR_CAN/board.c +++ b/os/hal/boards/OLIMEX_AVR_CAN/board.c @@ -14,7 +14,6 @@ limitations under the License. */ -#include "ch.h" #include "hal.h" /** diff --git a/os/hal/boards/OLIMEX_AVR_CAN/board.mk b/os/hal/boards/OLIMEX_AVR_CAN/board.mk index 4d2d406ad..e80cd2771 100644 --- a/os/hal/boards/OLIMEX_AVR_CAN/board.mk +++ b/os/hal/boards/OLIMEX_AVR_CAN/board.mk @@ -1,5 +1,5 @@ # List of all the board related files. -BOARDSRC = ${CHIBIOS}/boards/OLIMEX_AVR_CAN/board.c +BOARDSRC = ${CHIBIOS}/os/hal/boards/OLIMEX_AVR_CAN/board.c # Required include directories -BOARDINC = ${CHIBIOS}/boards/OLIMEX_AVR_CAN +BOARDINC = ${CHIBIOS}/os/hal/boards/OLIMEX_AVR_CAN diff --git a/os/hal/boards/OLIMEX_AVR_MT_128/board.c b/os/hal/boards/OLIMEX_AVR_MT_128/board.c index ff1ee85e8..ee181fe75 100644 --- a/os/hal/boards/OLIMEX_AVR_MT_128/board.c +++ b/os/hal/boards/OLIMEX_AVR_MT_128/board.c @@ -14,7 +14,6 @@ limitations under the License. */ -#include "ch.h" #include "hal.h" /** diff --git a/os/hal/boards/OLIMEX_AVR_MT_128/board.mk b/os/hal/boards/OLIMEX_AVR_MT_128/board.mk index 7b903ffec..259dd2730 100644 --- a/os/hal/boards/OLIMEX_AVR_MT_128/board.mk +++ b/os/hal/boards/OLIMEX_AVR_MT_128/board.mk @@ -1,5 +1,5 @@ # List of all the board related files. -BOARDSRC = ${CHIBIOS}/boards/OLIMEX_AVR_MT_128/board.c +BOARDSRC = ${CHIBIOS}/os/hal/boards/OLIMEX_AVR_MT_128/board.c # Required include directories -BOARDINC = ${CHIBIOS}/boards/OLIMEX_AVR_MT_128 +BOARDINC = ${CHIBIOS}/os/hal/boards/OLIMEX_AVR_MT_128 diff --git a/os/hal/boards/OLIMEX_LPC-P1227/board.c b/os/hal/boards/OLIMEX_LPC-P1227/board.c index 09bb82e7b..226d696c4 100644 --- a/os/hal/boards/OLIMEX_LPC-P1227/board.c +++ b/os/hal/boards/OLIMEX_LPC-P1227/board.c @@ -14,7 +14,6 @@ limitations under the License. */ -#include "ch.h" #include "hal.h" /** diff --git a/os/hal/boards/OLIMEX_LPC-P1227/board.mk b/os/hal/boards/OLIMEX_LPC-P1227/board.mk index 090251880..6d4078802 100644 --- a/os/hal/boards/OLIMEX_LPC-P1227/board.mk +++ b/os/hal/boards/OLIMEX_LPC-P1227/board.mk @@ -1,5 +1,5 @@ # List of all the board related files. -BOARDSRC = ${CHIBIOS}/boards/OLIMEX_LPC-P1227/board.c +BOARDSRC = ${CHIBIOS}/os/hal/boards/OLIMEX_LPC-P1227/board.c # Required include directories -BOARDINC = ${CHIBIOS}/boards/OLIMEX_LPC-P1227 +BOARDINC = ${CHIBIOS}/os/hal/boards/OLIMEX_LPC-P1227 diff --git a/os/hal/boards/OLIMEX_LPC_P1343/board.c b/os/hal/boards/OLIMEX_LPC_P1343/board.c index a0757d587..8a3ca7dd9 100644 --- a/os/hal/boards/OLIMEX_LPC_P1343/board.c +++ b/os/hal/boards/OLIMEX_LPC_P1343/board.c @@ -14,7 +14,6 @@ limitations under the License. */ -#include "ch.h" #include "hal.h" /** diff --git a/os/hal/boards/OLIMEX_LPC_P1343/board.mk b/os/hal/boards/OLIMEX_LPC_P1343/board.mk index 718cc6e29..c8ec923d6 100644 --- a/os/hal/boards/OLIMEX_LPC_P1343/board.mk +++ b/os/hal/boards/OLIMEX_LPC_P1343/board.mk @@ -1,5 +1,5 @@ # List of all the board related files. -BOARDSRC = ${CHIBIOS}/boards/OLIMEX_LPC_P1343/board.c +BOARDSRC = ${CHIBIOS}/os/hal/boards/OLIMEX_LPC_P1343/board.c # Required include directories -BOARDINC = ${CHIBIOS}/boards/OLIMEX_LPC_P1343 +BOARDINC = ${CHIBIOS}/os/hal/boards/OLIMEX_LPC_P1343 diff --git a/os/hal/boards/OLIMEX_LPC_P2148/board.c b/os/hal/boards/OLIMEX_LPC_P2148/board.c index 1c0a00302..eaa0ea054 100644 --- a/os/hal/boards/OLIMEX_LPC_P2148/board.c +++ b/os/hal/boards/OLIMEX_LPC_P2148/board.c @@ -14,7 +14,6 @@ limitations under the License. */ -#include "ch.h" #include "hal.h" #define VAL_TC0_PRESCALER 0 diff --git a/os/hal/boards/OLIMEX_LPC_P2148/board.mk b/os/hal/boards/OLIMEX_LPC_P2148/board.mk index 5d0937e6d..29be6a342 100644 --- a/os/hal/boards/OLIMEX_LPC_P2148/board.mk +++ b/os/hal/boards/OLIMEX_LPC_P2148/board.mk @@ -1,5 +1,5 @@ # List of all the mandatory board related files. -BOARDSRC = ${CHIBIOS}/boards/OLIMEX_LPC_P2148/board.c +BOARDSRC = ${CHIBIOS}/os/hal/boards/OLIMEX_LPC_P2148/board.c # Required include directories -BOARDINC = ${CHIBIOS}/boards/OLIMEX_LPC_P2148 +BOARDINC = ${CHIBIOS}/os/hal/boards/OLIMEX_LPC_P2148 diff --git a/os/hal/boards/OLIMEX_LPC_P2148/buzzer.c b/os/hal/boards/OLIMEX_LPC_P2148/buzzer.c index cf2182f08..a0dede38d 100644 --- a/os/hal/boards/OLIMEX_LPC_P2148/buzzer.c +++ b/os/hal/boards/OLIMEX_LPC_P2148/buzzer.c @@ -22,7 +22,6 @@ * goes silent. */ -#include "ch.h" #include "hal.h" #include "buzzer.h" diff --git a/os/hal/boards/OLIMEX_MSP430_P1611/board.c b/os/hal/boards/OLIMEX_MSP430_P1611/board.c index bf89db001..58bc4df15 100644 --- a/os/hal/boards/OLIMEX_MSP430_P1611/board.c +++ b/os/hal/boards/OLIMEX_MSP430_P1611/board.c @@ -14,7 +14,6 @@ limitations under the License. */ -#include "ch.h" #include "hal.h" /** diff --git a/os/hal/boards/OLIMEX_MSP430_P1611/board.mk b/os/hal/boards/OLIMEX_MSP430_P1611/board.mk index 84acad8ed..19ab61636 100644 --- a/os/hal/boards/OLIMEX_MSP430_P1611/board.mk +++ b/os/hal/boards/OLIMEX_MSP430_P1611/board.mk @@ -1,5 +1,5 @@ # List of all the board related files. -BOARDSRC = ${CHIBIOS}/boards/OLIMEX_MSP430_P1611/board.c +BOARDSRC = ${CHIBIOS}/os/hal/boards/OLIMEX_MSP430_P1611/board.c # Required include directories -BOARDINC = ${CHIBIOS}/boards/OLIMEX_MSP430_P1611 +BOARDINC = ${CHIBIOS}/os/hal/boards/OLIMEX_MSP430_P1611 diff --git a/os/hal/boards/OLIMEX_SAM7_EX256/board.c b/os/hal/boards/OLIMEX_SAM7_EX256/board.c index 9de1b3ffc..49a559a2c 100644 --- a/os/hal/boards/OLIMEX_SAM7_EX256/board.c +++ b/os/hal/boards/OLIMEX_SAM7_EX256/board.c @@ -14,7 +14,6 @@ limitations under the License. */ -#include "ch.h" #include "hal.h" /** diff --git a/os/hal/boards/OLIMEX_SAM7_EX256/board.mk b/os/hal/boards/OLIMEX_SAM7_EX256/board.mk index d0a4816f1..9c44c0259 100644 --- a/os/hal/boards/OLIMEX_SAM7_EX256/board.mk +++ b/os/hal/boards/OLIMEX_SAM7_EX256/board.mk @@ -1,5 +1,5 @@ # List of all the board related files. -BOARDSRC = ${CHIBIOS}/boards/OLIMEX_SAM7_EX256/board.c +BOARDSRC = ${CHIBIOS}/os/hal/boards/OLIMEX_SAM7_EX256/board.c # Required include directories -BOARDINC = ${CHIBIOS}/boards/OLIMEX_SAM7_EX256 +BOARDINC = ${CHIBIOS}/os/hal/boards/OLIMEX_SAM7_EX256 diff --git a/os/hal/boards/OLIMEX_SAM7_P256/board.c b/os/hal/boards/OLIMEX_SAM7_P256/board.c index 936019c4d..acf7727e7 100644 --- a/os/hal/boards/OLIMEX_SAM7_P256/board.c +++ b/os/hal/boards/OLIMEX_SAM7_P256/board.c @@ -14,7 +14,6 @@ limitations under the License. */ -#include "ch.h" #include "hal.h" /** diff --git a/os/hal/boards/OLIMEX_SAM7_P256/board.mk b/os/hal/boards/OLIMEX_SAM7_P256/board.mk index e9fb6691a..7555c8c4e 100644 --- a/os/hal/boards/OLIMEX_SAM7_P256/board.mk +++ b/os/hal/boards/OLIMEX_SAM7_P256/board.mk @@ -1,5 +1,5 @@ # List of all the board related files. -BOARDSRC = ${CHIBIOS}/boards/OLIMEX_SAM7_P256/board.c +BOARDSRC = ${CHIBIOS}/os/hal/boards/OLIMEX_SAM7_P256/board.c # Required include directories -BOARDINC = ${CHIBIOS}/boards/OLIMEX_SAM7_P256 +BOARDINC = ${CHIBIOS}/os/hal/boards/OLIMEX_SAM7_P256 diff --git a/os/hal/boards/OLIMEX_STM32_103STK/board.c b/os/hal/boards/OLIMEX_STM32_103STK/board.c index 91ae5c34a..bd21d1738 100644 --- a/os/hal/boards/OLIMEX_STM32_103STK/board.c +++ b/os/hal/boards/OLIMEX_STM32_103STK/board.c @@ -14,7 +14,6 @@ limitations under the License. */ -#include "ch.h" #include "hal.h" /** diff --git a/os/hal/boards/OLIMEX_STM32_103STK/board.mk b/os/hal/boards/OLIMEX_STM32_103STK/board.mk index 383e1c490..9c67b3d22 100644 --- a/os/hal/boards/OLIMEX_STM32_103STK/board.mk +++ b/os/hal/boards/OLIMEX_STM32_103STK/board.mk @@ -1,5 +1,5 @@ # List of all the board related files. -BOARDSRC = ${CHIBIOS}/boards/OLIMEX_STM32_103STK/board.c +BOARDSRC = ${CHIBIOS}/os/hal/boards/OLIMEX_STM32_103STK/board.c # Required include directories -BOARDINC = ${CHIBIOS}/boards/OLIMEX_STM32_103STK +BOARDINC = ${CHIBIOS}/os/hal/boards/OLIMEX_STM32_103STK diff --git a/os/hal/boards/OLIMEX_STM32_E407/board.c b/os/hal/boards/OLIMEX_STM32_E407/board.c index a4152433a..3fcecd2d5 100644 --- a/os/hal/boards/OLIMEX_STM32_E407/board.c +++ b/os/hal/boards/OLIMEX_STM32_E407/board.c @@ -14,7 +14,6 @@ limitations under the License. */ -#include "ch.h" #include "hal.h" #if HAL_USE_PAL || defined(__DOXYGEN__) diff --git a/os/hal/boards/OLIMEX_STM32_E407/board.mk b/os/hal/boards/OLIMEX_STM32_E407/board.mk index 0f9c9e4a7..4c82966b6 100644 --- a/os/hal/boards/OLIMEX_STM32_E407/board.mk +++ b/os/hal/boards/OLIMEX_STM32_E407/board.mk @@ -1,5 +1,5 @@ # List of all the board related files. -BOARDSRC = ${CHIBIOS}/boards/OLIMEX_STM32_E407/board.c +BOARDSRC = ${CHIBIOS}/os/hal/boards/OLIMEX_STM32_E407/board.c # Required include directories -BOARDINC = ${CHIBIOS}/boards/OLIMEX_STM32_E407 +BOARDINC = ${CHIBIOS}/os/hal/boards/OLIMEX_STM32_E407 diff --git a/os/hal/boards/OLIMEX_STM32_H103/board.c b/os/hal/boards/OLIMEX_STM32_H103/board.c index 91ae5c34a..bd21d1738 100644 --- a/os/hal/boards/OLIMEX_STM32_H103/board.c +++ b/os/hal/boards/OLIMEX_STM32_H103/board.c @@ -14,7 +14,6 @@ limitations under the License. */ -#include "ch.h" #include "hal.h" /** diff --git a/os/hal/boards/OLIMEX_STM32_H103/board.mk b/os/hal/boards/OLIMEX_STM32_H103/board.mk index 040374ffc..5c7d1bf2f 100644 --- a/os/hal/boards/OLIMEX_STM32_H103/board.mk +++ b/os/hal/boards/OLIMEX_STM32_H103/board.mk @@ -1,5 +1,5 @@ # List of all the board related files. -BOARDSRC = ${CHIBIOS}/boards/OLIMEX_STM32_H103/board.c +BOARDSRC = ${CHIBIOS}/os/hal/boards/OLIMEX_STM32_H103/board.c # Required include directories -BOARDINC = ${CHIBIOS}/boards/OLIMEX_STM32_H103 +BOARDINC = ${CHIBIOS}/os/hal/boards/OLIMEX_STM32_H103 diff --git a/os/hal/boards/OLIMEX_STM32_LCD/board.c b/os/hal/boards/OLIMEX_STM32_LCD/board.c index 397ed99b9..a32087a6f 100644 --- a/os/hal/boards/OLIMEX_STM32_LCD/board.c +++ b/os/hal/boards/OLIMEX_STM32_LCD/board.c @@ -14,7 +14,6 @@ limitations under the License. */ -#include "ch.h" #include "hal.h" /** diff --git a/os/hal/boards/OLIMEX_STM32_LCD/board.mk b/os/hal/boards/OLIMEX_STM32_LCD/board.mk index c1cc061de..f9e41b7de 100644 --- a/os/hal/boards/OLIMEX_STM32_LCD/board.mk +++ b/os/hal/boards/OLIMEX_STM32_LCD/board.mk @@ -1,5 +1,5 @@ # List of all the board related files. -BOARDSRC = ${CHIBIOS}/boards/OLIMEX_STM32_LCD/board.c +BOARDSRC = ${CHIBIOS}/os/hal/boards/OLIMEX_STM32_LCD/board.c # Required include directories -BOARDINC = ${CHIBIOS}/boards/OLIMEX_STM32_LCD +BOARDINC = ${CHIBIOS}/os/hal/boards/OLIMEX_STM32_LCD diff --git a/os/hal/boards/OLIMEX_STM32_P103/board.c b/os/hal/boards/OLIMEX_STM32_P103/board.c index ab992f116..afbd504a8 100644 --- a/os/hal/boards/OLIMEX_STM32_P103/board.c +++ b/os/hal/boards/OLIMEX_STM32_P103/board.c @@ -14,7 +14,6 @@ limitations under the License. */ -#include "ch.h" #include "hal.h" /** diff --git a/os/hal/boards/OLIMEX_STM32_P103/board.mk b/os/hal/boards/OLIMEX_STM32_P103/board.mk index 701970e84..0b0857ea7 100644 --- a/os/hal/boards/OLIMEX_STM32_P103/board.mk +++ b/os/hal/boards/OLIMEX_STM32_P103/board.mk @@ -1,5 +1,5 @@ # List of all the board related files. -BOARDSRC = ${CHIBIOS}/boards/OLIMEX_STM32_P103/board.c +BOARDSRC = ${CHIBIOS}/os/hal/boards/OLIMEX_STM32_P103/board.c # Required include directories -BOARDINC = ${CHIBIOS}/boards/OLIMEX_STM32_P103 +BOARDINC = ${CHIBIOS}/os/hal/boards/OLIMEX_STM32_P103 diff --git a/os/hal/boards/OLIMEX_STM32_P107/board.c b/os/hal/boards/OLIMEX_STM32_P107/board.c index 586c27c13..3e27c82e3 100644 --- a/os/hal/boards/OLIMEX_STM32_P107/board.c +++ b/os/hal/boards/OLIMEX_STM32_P107/board.c @@ -14,7 +14,6 @@ limitations under the License. */ -#include "ch.h" #include "hal.h" /** diff --git a/os/hal/boards/OLIMEX_STM32_P107/board.mk b/os/hal/boards/OLIMEX_STM32_P107/board.mk index 63f70119a..a243091b4 100644 --- a/os/hal/boards/OLIMEX_STM32_P107/board.mk +++ b/os/hal/boards/OLIMEX_STM32_P107/board.mk @@ -1,5 +1,5 @@ # List of all the board related files. -BOARDSRC = ${CHIBIOS}/boards/OLIMEX_STM32_P107/board.c +BOARDSRC = ${CHIBIOS}/os/hal/boards/OLIMEX_STM32_P107/board.c # Required include directories -BOARDINC = ${CHIBIOS}/boards/OLIMEX_STM32_P107 +BOARDINC = ${CHIBIOS}/os/hal/boards/OLIMEX_STM32_P107 diff --git a/os/hal/boards/OLIMEX_STM32_P407/board.c b/os/hal/boards/OLIMEX_STM32_P407/board.c index 17ef1d54f..2b4426c25 100644 --- a/os/hal/boards/OLIMEX_STM32_P407/board.c +++ b/os/hal/boards/OLIMEX_STM32_P407/board.c @@ -14,7 +14,6 @@ limitations under the License. */ -#include "ch.h" #include "hal.h" /** diff --git a/os/hal/boards/OLIMEX_STM32_P407/board.mk b/os/hal/boards/OLIMEX_STM32_P407/board.mk index b1e5aafe2..9affc175f 100644 --- a/os/hal/boards/OLIMEX_STM32_P407/board.mk +++ b/os/hal/boards/OLIMEX_STM32_P407/board.mk @@ -1,5 +1,5 @@ # List of all the board related files. -BOARDSRC = ${CHIBIOS}/boards/OLIMEX_STM32_P407/board.c +BOARDSRC = ${CHIBIOS}/os/hal/boards/OLIMEX_STM32_P407/board.c # Required include directories -BOARDINC = ${CHIBIOS}/boards/OLIMEX_STM32_P407 +BOARDINC = ${CHIBIOS}/os/hal/boards/OLIMEX_STM32_P407 diff --git a/os/hal/boards/RAISONANCE_REVA_STM8S/board.c b/os/hal/boards/RAISONANCE_REVA_STM8S/board.c index 33e1fa1e9..ee9c9d32f 100644 --- a/os/hal/boards/RAISONANCE_REVA_STM8S/board.c +++ b/os/hal/boards/RAISONANCE_REVA_STM8S/board.c @@ -14,7 +14,6 @@ limitations under the License. */ -#include "ch.h" #include "hal.h" /** diff --git a/os/hal/boards/STUDIEL_AT91SAM7A3_EK/board.c b/os/hal/boards/STUDIEL_AT91SAM7A3_EK/board.c index 2a3dc015b..29b742015 100644 --- a/os/hal/boards/STUDIEL_AT91SAM7A3_EK/board.c +++ b/os/hal/boards/STUDIEL_AT91SAM7A3_EK/board.c @@ -14,7 +14,6 @@ limitations under the License. */ -#include "ch.h" #include "hal.h" /** diff --git a/os/hal/boards/ST_EVB_SPC560BC/board.c b/os/hal/boards/ST_EVB_SPC560BC/board.c index 5c067606b..4ecf10fd9 100644 --- a/os/hal/boards/ST_EVB_SPC560BC/board.c +++ b/os/hal/boards/ST_EVB_SPC560BC/board.c @@ -14,7 +14,6 @@ limitations under the License. */ -#include "ch.h" #include "hal.h" #if HAL_USE_PAL || defined(__DOXYGEN__) diff --git a/os/hal/boards/ST_EVB_SPC560BC/board.mk b/os/hal/boards/ST_EVB_SPC560BC/board.mk index 92aadc984..02428bd6d 100644 --- a/os/hal/boards/ST_EVB_SPC560BC/board.mk +++ b/os/hal/boards/ST_EVB_SPC560BC/board.mk @@ -1,5 +1,5 @@ # List of all the board related files. -BOARDSRC = ${CHIBIOS}/boards/ST_EVB_SPC560BC/board.c +BOARDSRC = ${CHIBIOS}/os/hal/boards/ST_EVB_SPC560BC/board.c # Required include directories -BOARDINC = ${CHIBIOS}/boards/ST_EVB_SPC560BC +BOARDINC = ${CHIBIOS}/os/hal/boards/ST_EVB_SPC560BC diff --git a/os/hal/boards/ST_EVB_SPC560D/board.c b/os/hal/boards/ST_EVB_SPC560D/board.c index fc5f2c6bc..cb5f3027f 100644 --- a/os/hal/boards/ST_EVB_SPC560D/board.c +++ b/os/hal/boards/ST_EVB_SPC560D/board.c @@ -14,7 +14,6 @@ limitations under the License. */ -#include "ch.h" #include "hal.h" #if HAL_USE_PAL || defined(__DOXYGEN__) diff --git a/os/hal/boards/ST_EVB_SPC560D/board.mk b/os/hal/boards/ST_EVB_SPC560D/board.mk index 8a18b37df..b2c8e2e91 100644 --- a/os/hal/boards/ST_EVB_SPC560D/board.mk +++ b/os/hal/boards/ST_EVB_SPC560D/board.mk @@ -1,5 +1,5 @@ # List of all the board related files. -BOARDSRC = ${CHIBIOS}/boards/ST_EVB_SPC560D/board.c +BOARDSRC = ${CHIBIOS}/os/hal/boards/ST_EVB_SPC560D/board.c # Required include directories -BOARDINC = ${CHIBIOS}/boards/ST_EVB_SPC560D +BOARDINC = ${CHIBIOS}/os/hal/boards/ST_EVB_SPC560D diff --git a/os/hal/boards/ST_EVB_SPC560P/board.c b/os/hal/boards/ST_EVB_SPC560P/board.c index 5410436bb..3f89b89ff 100644 --- a/os/hal/boards/ST_EVB_SPC560P/board.c +++ b/os/hal/boards/ST_EVB_SPC560P/board.c @@ -14,7 +14,6 @@ limitations under the License. */ -#include "ch.h" #include "hal.h" #if HAL_USE_PAL || defined(__DOXYGEN__) diff --git a/os/hal/boards/ST_EVB_SPC560P/board.mk b/os/hal/boards/ST_EVB_SPC560P/board.mk index 01d5f533b..83d7919d1 100644 --- a/os/hal/boards/ST_EVB_SPC560P/board.mk +++ b/os/hal/boards/ST_EVB_SPC560P/board.mk @@ -1,5 +1,5 @@ # List of all the board related files. -BOARDSRC = ${CHIBIOS}/boards/ST_EVB_SPC560P/board.c +BOARDSRC = ${CHIBIOS}/os/hal/boards/ST_EVB_SPC560P/board.c # Required include directories -BOARDINC = ${CHIBIOS}/boards/ST_EVB_SPC560P +BOARDINC = ${CHIBIOS}/os/hal/boards/ST_EVB_SPC560P diff --git a/os/hal/boards/ST_EVB_SPC563M/board.c b/os/hal/boards/ST_EVB_SPC563M/board.c index 523d1d7e5..4a098c568 100644 --- a/os/hal/boards/ST_EVB_SPC563M/board.c +++ b/os/hal/boards/ST_EVB_SPC563M/board.c @@ -14,7 +14,6 @@ limitations under the License. */ -#include "ch.h" #include "hal.h" #if HAL_USE_PAL || defined(__DOXYGEN__) diff --git a/os/hal/boards/ST_EVB_SPC563M/board.mk b/os/hal/boards/ST_EVB_SPC563M/board.mk index 63b4368ec..cb7a0220a 100644 --- a/os/hal/boards/ST_EVB_SPC563M/board.mk +++ b/os/hal/boards/ST_EVB_SPC563M/board.mk @@ -1,5 +1,5 @@ # List of all the board related files. -BOARDSRC = ${CHIBIOS}/boards/ST_EVB_SPC563M/board.c +BOARDSRC = ${CHIBIOS}/os/hal/boards/ST_EVB_SPC563M/board.c # Required include directories -BOARDINC = ${CHIBIOS}/boards/ST_EVB_SPC563M +BOARDINC = ${CHIBIOS}/os/hal/boards/ST_EVB_SPC563M diff --git a/os/hal/boards/ST_EVB_SPC564A/board.c b/os/hal/boards/ST_EVB_SPC564A/board.c index 523d1d7e5..4a098c568 100644 --- a/os/hal/boards/ST_EVB_SPC564A/board.c +++ b/os/hal/boards/ST_EVB_SPC564A/board.c @@ -14,7 +14,6 @@ limitations under the License. */ -#include "ch.h" #include "hal.h" #if HAL_USE_PAL || defined(__DOXYGEN__) diff --git a/os/hal/boards/ST_EVB_SPC564A/board.mk b/os/hal/boards/ST_EVB_SPC564A/board.mk index 1dc4a1117..e651b5d76 100644 --- a/os/hal/boards/ST_EVB_SPC564A/board.mk +++ b/os/hal/boards/ST_EVB_SPC564A/board.mk @@ -1,5 +1,5 @@ # List of all the board related files. -BOARDSRC = ${CHIBIOS}/boards/ST_EVB_SPC564A/board.c +BOARDSRC = ${CHIBIOS}/os/hal/boards/ST_EVB_SPC564A/board.c # Required include directories -BOARDINC = ${CHIBIOS}/boards/ST_EVB_SPC564A +BOARDINC = ${CHIBIOS}/os/hal/boards/ST_EVB_SPC564A diff --git a/os/hal/boards/ST_EVB_SPC56EL/board.c b/os/hal/boards/ST_EVB_SPC56EL/board.c index 7373f595d..87e967e1b 100644 --- a/os/hal/boards/ST_EVB_SPC56EL/board.c +++ b/os/hal/boards/ST_EVB_SPC56EL/board.c @@ -14,7 +14,6 @@ limitations under the License. */ -#include "ch.h" #include "hal.h" #if HAL_USE_PAL || defined(__DOXYGEN__) diff --git a/os/hal/boards/ST_EVB_SPC56EL/board.mk b/os/hal/boards/ST_EVB_SPC56EL/board.mk index 8e5c03bce..392be7a01 100644 --- a/os/hal/boards/ST_EVB_SPC56EL/board.mk +++ b/os/hal/boards/ST_EVB_SPC56EL/board.mk @@ -1,5 +1,5 @@ # List of all the board related files. -BOARDSRC = ${CHIBIOS}/boards/ST_EVB_SPC56EL/board.c +BOARDSRC = ${CHIBIOS}/os/hal/boards/ST_EVB_SPC56EL/board.c # Required include directories -BOARDINC = ${CHIBIOS}/boards/ST_EVB_SPC56EL +BOARDINC = ${CHIBIOS}/os/hal/boards/ST_EVB_SPC56EL diff --git a/os/hal/boards/ST_STM3210C_EVAL/board.c b/os/hal/boards/ST_STM3210C_EVAL/board.c index 030d2f9ae..f9e5a24b5 100644 --- a/os/hal/boards/ST_STM3210C_EVAL/board.c +++ b/os/hal/boards/ST_STM3210C_EVAL/board.c @@ -14,7 +14,6 @@ limitations under the License. */ -#include "ch.h" #include "hal.h" /** diff --git a/os/hal/boards/ST_STM3210C_EVAL/board.mk b/os/hal/boards/ST_STM3210C_EVAL/board.mk index eaa17162b..02e3c6151 100644 --- a/os/hal/boards/ST_STM3210C_EVAL/board.mk +++ b/os/hal/boards/ST_STM3210C_EVAL/board.mk @@ -1,5 +1,5 @@ # List of all the board related files. -BOARDSRC = ${CHIBIOS}/boards/ST_STM3210C_EVAL/board.c +BOARDSRC = ${CHIBIOS}/os/hal/boards/ST_STM3210C_EVAL/board.c # Required include directories -BOARDINC = ${CHIBIOS}/boards/ST_STM3210C_EVAL +BOARDINC = ${CHIBIOS}/os/hal/boards/ST_STM3210C_EVAL diff --git a/os/hal/boards/ST_STM3210E_EVAL/board.c b/os/hal/boards/ST_STM3210E_EVAL/board.c index 95f58e3b0..466aeeb3b 100644 --- a/os/hal/boards/ST_STM3210E_EVAL/board.c +++ b/os/hal/boards/ST_STM3210E_EVAL/board.c @@ -14,7 +14,6 @@ limitations under the License. */ -#include "ch.h" #include "hal.h" /** diff --git a/os/hal/boards/ST_STM3210E_EVAL/board.mk b/os/hal/boards/ST_STM3210E_EVAL/board.mk index edd0baf21..3ad9f44b1 100644 --- a/os/hal/boards/ST_STM3210E_EVAL/board.mk +++ b/os/hal/boards/ST_STM3210E_EVAL/board.mk @@ -1,5 +1,5 @@ # List of all the board related files. -BOARDSRC = ${CHIBIOS}/boards/ST_STM3210E_EVAL/board.c +BOARDSRC = ${CHIBIOS}/os/hal/boards/ST_STM3210E_EVAL/board.c # Required include directories -BOARDINC = ${CHIBIOS}/boards/ST_STM3210E_EVAL +BOARDINC = ${CHIBIOS}/os/hal/boards/ST_STM3210E_EVAL diff --git a/os/hal/boards/ST_STM3220G_EVAL/board.c b/os/hal/boards/ST_STM3220G_EVAL/board.c index c78a97b8d..9eea48d0a 100644 --- a/os/hal/boards/ST_STM3220G_EVAL/board.c +++ b/os/hal/boards/ST_STM3220G_EVAL/board.c @@ -14,7 +14,6 @@ limitations under the License. */ -#include "ch.h" #include "hal.h" /** diff --git a/os/hal/boards/ST_STM3220G_EVAL/board.mk b/os/hal/boards/ST_STM3220G_EVAL/board.mk index 3121594a6..09c301c79 100644 --- a/os/hal/boards/ST_STM3220G_EVAL/board.mk +++ b/os/hal/boards/ST_STM3220G_EVAL/board.mk @@ -1,5 +1,5 @@ # List of all the board related files. -BOARDSRC = ${CHIBIOS}/boards/ST_STM3220G_EVAL/board.c +BOARDSRC = ${CHIBIOS}/os/hal/boards/ST_STM3220G_EVAL/board.c # Required include directories -BOARDINC = ${CHIBIOS}/boards/ST_STM3220G_EVAL +BOARDINC = ${CHIBIOS}/os/hal/boards/ST_STM3220G_EVAL diff --git a/os/hal/boards/ST_STM32L_DISCOVERY/board.c b/os/hal/boards/ST_STM32L_DISCOVERY/board.c index 3d5ff42d9..2e543c2c1 100644 --- a/os/hal/boards/ST_STM32L_DISCOVERY/board.c +++ b/os/hal/boards/ST_STM32L_DISCOVERY/board.c @@ -14,7 +14,6 @@ limitations under the License. */ -#include "ch.h" #include "hal.h" #if HAL_USE_PAL || defined(__DOXYGEN__) diff --git a/os/hal/boards/ST_STM32L_DISCOVERY/board.mk b/os/hal/boards/ST_STM32L_DISCOVERY/board.mk index 7e3fdd8e3..5726178cb 100644 --- a/os/hal/boards/ST_STM32L_DISCOVERY/board.mk +++ b/os/hal/boards/ST_STM32L_DISCOVERY/board.mk @@ -1,5 +1,5 @@ # List of all the board related files. -BOARDSRC = ${CHIBIOS}/boards/ST_STM32L_DISCOVERY/board.c +BOARDSRC = ${CHIBIOS}/os/hal/boards/ST_STM32L_DISCOVERY/board.c # Required include directories -BOARDINC = ${CHIBIOS}/boards/ST_STM32L_DISCOVERY +BOARDINC = ${CHIBIOS}/os/hal/boards/ST_STM32L_DISCOVERY diff --git a/os/hal/boards/ST_STM32VL_DISCOVERY/board.c b/os/hal/boards/ST_STM32VL_DISCOVERY/board.c index 91ae5c34a..bd21d1738 100644 --- a/os/hal/boards/ST_STM32VL_DISCOVERY/board.c +++ b/os/hal/boards/ST_STM32VL_DISCOVERY/board.c @@ -14,7 +14,6 @@ limitations under the License. */ -#include "ch.h" #include "hal.h" /** diff --git a/os/hal/boards/ST_STM32VL_DISCOVERY/board.mk b/os/hal/boards/ST_STM32VL_DISCOVERY/board.mk index 36467943c..e165b3523 100644 --- a/os/hal/boards/ST_STM32VL_DISCOVERY/board.mk +++ b/os/hal/boards/ST_STM32VL_DISCOVERY/board.mk @@ -1,5 +1,5 @@ # List of all the board related files. -BOARDSRC = ${CHIBIOS}/boards/ST_STM32VL_DISCOVERY/board.c +BOARDSRC = ${CHIBIOS}/os/hal/boards/ST_STM32VL_DISCOVERY/board.c # Required include directories -BOARDINC = ${CHIBIOS}/boards/ST_STM32VL_DISCOVERY +BOARDINC = ${CHIBIOS}/os/hal/boards/ST_STM32VL_DISCOVERY diff --git a/os/hal/boards/ST_STM8L_DISCOVERY/board.c b/os/hal/boards/ST_STM8L_DISCOVERY/board.c index d530c295c..9331b6f37 100644 --- a/os/hal/boards/ST_STM8L_DISCOVERY/board.c +++ b/os/hal/boards/ST_STM8L_DISCOVERY/board.c @@ -14,7 +14,6 @@ limitations under the License. */ -#include "ch.h" #include "hal.h" /** diff --git a/os/hal/boards/ST_STM8S_DISCOVERY/board.c b/os/hal/boards/ST_STM8S_DISCOVERY/board.c index 33e1fa1e9..ee9c9d32f 100644 --- a/os/hal/boards/ST_STM8S_DISCOVERY/board.c +++ b/os/hal/boards/ST_STM8S_DISCOVERY/board.c @@ -14,7 +14,6 @@ limitations under the License. */ -#include "ch.h" #include "hal.h" /** diff --git a/os/hal/boards/simulator/board.c b/os/hal/boards/simulator/board.c index 6912c20ad..6bc4be78d 100644 --- a/os/hal/boards/simulator/board.c +++ b/os/hal/boards/simulator/board.c @@ -14,7 +14,6 @@ limitations under the License. */ -#include "ch.h" #include "hal.h" /** diff --git a/os/hal/boards/simulator/board.mk b/os/hal/boards/simulator/board.mk index a48747c66..53df6209f 100644 --- a/os/hal/boards/simulator/board.mk +++ b/os/hal/boards/simulator/board.mk @@ -1,5 +1,5 @@ # List of all the simulator board related files. -BOARDSRC = ${CHIBIOS}/boards/simulator/board.c +BOARDSRC = ${CHIBIOS}/os/hal/boards/simulator/board.c # Required include directories -BOARDINC = ${CHIBIOS}/boards/simulator +BOARDINC = ${CHIBIOS}/os/hal/boards/simulator diff --git a/os/hal/ports/STM32/SPIv1/spi_lld.c b/os/hal/ports/STM32/SPIv1/spi_lld.c index 74d21273a..2c8231086 100644 --- a/os/hal/ports/STM32/SPIv1/spi_lld.c +++ b/os/hal/ports/STM32/SPIv1/spi_lld.c @@ -22,7 +22,6 @@ * @{ */ -#include "ch.h" #include "hal.h" #if HAL_USE_SPI || defined(__DOXYGEN__) diff --git a/os/hal/ports/STM32/USARTv1/uart_lld.c b/os/hal/ports/STM32/USARTv1/uart_lld.c index d77d9bd98..8f1bcfb13 100644 --- a/os/hal/ports/STM32/USARTv1/uart_lld.c +++ b/os/hal/ports/STM32/USARTv1/uart_lld.c @@ -22,7 +22,6 @@ * @{ */ -#include "ch.h" #include "hal.h" #if HAL_USE_UART || defined(__DOXYGEN__) diff --git a/os/hal/ports/STM32F37x/adc_lld.h b/os/hal/ports/STM32F37x/adc_lld.h index 2258952b1..db7ae39ec 100644 --- a/os/hal/ports/STM32F37x/adc_lld.h +++ b/os/hal/ports/STM32F37x/adc_lld.h @@ -397,7 +397,7 @@ typedef struct { /** * @brief Enables the circular buffer mode for the group. */ - bool_t circular; + bool circular; /** * @brief Number of the analog channels belonging to the conversion group. */ diff --git a/os/hal/ports/STM32F37x/hal_lld.h b/os/hal/ports/STM32F37x/hal_lld.h index 2d7a0dac1..763e70da0 100644 --- a/os/hal/ports/STM32F37x/hal_lld.h +++ b/os/hal/ports/STM32F37x/hal_lld.h @@ -965,48 +965,15 @@ /* Driver data structures and types. */ /*===========================================================================*/ -/** - * @brief Type representing a system clock frequency. - */ -typedef uint32_t halclock_t; - -/** - * @brief Type of the realtime free counter value. - */ -typedef uint32_t halrtcnt_t; - /*===========================================================================*/ /* Driver macros. */ /*===========================================================================*/ -/** - * @brief Returns the current value of the system free running counter. - * @note This service is implemented by returning the content of the - * DWT_CYCCNT register. - * - * @return The value of the system free running counter of - * type halrtcnt_t. - * - * @notapi - */ -#define hal_lld_get_counter_value() DWT_CYCCNT - -/** - * @brief Realtime counter frequency. - * @note The DWT_CYCCNT register is incremented directly by the system - * clock so this function returns STM32_HCLK. - * - * @return The realtime counter frequency of type halclock_t. - * - * @notapi - */ -#define hal_lld_get_counter_frequency() STM32_HCLK - /*===========================================================================*/ /* External declarations. */ /*===========================================================================*/ -/* STM32 ISR, DMA and RCC helpers.*/ +/* Various helpers.*/ #include "nvic.h" #include "stm32_isr.h" #include "stm32_dma.h" diff --git a/os/hal/ports/STM32L1xx/adc_lld.c b/os/hal/ports/STM32L1xx/adc_lld.c index 5e6ec80a2..ab4b7cd1a 100644 --- a/os/hal/ports/STM32L1xx/adc_lld.c +++ b/os/hal/ports/STM32L1xx/adc_lld.c @@ -22,7 +22,6 @@ * @{ */ -#include "ch.h" #include "hal.h" #if HAL_USE_ADC || defined(__DOXYGEN__) @@ -88,10 +87,10 @@ static void adc_lld_serve_rx_interrupt(ADCDriver *adcp, uint32_t flags) { * * @isr */ -CH_IRQ_HANDLER(ADC1_IRQHandler) { +OSAL_IRQ_HANDLER(ADC1_IRQHandler) { uint32_t sr; - CH_IRQ_PROLOGUE(); + OSAL_IRQ_PROLOGUE(); sr = ADC1->SR; ADC1->SR = 0; @@ -105,7 +104,7 @@ CH_IRQ_HANDLER(ADC1_IRQHandler) { } /* TODO: Add here analog watchdog handling.*/ - CH_IRQ_EPILOGUE(); + OSAL_IRQ_EPILOGUE(); } #endif @@ -134,7 +133,7 @@ void adc_lld_init(void) { /* The shared vector is initialized on driver initialization and never disabled.*/ - nvicEnableVector(ADC1_IRQn, CORTEX_PRIORITY_MASK(STM32_ADC_IRQ_PRIORITY)); + nvicEnableVector(ADC1_IRQn, STM32_ADC_IRQ_PRIORITY); } /** @@ -150,12 +149,11 @@ void adc_lld_start(ADCDriver *adcp) { if (adcp->state == ADC_STOP) { #if STM32_ADC_USE_ADC1 if (&ADCD1 == adcp) { - bool_t b; - b = dmaStreamAllocate(adcp->dmastp, - STM32_ADC_ADC1_DMA_IRQ_PRIORITY, - (stm32_dmaisr_t)adc_lld_serve_rx_interrupt, - (void *)adcp); - chDbgAssert(!b, "adc_lld_start(), #1", "stream already allocated"); + bool b = dmaStreamAllocate(adcp->dmastp, + STM32_ADC_ADC1_DMA_IRQ_PRIORITY, + (stm32_dmaisr_t)adc_lld_serve_rx_interrupt, + (void *)adcp); + osalDbgAssert(!b, "stream already allocated"); dmaStreamSetPeripheral(adcp->dmastp, &ADC1->DR); rccEnableADC1(FALSE); } diff --git a/os/hal/ports/STM32L1xx/adc_lld.h b/os/hal/ports/STM32L1xx/adc_lld.h index 2ac857c16..6d11ea93c 100644 --- a/os/hal/ports/STM32L1xx/adc_lld.h +++ b/os/hal/ports/STM32L1xx/adc_lld.h @@ -235,7 +235,7 @@ typedef struct { /** * @brief Enables the circular buffer mode for the group. */ - bool_t circular; + bool circular; /** * @brief Number of the analog channels belonging to the conversion group. */ diff --git a/os/hal/ports/STM32L1xx/ext_lld_isr.c b/os/hal/ports/STM32L1xx/ext_lld_isr.c index ea9259a69..fda41f1ac 100644 --- a/os/hal/ports/STM32L1xx/ext_lld_isr.c +++ b/os/hal/ports/STM32L1xx/ext_lld_isr.c @@ -22,7 +22,6 @@ * @{ */ -#include "ch.h" #include "hal.h" #if HAL_USE_EXT || defined(__DOXYGEN__) @@ -54,14 +53,14 @@ * * @isr */ -CH_IRQ_HANDLER(EXTI0_IRQHandler) { +OSAL_IRQ_HANDLER(EXTI0_IRQHandler) { - CH_IRQ_PROLOGUE(); + OSAL_IRQ_PROLOGUE(); EXTI->PR = (1 << 0); EXTD1.config->channels[0].cb(&EXTD1, 0); - CH_IRQ_EPILOGUE(); + OSAL_IRQ_EPILOGUE(); } /** @@ -69,14 +68,14 @@ CH_IRQ_HANDLER(EXTI0_IRQHandler) { * * @isr */ -CH_IRQ_HANDLER(EXTI1_IRQHandler) { +OSAL_IRQ_HANDLER(EXTI1_IRQHandler) { - CH_IRQ_PROLOGUE(); + OSAL_IRQ_PROLOGUE(); EXTI->PR = (1 << 1); EXTD1.config->channels[1].cb(&EXTD1, 1); - CH_IRQ_EPILOGUE(); + OSAL_IRQ_EPILOGUE(); } /** @@ -84,14 +83,14 @@ CH_IRQ_HANDLER(EXTI1_IRQHandler) { * * @isr */ -CH_IRQ_HANDLER(EXTI2_IRQHandler) { +OSAL_IRQ_HANDLER(EXTI2_IRQHandler) { - CH_IRQ_PROLOGUE(); + OSAL_IRQ_PROLOGUE(); EXTI->PR = (1 << 2); EXTD1.config->channels[2].cb(&EXTD1, 2); - CH_IRQ_EPILOGUE(); + OSAL_IRQ_EPILOGUE(); } /** @@ -99,14 +98,14 @@ CH_IRQ_HANDLER(EXTI2_IRQHandler) { * * @isr */ -CH_IRQ_HANDLER(EXTI3_IRQHandler) { +OSAL_IRQ_HANDLER(EXTI3_IRQHandler) { - CH_IRQ_PROLOGUE(); + OSAL_IRQ_PROLOGUE(); EXTI->PR = (1 << 3); EXTD1.config->channels[3].cb(&EXTD1, 3); - CH_IRQ_EPILOGUE(); + OSAL_IRQ_EPILOGUE(); } /** @@ -114,14 +113,14 @@ CH_IRQ_HANDLER(EXTI3_IRQHandler) { * * @isr */ -CH_IRQ_HANDLER(EXTI4_IRQHandler) { +OSAL_IRQ_HANDLER(EXTI4_IRQHandler) { - CH_IRQ_PROLOGUE(); + OSAL_IRQ_PROLOGUE(); EXTI->PR = (1 << 4); EXTD1.config->channels[4].cb(&EXTD1, 4); - CH_IRQ_EPILOGUE(); + OSAL_IRQ_EPILOGUE(); } /** @@ -129,10 +128,10 @@ CH_IRQ_HANDLER(EXTI4_IRQHandler) { * * @isr */ -CH_IRQ_HANDLER(EXTI9_5_IRQHandler) { +OSAL_IRQ_HANDLER(EXTI9_5_IRQHandler) { uint32_t pr; - CH_IRQ_PROLOGUE(); + OSAL_IRQ_PROLOGUE(); pr = EXTI->PR & ((1 << 5) | (1 << 6) | (1 << 7) | (1 << 8) | (1 << 9)); EXTI->PR = pr; @@ -147,7 +146,7 @@ CH_IRQ_HANDLER(EXTI9_5_IRQHandler) { if (pr & (1 << 9)) EXTD1.config->channels[9].cb(&EXTD1, 9); - CH_IRQ_EPILOGUE(); + OSAL_IRQ_EPILOGUE(); } /** @@ -155,10 +154,10 @@ CH_IRQ_HANDLER(EXTI9_5_IRQHandler) { * * @isr */ -CH_IRQ_HANDLER(EXTI15_10_IRQHandler) { +OSAL_IRQ_HANDLER(EXTI15_10_IRQHandler) { uint32_t pr; - CH_IRQ_PROLOGUE(); + OSAL_IRQ_PROLOGUE(); pr = EXTI->PR & ((1 << 10) | (1 << 11) | (1 << 12) | (1 << 13) | (1 << 14) | (1 << 15)); @@ -176,7 +175,7 @@ CH_IRQ_HANDLER(EXTI15_10_IRQHandler) { if (pr & (1 << 15)) EXTD1.config->channels[15].cb(&EXTD1, 15); - CH_IRQ_EPILOGUE(); + OSAL_IRQ_EPILOGUE(); } /** @@ -184,14 +183,14 @@ CH_IRQ_HANDLER(EXTI15_10_IRQHandler) { * * @isr */ -CH_IRQ_HANDLER(PVD_IRQHandler) { +OSAL_IRQ_HANDLER(PVD_IRQHandler) { - CH_IRQ_PROLOGUE(); + OSAL_IRQ_PROLOGUE(); EXTI->PR = (1 << 16); EXTD1.config->channels[16].cb(&EXTD1, 16); - CH_IRQ_EPILOGUE(); + OSAL_IRQ_EPILOGUE(); } /** @@ -199,28 +198,28 @@ CH_IRQ_HANDLER(PVD_IRQHandler) { * * @isr */ -CH_IRQ_HANDLER(RTC_Alarm_IRQHandler) { +OSAL_IRQ_HANDLER(RTC_Alarm_IRQHandler) { - CH_IRQ_PROLOGUE(); + OSAL_IRQ_PROLOGUE(); EXTI->PR = (1 << 17); EXTD1.config->channels[17].cb(&EXTD1, 17); - CH_IRQ_EPILOGUE(); + OSAL_IRQ_EPILOGUE(); } /** * @brief EXTI[18] interrupt handler (USB_FS_WKUP). * * @isr */ -CH_IRQ_HANDLER(USB_FS_WKUP_IRQHandler) { +OSAL_IRQ_HANDLER(USB_FS_WKUP_IRQHandler) { - CH_IRQ_PROLOGUE(); + OSAL_IRQ_PROLOGUE(); EXTI->PR = (1 << 18); EXTD1.config->channels[18].cb(&EXTD1, 18); - CH_IRQ_EPILOGUE(); + OSAL_IRQ_EPILOGUE(); } /** @@ -228,14 +227,14 @@ CH_IRQ_HANDLER(USB_FS_WKUP_IRQHandler) { * * @isr */ -CH_IRQ_HANDLER(TAMPER_STAMP_IRQHandler) { +OSAL_IRQ_HANDLER(TAMPER_STAMP_IRQHandler) { - CH_IRQ_PROLOGUE(); + OSAL_IRQ_PROLOGUE(); EXTI->PR = (1 << 19); EXTD1.config->channels[19].cb(&EXTD1, 19); - CH_IRQ_EPILOGUE(); + OSAL_IRQ_EPILOGUE(); } /** @@ -243,14 +242,14 @@ CH_IRQ_HANDLER(TAMPER_STAMP_IRQHandler) { * * @isr */ -CH_IRQ_HANDLER(RTC_WKUP_IRQHandler) { +OSAL_IRQ_HANDLER(RTC_WKUP_IRQHandler) { - CH_IRQ_PROLOGUE(); + OSAL_IRQ_PROLOGUE(); EXTI->PR = (1 << 20); EXTD1.config->channels[20].cb(&EXTD1, 20); - CH_IRQ_EPILOGUE(); + OSAL_IRQ_EPILOGUE(); } /** @@ -258,10 +257,10 @@ CH_IRQ_HANDLER(RTC_WKUP_IRQHandler) { * * @isr */ -CH_IRQ_HANDLER(COMP_IRQHandler) { +OSAL_IRQ_HANDLER(COMP_IRQHandler) { uint32_t pr; - CH_IRQ_PROLOGUE(); + OSAL_IRQ_PROLOGUE(); pr = EXTI->PR & ((1 << 21) | (1 << 22)); EXTI->PR = pr; @@ -270,7 +269,7 @@ CH_IRQ_HANDLER(COMP_IRQHandler) { if (pr & (1 << 22)) EXTD1.config->channels[22].cb(&EXTD1, 22); - CH_IRQ_EPILOGUE(); + OSAL_IRQ_EPILOGUE(); } /*===========================================================================*/ @@ -284,32 +283,19 @@ CH_IRQ_HANDLER(COMP_IRQHandler) { */ void ext_lld_exti_irq_enable(void) { - nvicEnableVector(EXTI0_IRQn, - CORTEX_PRIORITY_MASK(STM32_EXT_EXTI0_IRQ_PRIORITY)); - nvicEnableVector(EXTI1_IRQn, - CORTEX_PRIORITY_MASK(STM32_EXT_EXTI1_IRQ_PRIORITY)); - nvicEnableVector(EXTI2_IRQn, - CORTEX_PRIORITY_MASK(STM32_EXT_EXTI2_IRQ_PRIORITY)); - nvicEnableVector(EXTI3_IRQn, - CORTEX_PRIORITY_MASK(STM32_EXT_EXTI3_IRQ_PRIORITY)); - nvicEnableVector(EXTI4_IRQn, - CORTEX_PRIORITY_MASK(STM32_EXT_EXTI4_IRQ_PRIORITY)); - nvicEnableVector(EXTI9_5_IRQn, - CORTEX_PRIORITY_MASK(STM32_EXT_EXTI5_9_IRQ_PRIORITY)); - nvicEnableVector(EXTI15_10_IRQn, - CORTEX_PRIORITY_MASK(STM32_EXT_EXTI10_15_IRQ_PRIORITY)); - nvicEnableVector(PVD_IRQn, - CORTEX_PRIORITY_MASK(STM32_EXT_EXTI16_IRQ_PRIORITY)); - nvicEnableVector(RTC_Alarm_IRQn, - CORTEX_PRIORITY_MASK(STM32_EXT_EXTI17_IRQ_PRIORITY)); - nvicEnableVector(USB_FS_WKUP_IRQn, - CORTEX_PRIORITY_MASK(STM32_EXT_EXTI18_IRQ_PRIORITY)); - nvicEnableVector(TAMPER_STAMP_IRQn, - CORTEX_PRIORITY_MASK(STM32_EXT_EXTI19_IRQ_PRIORITY)); - nvicEnableVector(RTC_WKUP_IRQn, - CORTEX_PRIORITY_MASK(STM32_EXT_EXTI20_IRQ_PRIORITY)); - nvicEnableVector(COMP_IRQn, - CORTEX_PRIORITY_MASK(STM32_EXT_EXTI21_22_IRQ_PRIORITY)); + nvicEnableVector(EXTI0_IRQn, STM32_EXT_EXTI0_IRQ_PRIORITY); + nvicEnableVector(EXTI1_IRQn, STM32_EXT_EXTI1_IRQ_PRIORITY); + nvicEnableVector(EXTI2_IRQn, STM32_EXT_EXTI2_IRQ_PRIORITY); + nvicEnableVector(EXTI3_IRQn, STM32_EXT_EXTI3_IRQ_PRIORITY); + nvicEnableVector(EXTI4_IRQn, STM32_EXT_EXTI4_IRQ_PRIORITY); + nvicEnableVector(EXTI9_5_IRQn, STM32_EXT_EXTI5_9_IRQ_PRIORITY); + nvicEnableVector(EXTI15_10_IRQn, STM32_EXT_EXTI10_15_IRQ_PRIORITY); + nvicEnableVector(PVD_IRQn, STM32_EXT_EXTI16_IRQ_PRIORITY); + nvicEnableVector(RTC_Alarm_IRQn, STM32_EXT_EXTI17_IRQ_PRIORITY); + nvicEnableVector(USB_FS_WKUP_IRQn, STM32_EXT_EXTI18_IRQ_PRIORITY); + nvicEnableVector(TAMPER_STAMP_IRQn, STM32_EXT_EXTI19_IRQ_PRIORITY); + nvicEnableVector(RTC_WKUP_IRQn, STM32_EXT_EXTI20_IRQ_PRIORITY); + nvicEnableVector(COMP_IRQn, STM32_EXT_EXTI21_22_IRQ_PRIORITY); } /** diff --git a/os/hal/ports/STM32L1xx/hal_lld.c b/os/hal/ports/STM32L1xx/hal_lld.c index 529099e6a..056a8fc88 100644 --- a/os/hal/ports/STM32L1xx/hal_lld.c +++ b/os/hal/ports/STM32L1xx/hal_lld.c @@ -24,7 +24,6 @@ /* TODO: LSEBYP like in F3.*/ -#include "ch.h" #include "hal.h" /*===========================================================================*/ @@ -98,17 +97,6 @@ void hal_lld_init(void) { rccResetAPB1(~RCC_APB1RSTR_PWRRST); rccResetAPB2(~0); - /* SysTick initialization using the system clock.*/ - SysTick->LOAD = STM32_HCLK / CH_FREQUENCY - 1; - SysTick->VAL = 0; - SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk | - SysTick_CTRL_ENABLE_Msk | - SysTick_CTRL_TICKINT_Msk; - - /* DWT cycle counter enable.*/ - SCS_DEMCR |= SCS_DEMCR_TRCENA; - DWT_CTRL |= DWT_CTRL_CYCCNTENA; - /* PWR clock enabled.*/ rccEnablePWRInterface(FALSE); diff --git a/os/hal/ports/STM32L1xx/hal_lld.h b/os/hal/ports/STM32L1xx/hal_lld.h index 3e8692e93..dca4b5966 100644 --- a/os/hal/ports/STM32L1xx/hal_lld.h +++ b/os/hal/ports/STM32L1xx/hal_lld.h @@ -35,6 +35,7 @@ #define _HAL_LLD_H_ #include "stm32.h" +#include "stm32_registry.h" /*===========================================================================*/ /* Driver constants. */ @@ -166,218 +167,6 @@ #define STM32_RTCSEL_HSEDIV (3 << 16) /**< RTC source is HSE divided. */ /** @} */ -/*===========================================================================*/ -/* Platform capabilities. */ -/*===========================================================================*/ - -/** - * @name STM32L1xx capabilities - * @{ - */ -/* ADC attributes.*/ -#define STM32_HAS_ADC1 TRUE -#define STM32_HAS_ADC2 FALSE -#define STM32_HAS_ADC3 FALSE -#define STM32_HAS_ADC4 FALSE - -/* CAN attributes.*/ -#define STM32_HAS_CAN1 FALSE -#define STM32_HAS_CAN2 FALSE -#define STM32_CAN_MAX_FILTERS 0 - -/* DAC attributes.*/ -#define STM32_HAS_DAC TRUE - -/* DMA attributes.*/ -#define STM32_ADVANCED_DMA FALSE -#define STM32_HAS_DMA1 TRUE -#define STM32_HAS_DMA2 FALSE - -/* ETH attributes.*/ -#define STM32_HAS_ETH FALSE - -/* EXTI attributes.*/ -#define STM32_EXTI_NUM_CHANNELS 23 - -/* GPIO attributes.*/ -#define STM32_HAS_GPIOA TRUE -#define STM32_HAS_GPIOB TRUE -#define STM32_HAS_GPIOC TRUE -#define STM32_HAS_GPIOD TRUE -#define STM32_HAS_GPIOE TRUE -#define STM32_HAS_GPIOF FALSE -#define STM32_HAS_GPIOG FALSE -#define STM32_HAS_GPIOH TRUE -#define STM32_HAS_GPIOI FALSE - -/* I2C attributes.*/ -#define STM32_HAS_I2C1 TRUE -#define STM32_I2C1_RX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 7)) -#define STM32_I2C1_RX_DMA_CHN 0x00000000 -#define STM32_I2C1_TX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 6)) -#define STM32_I2C1_TX_DMA_CHN 0x00000000 - -#define STM32_HAS_I2C2 TRUE -#define STM32_I2C2_RX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 5)) -#define STM32_I2C2_RX_DMA_CHN 0x00000000 -#define STM32_I2C2_TX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 4)) -#define STM32_I2C2_TX_DMA_CHN 0x00000000 - -#define STM32_HAS_I2C3 FALSE -#define STM32_I2C3_RX_DMA_MSK 0 -#define STM32_I2C3_RX_DMA_CHN 0x00000000 -#define STM32_I2C3_TX_DMA_MSK 0 -#define STM32_I2C3_TX_DMA_CHN 0x00000000 - -/* RTC attributes.*/ -#define STM32_HAS_RTC TRUE -#define STM32_RTC_HAS_SUBSECONDS FALSE -#define STM32_RTC_IS_CALENDAR TRUE - -/* SDIO attributes.*/ -#define STM32_HAS_SDIO TRUE - -/* SPI attributes.*/ -#define STM32_HAS_SPI1 TRUE -#define STM32_SPI1_RX_DMA_MSK STM32_DMA_STREAM_ID_MSK(1, 2) -#define STM32_SPI1_RX_DMA_CHN 0x00000000 -#define STM32_SPI1_TX_DMA_MSK STM32_DMA_STREAM_ID_MSK(1, 3) -#define STM32_SPI1_TX_DMA_CHN 0x00000000 - -#define STM32_HAS_SPI2 TRUE -#define STM32_SPI2_RX_DMA_MSK STM32_DMA_STREAM_ID_MSK(1, 4) -#define STM32_SPI2_RX_DMA_CHN 0x00000000 -#define STM32_SPI2_TX_DMA_MSK STM32_DMA_STREAM_ID_MSK(1, 5) -#define STM32_SPI2_TX_DMA_CHN 0x00000000 - -#define STM32_HAS_SPI3 FALSE -#define STM32_SPI3_RX_DMA_MSK 0 -#define STM32_SPI3_RX_DMA_CHN 0x00000000 -#define STM32_SPI3_TX_DMA_MSK 0 -#define STM32_SPI3_TX_DMA_CHN 0x00000000 - -/* TIM attributes.*/ -#define STM32_HAS_TIM1 FALSE -#define STM32_HAS_TIM2 TRUE -#define STM32_HAS_TIM3 TRUE -#define STM32_HAS_TIM4 TRUE -#define STM32_HAS_TIM5 FALSE -#define STM32_HAS_TIM6 TRUE -#define STM32_HAS_TIM7 TRUE -#define STM32_HAS_TIM8 FALSE -#define STM32_HAS_TIM9 TRUE -#define STM32_HAS_TIM10 TRUE -#define STM32_HAS_TIM11 TRUE -#define STM32_HAS_TIM12 FALSE -#define STM32_HAS_TIM13 FALSE -#define STM32_HAS_TIM14 FALSE -#define STM32_HAS_TIM15 FALSE -#define STM32_HAS_TIM16 FALSE -#define STM32_HAS_TIM17 FALSE -#define STM32_HAS_TIM18 FALSE -#define STM32_HAS_TIM19 FALSE - -/* USART attributes.*/ -#define STM32_HAS_USART1 TRUE -#define STM32_USART1_RX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 5)) -#define STM32_USART1_RX_DMA_CHN 0x00000000 -#define STM32_USART1_TX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 4)) -#define STM32_USART1_TX_DMA_CHN 0x00000000 - -#define STM32_HAS_USART2 TRUE -#define STM32_USART2_RX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 6)) -#define STM32_USART2_RX_DMA_CHN 0x00000000 -#define STM32_USART2_TX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 7)) -#define STM32_USART2_TX_DMA_CHN 0x00000000 - -#define STM32_HAS_USART3 TRUE -#define STM32_USART3_RX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 3)) -#define STM32_USART3_RX_DMA_CHN 0x00000000 -#define STM32_USART3_TX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 2)) -#define STM32_USART3_TX_DMA_CHN 0x00000000 - -#define STM32_HAS_UART4 FALSE -#define STM32_UART4_RX_DMA_MSK 0 -#define STM32_UART4_RX_DMA_CHN 0x00000000 -#define STM32_UART4_TX_DMA_MSK 0 -#define STM32_UART4_TX_DMA_CHN 0x00000000 - -#define STM32_HAS_UART5 FALSE -#define STM32_UART5_RX_DMA_MSK 0 -#define STM32_UART5_RX_DMA_CHN 0x00000000 -#define STM32_UART5_TX_DMA_MSK 0 -#define STM32_UART5_TX_DMA_CHN 0x00000000 - -#define STM32_HAS_USART6 FALSE -#define STM32_USART6_RX_DMA_MSK 0 -#define STM32_USART6_RX_DMA_CHN 0x00000000 -#define STM32_USART6_TX_DMA_MSK 0 -#define STM32_USART6_TX_DMA_CHN 0x00000000 - -/* USB attributes.*/ -#define STM32_HAS_USB TRUE -#define STM32_HAS_OTG1 FALSE -#define STM32_HAS_OTG2 FALSE -/** @} */ - -/*===========================================================================*/ -/* Platform specific friendly IRQ names. */ -/*===========================================================================*/ - -/** - * @name IRQ VECTOR names - * @{ - */ -#define WWDG_IRQHandler Vector40 /**< Window Watchdog. */ -#define PVD_IRQHandler Vector44 /**< PVD through EXTI Line - detect. */ -#define TAMPER_STAMP_IRQHandler Vector48 /**< Tamper and Time Stamp - through EXTI. */ -#define RTC_WKUP_IRQHandler Vector4C /**< RTC Wakeup Timer through - EXTI. */ -#define FLASH_IRQHandler Vector50 /**< Flash. */ -#define RCC_IRQHandler Vector54 /**< RCC. */ -#define EXTI0_IRQHandler Vector58 /**< EXTI Line 0. */ -#define EXTI1_IRQHandler Vector5C /**< EXTI Line 1. */ -#define EXTI2_IRQHandler Vector60 /**< EXTI Line 2. */ -#define EXTI3_IRQHandler Vector64 /**< EXTI Line 3. */ -#define EXTI4_IRQHandler Vector68 /**< EXTI Line 4. */ -#define DMA1_Ch1_IRQHandler Vector6C /**< DMA1 Channel 1. */ -#define DMA1_Ch2_IRQHandler Vector70 /**< DMA1 Channel 2. */ -#define DMA1_Ch3_IRQHandler Vector74 /**< DMA1 Channel 3. */ -#define DMA1_Ch4_IRQHandler Vector78 /**< DMA1 Channel 4. */ -#define DMA1_Ch5_IRQHandler Vector7C /**< DMA1 Channel 5. */ -#define DMA1_Ch6_IRQHandler Vector80 /**< DMA1 Channel 6. */ -#define DMA1_Ch7_IRQHandler Vector84 /**< DMA1 Channel 7. */ -#define ADC1_IRQHandler Vector88 /**< ADC1. */ -#define USB_HP_IRQHandler Vector8C /**< USB High Priority. */ -#define USB_LP_IRQHandler Vector90 /**< USB Low Priority. */ -#define DAC_IRQHandler Vector94 /**< DAC. */ -#define COMP_IRQHandler Vector98 /**< Comparator through EXTI. */ -#define EXTI9_5_IRQHandler Vector9C /**< EXTI Line 9..5. */ -#define TIM9_IRQHandler VectorA0 /**< TIM9. */ -#define TIM10_IRQHandler VectorA4 /**< TIM10. */ -#define TIM11_IRQHandler VectorA8 /**< TIM11. */ -#define LCD_IRQHandler VectorAC /**< LCD. */ -#define TIM2_IRQHandler VectorB0 /**< TIM2. */ -#define TIM3_IRQHandler VectorB4 /**< TIM3. */ -#define TIM4_IRQHandler VectorB8 /**< TIM4. */ -#define I2C1_EV_IRQHandler VectorBC /**< I2C1 Event. */ -#define I2C1_ER_IRQHandler VectorC0 /**< I2C1 Error. */ -#define I2C2_EV_IRQHandler VectorC4 /**< I2C2 Event. */ -#define I2C2_ER_IRQHandler VectorC8 /**< I2C2 Error. */ -#define SPI1_IRQHandler VectorCC /**< SPI1. */ -#define SPI2_IRQHandler VectorD0 /**< SPI2. */ -#define USART1_IRQHandler VectorD4 /**< USART1. */ -#define USART2_IRQHandler VectorD8 /**< USART2. */ -#define USART3_IRQHandler VectorDC /**< USART3. */ -#define EXTI15_10_IRQHandler VectorE0 /**< EXTI Line 15..10. */ -#define RTC_Alarm_IRQHandler VectorE4 /**< RTC Alarm through EXTI. */ -#define USB_FS_WKUP_IRQHandler VectorE8 /**< USB Wakeup from suspend. */ -#define TIM6_IRQHandler VectorEC /**< TIM6. */ -#define TIM7_IRQHandler VectorF0 /**< TIM7. */ -/** @} */ - /*===========================================================================*/ /* Driver pre-compile time settings. */ /*===========================================================================*/ @@ -1009,48 +798,16 @@ /* Driver data structures and types. */ /*===========================================================================*/ -/** - * @brief Type representing a system clock frequency. - */ -typedef uint32_t halclock_t; - -/** - * @brief Type of the realtime free counter value. - */ -typedef uint32_t halrtcnt_t; - /*===========================================================================*/ /* Driver macros. */ /*===========================================================================*/ -/** - * @brief Returns the current value of the system free running counter. - * @note This service is implemented by returning the content of the - * DWT_CYCCNT register. - * - * @return The value of the system free running counter of - * type halrtcnt_t. - * - * @notapi - */ -#define hal_lld_get_counter_value() DWT_CYCCNT - -/** - * @brief Realtime counter frequency. - * @note The DWT_CYCCNT register is incremented directly by the system - * clock so this function returns STM32_HCLK. - * - * @return The realtime counter frequency of type halclock_t. - * - * @notapi - */ -#define hal_lld_get_counter_frequency() STM32_HCLK - /*===========================================================================*/ /* External declarations. */ /*===========================================================================*/ -/* STM32 ISR, DMA and RCC helpers.*/ +/* Various helpers.*/ +#include "nvic.h" #include "stm32_isr.h" #include "stm32_dma.h" #include "stm32_rcc.h" diff --git a/os/hal/ports/STM32L1xx/platform.mk b/os/hal/ports/STM32L1xx/platform.mk index 4678792a5..4104e3369 100644 --- a/os/hal/ports/STM32L1xx/platform.mk +++ b/os/hal/ports/STM32L1xx/platform.mk @@ -1,25 +1,28 @@ # List of all the STM32L1xx platform files. -PLATFORMSRC = ${CHIBIOS}/os/hal/platforms/STM32L1xx/stm32_dma.c \ - ${CHIBIOS}/os/hal/platforms/STM32L1xx/hal_lld.c \ - ${CHIBIOS}/os/hal/platforms/STM32L1xx/adc_lld.c \ - ${CHIBIOS}/os/hal/platforms/STM32L1xx/ext_lld_isr.c \ - ${CHIBIOS}/os/hal/platforms/STM32/ext_lld.c \ - ${CHIBIOS}/os/hal/platforms/STM32/GPIOv2/pal_lld.c \ - ${CHIBIOS}/os/hal/platforms/STM32/I2Cv1/i2c_lld.c \ - ${CHIBIOS}/os/hal/platforms/STM32/SPIv1/spi_lld.c \ - ${CHIBIOS}/os/hal/platforms/STM32/TIMv1/gpt_lld.c \ - ${CHIBIOS}/os/hal/platforms/STM32/TIMv1/icu_lld.c \ - ${CHIBIOS}/os/hal/platforms/STM32/TIMv1/pwm_lld.c \ - ${CHIBIOS}/os/hal/platforms/STM32/USARTv1/serial_lld.c \ - ${CHIBIOS}/os/hal/platforms/STM32/USARTv1/uart_lld.c \ - ${CHIBIOS}/os/hal/platforms/STM32/USBv1/usb_lld.c +PLATFORMSRC = ${CHIBIOS}/os/hal/ports/common/ARMCMx/nvic.c \ + ${CHIBIOS}/os/hal/ports/STM32L1xx/stm32_dma.c \ + ${CHIBIOS}/os/hal/ports/STM32L1xx/hal_lld.c \ + ${CHIBIOS}/os/hal/ports/STM32L1xx/adc_lld.c \ + ${CHIBIOS}/os/hal/ports/STM32L1xx/ext_lld_isr.c \ + ${CHIBIOS}/os/hal/ports/STM32/ext_lld.c \ + ${CHIBIOS}/os/hal/ports/STM32/GPIOv2/pal_lld.c \ + ${CHIBIOS}/os/hal/ports/STM32/I2Cv1/i2c_lld.c \ + ${CHIBIOS}/os/hal/ports/STM32/SPIv1/spi_lld.c \ + ${CHIBIOS}/os/hal/ports/STM32/TIMv1/gpt_lld.c \ + ${CHIBIOS}/os/hal/ports/STM32/TIMv1/icu_lld.c \ + ${CHIBIOS}/os/hal/ports/STM32/TIMv1/pwm_lld.c \ + ${CHIBIOS}/os/hal/ports/STM32/TIMv1/st_lld.c \ + ${CHIBIOS}/os/hal/ports/STM32/USARTv1/serial_lld.c \ + ${CHIBIOS}/os/hal/ports/STM32/USARTv1/uart_lld.c \ + ${CHIBIOS}/os/hal/ports/STM32/USBv1/usb_lld.c # Required include directories -PLATFORMINC = ${CHIBIOS}/os/hal/platforms/STM32L1xx \ - ${CHIBIOS}/os/hal/platforms/STM32 \ - ${CHIBIOS}/os/hal/platforms/STM32/GPIOv2 \ - ${CHIBIOS}/os/hal/platforms/STM32/I2Cv1 \ - ${CHIBIOS}/os/hal/platforms/STM32/SPIv1 \ - ${CHIBIOS}/os/hal/platforms/STM32/TIMv1 \ - ${CHIBIOS}/os/hal/platforms/STM32/USARTv1 \ - ${CHIBIOS}/os/hal/platforms/STM32/USBv1 +PLATFORMINC = ${CHIBIOS}/os/hal/ports/common/ARMCMx \ + ${CHIBIOS}/os/hal/ports/STM32L1xx \ + ${CHIBIOS}/os/hal/ports/STM32 \ + ${CHIBIOS}/os/hal/ports/STM32/GPIOv2 \ + ${CHIBIOS}/os/hal/ports/STM32/I2Cv1 \ + ${CHIBIOS}/os/hal/ports/STM32/SPIv1 \ + ${CHIBIOS}/os/hal/ports/STM32/TIMv1 \ + ${CHIBIOS}/os/hal/ports/STM32/USARTv1 \ + ${CHIBIOS}/os/hal/ports/STM32/USBv1 diff --git a/os/hal/ports/STM32L1xx/stm32_dma.c b/os/hal/ports/STM32L1xx/stm32_dma.c index 31b475589..f277fab0d 100644 --- a/os/hal/ports/STM32L1xx/stm32_dma.c +++ b/os/hal/ports/STM32L1xx/stm32_dma.c @@ -29,7 +29,6 @@ * @{ */ -#include "ch.h" #include "hal.h" /* The following macro is only defined if some driver requiring DMA services @@ -111,17 +110,17 @@ static dma_isr_redir_t dma_isr_redir[STM32_DMA_STREAMS]; * * @isr */ -CH_IRQ_HANDLER(DMA1_Ch1_IRQHandler) { +OSAL_IRQ_HANDLER(DMA1_Ch1_IRQHandler) { uint32_t flags; - CH_IRQ_PROLOGUE(); + OSAL_IRQ_PROLOGUE(); flags = (DMA1->ISR >> 0) & STM32_DMA_ISR_MASK; DMA1->IFCR = STM32_DMA_ISR_MASK << 0; if (dma_isr_redir[0].dma_func) dma_isr_redir[0].dma_func(dma_isr_redir[0].dma_param, flags); - CH_IRQ_EPILOGUE(); + OSAL_IRQ_EPILOGUE(); } /** @@ -129,17 +128,17 @@ CH_IRQ_HANDLER(DMA1_Ch1_IRQHandler) { * * @isr */ -CH_IRQ_HANDLER(DMA1_Ch2_IRQHandler) { +OSAL_IRQ_HANDLER(DMA1_Ch2_IRQHandler) { uint32_t flags; - CH_IRQ_PROLOGUE(); + OSAL_IRQ_PROLOGUE(); flags = (DMA1->ISR >> 4) & STM32_DMA_ISR_MASK; DMA1->IFCR = STM32_DMA_ISR_MASK << 4; if (dma_isr_redir[1].dma_func) dma_isr_redir[1].dma_func(dma_isr_redir[1].dma_param, flags); - CH_IRQ_EPILOGUE(); + OSAL_IRQ_EPILOGUE(); } /** @@ -147,17 +146,17 @@ CH_IRQ_HANDLER(DMA1_Ch2_IRQHandler) { * * @isr */ -CH_IRQ_HANDLER(DMA1_Ch3_IRQHandler) { +OSAL_IRQ_HANDLER(DMA1_Ch3_IRQHandler) { uint32_t flags; - CH_IRQ_PROLOGUE(); + OSAL_IRQ_PROLOGUE(); flags = (DMA1->ISR >> 8) & STM32_DMA_ISR_MASK; DMA1->IFCR = STM32_DMA_ISR_MASK << 8; if (dma_isr_redir[2].dma_func) dma_isr_redir[2].dma_func(dma_isr_redir[2].dma_param, flags); - CH_IRQ_EPILOGUE(); + OSAL_IRQ_EPILOGUE(); } /** @@ -165,17 +164,17 @@ CH_IRQ_HANDLER(DMA1_Ch3_IRQHandler) { * * @isr */ -CH_IRQ_HANDLER(DMA1_Ch4_IRQHandler) { +OSAL_IRQ_HANDLER(DMA1_Ch4_IRQHandler) { uint32_t flags; - CH_IRQ_PROLOGUE(); + OSAL_IRQ_PROLOGUE(); flags = (DMA1->ISR >> 12) & STM32_DMA_ISR_MASK; DMA1->IFCR = STM32_DMA_ISR_MASK << 12; if (dma_isr_redir[3].dma_func) dma_isr_redir[3].dma_func(dma_isr_redir[3].dma_param, flags); - CH_IRQ_EPILOGUE(); + OSAL_IRQ_EPILOGUE(); } /** @@ -183,17 +182,17 @@ CH_IRQ_HANDLER(DMA1_Ch4_IRQHandler) { * * @isr */ -CH_IRQ_HANDLER(DMA1_Ch5_IRQHandler) { +OSAL_IRQ_HANDLER(DMA1_Ch5_IRQHandler) { uint32_t flags; - CH_IRQ_PROLOGUE(); + OSAL_IRQ_PROLOGUE(); flags = (DMA1->ISR >> 16) & STM32_DMA_ISR_MASK; DMA1->IFCR = STM32_DMA_ISR_MASK << 16; if (dma_isr_redir[4].dma_func) dma_isr_redir[4].dma_func(dma_isr_redir[4].dma_param, flags); - CH_IRQ_EPILOGUE(); + OSAL_IRQ_EPILOGUE(); } /** @@ -201,17 +200,17 @@ CH_IRQ_HANDLER(DMA1_Ch5_IRQHandler) { * * @isr */ -CH_IRQ_HANDLER(DMA1_Ch6_IRQHandler) { +OSAL_IRQ_HANDLER(DMA1_Ch6_IRQHandler) { uint32_t flags; - CH_IRQ_PROLOGUE(); + OSAL_IRQ_PROLOGUE(); flags = (DMA1->ISR >> 20) & STM32_DMA_ISR_MASK; DMA1->IFCR = STM32_DMA_ISR_MASK << 20; if (dma_isr_redir[5].dma_func) dma_isr_redir[5].dma_func(dma_isr_redir[5].dma_param, flags); - CH_IRQ_EPILOGUE(); + OSAL_IRQ_EPILOGUE(); } /** @@ -219,17 +218,17 @@ CH_IRQ_HANDLER(DMA1_Ch6_IRQHandler) { * * @isr */ -CH_IRQ_HANDLER(DMA1_Ch7_IRQHandler) { +OSAL_IRQ_HANDLER(DMA1_Ch7_IRQHandler) { uint32_t flags; - CH_IRQ_PROLOGUE(); + OSAL_IRQ_PROLOGUE(); flags = (DMA1->ISR >> 24) & STM32_DMA_ISR_MASK; DMA1->IFCR = STM32_DMA_ISR_MASK << 24; if (dma_isr_redir[6].dma_func) dma_isr_redir[6].dma_func(dma_isr_redir[6].dma_param, flags); - CH_IRQ_EPILOGUE(); + OSAL_IRQ_EPILOGUE(); } /*===========================================================================*/ @@ -276,12 +275,12 @@ void dmaInit(void) { * * @special */ -bool_t dmaStreamAllocate(const stm32_dma_stream_t *dmastp, - uint32_t priority, - stm32_dmaisr_t func, - void *param) { +bool dmaStreamAllocate(const stm32_dma_stream_t *dmastp, + uint32_t priority, + stm32_dmaisr_t func, + void *param) { - chDbgCheck(dmastp != NULL, "dmaStreamAllocate"); + osalDbgCheck(dmastp != NULL); /* Checks if the stream is already taken.*/ if ((dma_streams_mask & (1 << dmastp->selfindex)) != 0) @@ -322,11 +321,11 @@ bool_t dmaStreamAllocate(const stm32_dma_stream_t *dmastp, */ void dmaStreamRelease(const stm32_dma_stream_t *dmastp) { - chDbgCheck(dmastp != NULL, "dmaStreamRelease"); + osalDbgCheck(dmastp != NULL); /* Check if the streams is not taken.*/ - chDbgAssert((dma_streams_mask & (1 << dmastp->selfindex)) != 0, - "dmaStreamRelease(), #1", "not allocated"); + osalDbgAssert((dma_streams_mask & (1 << dmastp->selfindex)) != 0, + "not allocated"); /* Disables the associated IRQ vector.*/ nvicDisableVector(dmastp->vector); diff --git a/os/hal/ports/STM32L1xx/stm32_dma.h b/os/hal/ports/STM32L1xx/stm32_dma.h index 2e3225ce9..3af798d0b 100644 --- a/os/hal/ports/STM32L1xx/stm32_dma.h +++ b/os/hal/ports/STM32L1xx/stm32_dma.h @@ -382,10 +382,10 @@ extern const stm32_dma_stream_t _stm32_dma_streams[STM32_DMA_STREAMS]; extern "C" { #endif void dmaInit(void); - bool_t dmaStreamAllocate(const stm32_dma_stream_t *dmastp, - uint32_t priority, - stm32_dmaisr_t func, - void *param); + bool dmaStreamAllocate(const stm32_dma_stream_t *dmastp, + uint32_t priority, + stm32_dmaisr_t func, + void *param); void dmaStreamRelease(const stm32_dma_stream_t *dmastp); #ifdef __cplusplus } diff --git a/os/hal/ports/STM32L1xx/stm32_registry.h b/os/hal/ports/STM32L1xx/stm32_registry.h new file mode 100644 index 000000000..1a6379bcd --- /dev/null +++ b/os/hal/ports/STM32L1xx/stm32_registry.h @@ -0,0 +1,175 @@ +/* + ChibiOS/RT - Copyright (C) 2006-2013 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file STM32L1xx/stm32_registry.h + * @brief STM32L1xx capabilities registry. + * + * @addtogroup HAL + * @{ + */ + +#ifndef _STM32_REGISTRY_H_ +#define _STM32_REGISTRY_H_ + +/*===========================================================================*/ +/* Platform capabilities. */ +/*===========================================================================*/ + +/** + * @name STM32L1xx capabilities + * @{ + */ +/* ADC attributes.*/ +#define STM32_HAS_ADC1 TRUE +#define STM32_HAS_ADC2 FALSE +#define STM32_HAS_ADC3 FALSE +#define STM32_HAS_ADC4 FALSE + +/* CAN attributes.*/ +#define STM32_HAS_CAN1 FALSE +#define STM32_HAS_CAN2 FALSE +#define STM32_CAN_MAX_FILTERS 0 + +/* DAC attributes.*/ +#define STM32_HAS_DAC1 TRUE +#define STM32_HAS_DAC2 FALSE + +/* DMA attributes.*/ +#define STM32_ADVANCED_DMA FALSE +#define STM32_HAS_DMA1 TRUE +#define STM32_HAS_DMA2 FALSE + +/* ETH attributes.*/ +#define STM32_HAS_ETH FALSE + +/* EXTI attributes.*/ +#define STM32_EXTI_NUM_CHANNELS 23 + +/* GPIO attributes.*/ +#define STM32_HAS_GPIOA TRUE +#define STM32_HAS_GPIOB TRUE +#define STM32_HAS_GPIOC TRUE +#define STM32_HAS_GPIOD TRUE +#define STM32_HAS_GPIOE TRUE +#define STM32_HAS_GPIOF FALSE +#define STM32_HAS_GPIOG FALSE +#define STM32_HAS_GPIOH TRUE +#define STM32_HAS_GPIOI FALSE + +/* I2C attributes.*/ +#define STM32_HAS_I2C1 TRUE +#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) + +#define STM32_HAS_I2C2 TRUE +#define STM32_I2C_I2C2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) +#define STM32_I2C_I2C2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) + +#define STM32_HAS_I2C3 FALSE + +/* RTC attributes.*/ +#define STM32_HAS_RTC TRUE +#define STM32_RTC_HAS_SUBSECONDS FALSE +#define STM32_RTC_IS_CALENDAR TRUE + +/* SDIO attributes.*/ +#define STM32_HAS_SDIO TRUE + +/* SPI attributes.*/ +#define STM32_HAS_SPI1 TRUE +#define STM32_SPI_SPI1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) +#define STM32_SPI_SPI1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) + +#define STM32_HAS_SPI2 TRUE +#define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) + +#define STM32_HAS_SPI3 FALSE + +/* TIM attributes.*/ +#define STM32_TIM_MAX_CHANNELS 6 + +#define STM32_HAS_TIM2 TRUE +#define STM32_TIM2_IS_32BITS TRUE +#define STM32_TIM2_CHANNELS 4 + +#define STM32_HAS_TIM3 TRUE +#define STM32_TIM3_IS_32BITS FALSE +#define STM32_TIM3_CHANNELS 4 + +#define STM32_HAS_TIM4 TRUE +#define STM32_TIM4_IS_32BITS FALSE +#define STM32_TIM4_CHANNELS 4 + +#define STM32_HAS_TIM6 TRUE +#define STM32_TIM6_IS_32BITS FALSE +#define STM32_TIM6_CHANNELS 0 + +#define STM32_HAS_TIM7 TRUE +#define STM32_TIM7_IS_32BITS FALSE +#define STM32_TIM7_CHANNELS 0 + +#define STM32_HAS_TIM9 TRUE +#define STM32_TIM15_IS_32BITS FALSE +#define STM32_TIM15_CHANNELS 2 + +#define STM32_HAS_TIM10 TRUE +#define STM32_TIM15_IS_32BITS FALSE +#define STM32_TIM15_CHANNELS 2 + +#define STM32_HAS_TIM11 TRUE +#define STM32_TIM15_IS_32BITS FALSE +#define STM32_TIM15_CHANNELS 2 + +#define STM32_HAS_TIM1 FALSE +#define STM32_HAS_TIM5 FALSE +#define STM32_HAS_TIM8 FALSE +#define STM32_HAS_TIM12 FALSE +#define STM32_HAS_TIM13 FALSE +#define STM32_HAS_TIM14 FALSE +#define STM32_HAS_TIM15 FALSE +#define STM32_HAS_TIM16 FALSE +#define STM32_HAS_TIM17 FALSE +#define STM32_HAS_TIM18 FALSE +#define STM32_HAS_TIM19 FALSE + +/* USART attributes.*/ +#define STM32_HAS_USART1 TRUE +#define STM32_UART_USART1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) +#define STM32_UART_USART1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) + +#define STM32_HAS_USART2 TRUE +#define STM32_UART_USART2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) +#define STM32_UART_USART2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) + +#define STM32_HAS_USART3 TRUE +#define STM32_UART_USART3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) +#define STM32_UART_USART3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) + +#define STM32_HAS_UART4 FALSE +#define STM32_HAS_UART5 FALSE +#define STM32_HAS_USART6 FALSE + +/* USB attributes.*/ +#define STM32_HAS_USB TRUE +#define STM32_HAS_OTG1 FALSE +#define STM32_HAS_OTG2 FALSE +/** @} */ + +#endif /* _STM32_REGISTRY_H_ */ + +/** @} */ diff --git a/os/nil/ports/ARMCMx/compilers/GCC/mk/port_stm32l1xx.mk b/os/nil/ports/ARMCMx/compilers/GCC/mk/port_stm32l1xx.mk new file mode 100644 index 000000000..12894b1c0 --- /dev/null +++ b/os/nil/ports/ARMCMx/compilers/GCC/mk/port_stm32l1xx.mk @@ -0,0 +1,15 @@ +# List of the ChibiOS/NIL Cortex-M4 STM32L1xx port files. +PORTSRC = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/crt0.c \ + $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/vectors.c \ + ${CHIBIOS}/os/nil/ports/ARMCMx/nilcore.c \ + ${CHIBIOS}/os/nil/ports/ARMCMx/nilcore_v7m.c + +PORTASM = $(CHIBIOS)/os/nil/ports/ARMCMx/compilers/GCC/nilcoreasm_v7m.s + +PORTINC = ${CHIBIOS}/os/ext/CMSIS/include \ + ${CHIBIOS}/os/ext/CMSIS/ST \ + ${CHIBIOS}/os/common/ports/ARMCMx/devices/STM32L1xx \ + ${CHIBIOS}/os/nil/ports/ARMCMx \ + ${CHIBIOS}/os/nil/ports/ARMCMx/compilers/GCC + +PORTLD = ${CHIBIOS}/os/common/ports/ARMCMx/compilers/GCC/ld diff --git a/os/rt/ports/ARMCMx/compilers/GCC/mk/port_stm32l1xx.mk b/os/rt/ports/ARMCMx/compilers/GCC/mk/port_stm32l1xx.mk new file mode 100644 index 000000000..be53e1833 --- /dev/null +++ b/os/rt/ports/ARMCMx/compilers/GCC/mk/port_stm32l1xx.mk @@ -0,0 +1,15 @@ +# List of the ChibiOS/RT Cortex-M4 STM32L1xx port files. +PORTSRC = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/crt0.c \ + $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/vectors.c \ + ${CHIBIOS}/os/rt/ports/ARMCMx/chcore.c \ + ${CHIBIOS}/os/rt/ports/ARMCMx/chcore_v7m.c + +PORTASM = $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/chcoreasm_v7m.s + +PORTINC = ${CHIBIOS}/os/ext/CMSIS/include \ + ${CHIBIOS}/os/ext/CMSIS/ST \ + ${CHIBIOS}/os/common/ports/ARMCMx/devices/STM32L1xx \ + ${CHIBIOS}/os/rt/ports/ARMCMx \ + ${CHIBIOS}/os/rt/ports/ARMCMx/compilers/GCC + +PORTLD = ${CHIBIOS}/os/common/ports/ARMCMx/compilers/GCC/ld -- cgit v1.2.3