2017-10-27 21:43:34 +08:00
|
|
|
# Makefile - STM32Cube SDK
|
|
|
|
#
|
|
|
|
# Copyright (c) 2016 Linaro Limited
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
|
|
|
#add_library(STM32CUBE INTERFACE)
|
|
|
|
string(TOUPPER ${CONFIG_SOC} _STM32CUBE_CPU)
|
|
|
|
string(REPLACE "X" "x" STM32CUBE_CPU ${_STM32CUBE_CPU})
|
|
|
|
|
|
|
|
# STM32Cub uses the CPU name to expose SOC-specific attributes of a specific
|
|
|
|
# peripheral.
|
|
|
|
# It also requires USE_HAL_DRIVER to be define in order to benefit from
|
|
|
|
# STM32Cube HAL and LL APIs
|
|
|
|
zephyr_compile_definitions(
|
2017-11-08 22:02:05 +08:00
|
|
|
-D${STM32CUBE_CPU}
|
|
|
|
-DUSE_HAL_DRIVER
|
|
|
|
-DUSE_FULL_LL_DRIVER
|
|
|
|
)
|
2017-10-27 21:43:34 +08:00
|
|
|
|
|
|
|
if(CONFIG_SOC_SERIES_STM32F0X)
|
2017-11-08 22:02:05 +08:00
|
|
|
zephyr_include_directories(
|
2017-10-27 21:43:34 +08:00
|
|
|
stm32f0xx/soc
|
|
|
|
stm32f0xx/drivers/include
|
|
|
|
stm32f0xx/drivers/include/Legacy
|
|
|
|
)
|
|
|
|
|
2017-10-31 18:44:40 +08:00
|
|
|
add_subdirectory(stm32f0xx)
|
2017-10-27 21:43:34 +08:00
|
|
|
endif()
|
|
|
|
|
|
|
|
if(CONFIG_SOC_SERIES_STM32F1X)
|
2017-11-08 22:02:05 +08:00
|
|
|
zephyr_include_directories(
|
2017-10-27 21:43:34 +08:00
|
|
|
stm32f1xx/soc
|
|
|
|
stm32f1xx/drivers/include
|
|
|
|
stm32f1xx/drivers/include/Legacy
|
|
|
|
)
|
|
|
|
|
2017-10-31 18:44:40 +08:00
|
|
|
add_subdirectory(stm32f1xx)
|
2017-10-27 21:43:34 +08:00
|
|
|
endif()
|
|
|
|
|
|
|
|
if(CONFIG_SOC_SERIES_STM32F3X)
|
2017-11-08 22:02:05 +08:00
|
|
|
zephyr_include_directories(
|
2017-10-27 21:43:34 +08:00
|
|
|
stm32f3xx/soc
|
|
|
|
stm32f3xx/drivers/include
|
|
|
|
stm32f3xx/drivers/include/Legacy
|
|
|
|
)
|
|
|
|
|
2017-10-31 18:44:40 +08:00
|
|
|
add_subdirectory(stm32f3xx)
|
2017-10-27 21:43:34 +08:00
|
|
|
endif()
|
|
|
|
|
|
|
|
if(CONFIG_SOC_SERIES_STM32F4X)
|
2017-11-08 22:02:05 +08:00
|
|
|
zephyr_include_directories(
|
2017-10-27 21:43:34 +08:00
|
|
|
stm32f4xx/soc
|
|
|
|
stm32f4xx/drivers/include
|
|
|
|
stm32f4xx/drivers/include/Legacy
|
|
|
|
)
|
|
|
|
|
2017-10-31 18:44:40 +08:00
|
|
|
add_subdirectory(stm32f4xx)
|
2017-10-27 21:43:34 +08:00
|
|
|
endif()
|
|
|
|
|
|
|
|
if(CONFIG_SOC_SERIES_STM32F7X)
|
2017-11-08 22:02:05 +08:00
|
|
|
zephyr_include_directories(
|
2017-10-27 21:43:34 +08:00
|
|
|
stm32f7xx/soc
|
|
|
|
stm32f7xx/drivers/include
|
|
|
|
stm32f7xx/drivers/include/Legacy
|
|
|
|
)
|
|
|
|
|
2017-10-31 18:44:40 +08:00
|
|
|
add_subdirectory(stm32f7xx)
|
2017-10-27 21:43:34 +08:00
|
|
|
endif()
|
|
|
|
|
|
|
|
if(CONFIG_SOC_SERIES_STM32L4X)
|
2017-11-08 22:02:05 +08:00
|
|
|
zephyr_include_directories(
|
2017-10-27 21:43:34 +08:00
|
|
|
stm32l4xx/soc
|
|
|
|
stm32l4xx/drivers/include
|
|
|
|
stm32l4xx/drivers/include/Legacy
|
|
|
|
)
|
2017-10-31 18:44:40 +08:00
|
|
|
|
|
|
|
add_subdirectory(stm32l4xx)
|
2017-10-27 21:43:34 +08:00
|
|
|
endif()
|
|
|
|
|