|
|
@@ -8,18 +8,8 @@ IF(STM32_FAMILY STREQUAL "F0")
|
|
|
# Components that have _ex sources
|
|
|
SET(HAL_EX_COMPONENTS adc crc dac flash i2c pcd pwr rcc rtc smartcard spi tim uart)
|
|
|
|
|
|
- # Components that have ll_ in names instead of hal_
|
|
|
- SET(HAL_LL_COMPONENTS "")
|
|
|
-
|
|
|
SET(HAL_PREFIX stm32f0xx_)
|
|
|
|
|
|
- SET(HAL_HEADERS
|
|
|
- stm32f0xx_hal.h
|
|
|
- stm32f0xx_hal_def.h
|
|
|
- )
|
|
|
- SET(HAL_SRCS
|
|
|
- stm32f0xx_hal.c
|
|
|
- )
|
|
|
ELSEIF(STM32_FAMILY STREQUAL "F1")
|
|
|
SET(HAL_COMPONENTS adc can cec cortex crc dac dma eth flash gpio hcd i2c
|
|
|
i2s irda iwdg nand nor pccard pcd pwr rcc rtc sd smartcard
|
|
|
@@ -30,18 +20,8 @@ ELSEIF(STM32_FAMILY STREQUAL "F1")
|
|
|
# Components that have _ex sources
|
|
|
SET(HAL_EX_COMPONENTS adc dac flash gpio pcd rcc rtc tim)
|
|
|
|
|
|
- # Components that have ll_ in names instead of hal_
|
|
|
- SET(HAL_LL_COMPONENTS fsmc sdmmc usb)
|
|
|
-
|
|
|
SET(HAL_PREFIX stm32f1xx_)
|
|
|
|
|
|
- SET(HAL_HEADERS
|
|
|
- stm32f1xx_hal.h
|
|
|
- stm32f1xx_hal_def.h
|
|
|
- )
|
|
|
- SET(HAL_SRCS
|
|
|
- stm32f1xx_hal.c
|
|
|
- )
|
|
|
ELSEIF(STM32_FAMILY STREQUAL "F2")
|
|
|
SET(HAL_COMPONENTS adc can cortex crc cryp dac dcmi dma eth flash
|
|
|
gpio hash hcd i2c i2s irda iwdg nand nor pccard
|
|
|
@@ -53,19 +33,8 @@ ELSEIF(STM32_FAMILY STREQUAL "F2")
|
|
|
# Components that have _ex sources
|
|
|
SET(HAL_EX_COMPONENTS adc dac dma flash pwr rcc rtc tim)
|
|
|
|
|
|
- # Components that have ll_ in names instead of hal_
|
|
|
- SET(HAL_LL_COMPONENTS fsmc sdmmc usb)
|
|
|
-
|
|
|
SET(HAL_PREFIX stm32f2xx_)
|
|
|
|
|
|
- SET(HAL_HEADERS
|
|
|
- stm32f2xx_hal.h
|
|
|
- stm32f2xx_hal_def.h
|
|
|
- )
|
|
|
-
|
|
|
- SET(HAL_SRCS
|
|
|
- stm32f2xx_hal.c
|
|
|
- )
|
|
|
ELSEIF(STM32_FAMILY STREQUAL "F3")
|
|
|
SET(HAL_COMPONENTS adc can cec comp cortex crc dac dma flash gpio i2c i2s
|
|
|
irda nand nor opamp pccard pcd pwr rcc rtc sdadc
|
|
|
@@ -78,14 +47,6 @@ ELSEIF(STM32_FAMILY STREQUAL "F3")
|
|
|
|
|
|
SET(HAL_PREFIX stm32f3xx_)
|
|
|
|
|
|
- SET(HAL_HEADERS
|
|
|
- stm32f3xx_hal.h
|
|
|
- stm32f3xx_hal_def.h
|
|
|
- )
|
|
|
-
|
|
|
- SET(HAL_SRCS
|
|
|
- stm32f3xx_hal.c
|
|
|
- )
|
|
|
ELSEIF(STM32_FAMILY STREQUAL "F4")
|
|
|
SET(HAL_COMPONENTS adc can cec cortex crc cryp dac dcmi dma dma2d eth flash
|
|
|
flash_ramfunc fmpi2c gpio hash hcd i2c i2s irda iwdg ltdc
|
|
|
@@ -99,19 +60,8 @@ ELSEIF(STM32_FAMILY STREQUAL "F4")
|
|
|
SET(HAL_EX_COMPONENTS adc cryp dac dcmi dma flash fmpi2c hash i2c i2s pcd
|
|
|
pwr rcc rtc sai tim)
|
|
|
|
|
|
- # Components that have ll_ in names instead of hal_
|
|
|
- SET(HAL_LL_COMPONENTS fmc fsmc sdmmc usb)
|
|
|
-
|
|
|
SET(HAL_PREFIX stm32f4xx_)
|
|
|
|
|
|
- SET(HAL_HEADERS
|
|
|
- stm32f4xx_hal.h
|
|
|
- stm32f4xx_hal_def.h
|
|
|
- )
|
|
|
-
|
|
|
- SET(HAL_SRCS
|
|
|
- stm32f4xx_hal.c
|
|
|
- )
|
|
|
ELSEIF(STM32_FAMILY STREQUAL "F7")
|
|
|
SET(HAL_COMPONENTS adc can cec cortex crc cryp dac dcmi dma dma2d eth flash
|
|
|
gpio hash hcd i2c i2s irda iwdg lptim ltdc nand nor pcd
|
|
|
@@ -124,19 +74,8 @@ ELSEIF(STM32_FAMILY STREQUAL "F7")
|
|
|
SET(HAL_EX_COMPONENTS adc crc cryp dac dcmi dma flash hash i2c pcd
|
|
|
pwr rcc rtc sai tim)
|
|
|
|
|
|
- # Components that have ll_ in names instead of hal_
|
|
|
- SET(HAL_LL_COMPONENTS fmc sdmmc usb)
|
|
|
-
|
|
|
SET(HAL_PREFIX stm32f7xx_)
|
|
|
|
|
|
- SET(HAL_HEADERS
|
|
|
- stm32f7xx_hal.h
|
|
|
- stm32f7xx_hal_def.h
|
|
|
- )
|
|
|
-
|
|
|
- SET(HAL_SRCS
|
|
|
- stm32f7xx_hal.c
|
|
|
- )
|
|
|
ELSEIF(STM32_FAMILY STREQUAL "L0")
|
|
|
SET(HAL_COMPONENTS adc comp cortex crc crs cryp dac dma exti firewall flash gpio i2c
|
|
|
i2s irda iwdg lcd lptim lpuart pcd pwr rcc rng rtc smartcard
|
|
|
@@ -147,21 +86,11 @@ ELSEIF(STM32_FAMILY STREQUAL "L0")
|
|
|
# Components that have _ex sources
|
|
|
SET(HAL_EX_COMPONENTS adc comp crc cryp dac flash i2c pcd pwr rcc rtc smartcard tim uart usart)
|
|
|
|
|
|
- # Components that have ll_ in names instead of hal_
|
|
|
- SET(HAL_LL_COMPONENTS crs exti lpuart utils)
|
|
|
-
|
|
|
SET(HAL_PREFIX stm32l0xx_)
|
|
|
|
|
|
- SET(HAL_HEADERS
|
|
|
- stm32l0xx_hal.h
|
|
|
- stm32l0xx_hal_def.h
|
|
|
- )
|
|
|
- SET(HAL_SRCS
|
|
|
- stm32l0xx_hal.c
|
|
|
- )
|
|
|
ELSEIF(STM32_FAMILY STREQUAL "L4")
|
|
|
SET(HAL_COMPONENTS adc can comp cortex crc cryp dac dcmi dfsdm dma dma2d dsi
|
|
|
- firewall flash flash_ramfunc gfxmmu gpio hash hcd i2c irda iwdg
|
|
|
+ firewall flash flash_ramfunc gfxmmu gpio hash hcd i2c irda iwdg
|
|
|
lcd lptim ltdc nand nor opamp ospi pcd pwr qspi rcc rng rtc sai
|
|
|
sd smartcard smbus spi sram swpmi tim tsc uart usart wwdg)
|
|
|
|
|
|
@@ -171,23 +100,18 @@ ELSEIF(STM32_FAMILY STREQUAL "L4")
|
|
|
SET(HAL_EX_COMPONENTS adc crc cryp dac dfsdm dma flash hash i2c ltdc
|
|
|
opamp pcd pwr rcc rtc sai sd smartcard spi tim uart usart)
|
|
|
|
|
|
-
|
|
|
- # Components that have ll_ in names instead of hal_
|
|
|
- SET(HAL_LL_COMPONENTS adc comp crc crs dac dma dma2d exti fmc gpio i2c lptim lpuart
|
|
|
- opamp pwr rcc rng rtc sdmmc spi swpmi tim usart usb utils)
|
|
|
-
|
|
|
SET(HAL_PREFIX stm32l4xx_)
|
|
|
|
|
|
- SET(HAL_HEADERS
|
|
|
- stm32l4xx_hal.h
|
|
|
- stm32l4xx_hal_def.h
|
|
|
- )
|
|
|
-
|
|
|
- SET(HAL_SRCS
|
|
|
- stm32l4xx_hal.c
|
|
|
- )
|
|
|
ENDIF()
|
|
|
|
|
|
+SET(HAL_HEADERS
|
|
|
+ ${HAL_PREFIX}hal.h
|
|
|
+ ${HAL_PREFIX}hal_def.h
|
|
|
+)
|
|
|
+
|
|
|
+SET(HAL_SRCS
|
|
|
+ ${HAL_PREFIX}hal.c
|
|
|
+)
|
|
|
IF(NOT STM32HAL_FIND_COMPONENTS)
|
|
|
SET(STM32HAL_FIND_COMPONENTS ${HAL_COMPONENTS})
|
|
|
MESSAGE(STATUS "No STM32HAL components selected, using all: ${STM32HAL_FIND_COMPONENTS}")
|
|
|
@@ -204,14 +128,9 @@ FOREACH(cmp ${STM32HAL_FIND_COMPONENTS})
|
|
|
LIST(FIND HAL_COMPONENTS ${cmp} STM32HAL_FOUND_INDEX)
|
|
|
IF(${STM32HAL_FOUND_INDEX} LESS 0)
|
|
|
MESSAGE(FATAL_ERROR "Unknown STM32HAL component: ${cmp}. Available components: ${HAL_COMPONENTS}")
|
|
|
- ENDIF()
|
|
|
- LIST(FIND HAL_LL_COMPONENTS ${cmp} STM32HAL_FOUND_INDEX)
|
|
|
- IF(${STM32HAL_FOUND_INDEX} LESS 0)
|
|
|
+ ELSE()
|
|
|
LIST(APPEND HAL_HEADERS ${HAL_PREFIX}hal_${cmp}.h)
|
|
|
LIST(APPEND HAL_SRCS ${HAL_PREFIX}hal_${cmp}.c)
|
|
|
- ELSE()
|
|
|
- LIST(APPEND HAL_HEADERS ${HAL_PREFIX}ll_${cmp}.h)
|
|
|
- LIST(APPEND HAL_SRCS ${HAL_PREFIX}ll_${cmp}.c)
|
|
|
ENDIF()
|
|
|
LIST(FIND HAL_EX_COMPONENTS ${cmp} STM32HAL_FOUND_INDEX)
|
|
|
IF(NOT (${STM32HAL_FOUND_INDEX} LESS 0))
|