2016-11-02 16:58:02 +08:00
|
|
|
# Makefile - STM32Cube SDK
|
|
|
|
#
|
|
|
|
# Copyright (c) 2016 Linaro Limited
|
|
|
|
#
|
2017-01-21 09:22:01 +08:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
2016-11-02 16:58:02 +08:00
|
|
|
#
|
|
|
|
|
2016-11-02 18:55:39 +08:00
|
|
|
ifdef CONFIG_HAS_STM32CUBE
|
|
|
|
|
2016-11-02 16:58:02 +08:00
|
|
|
STM32CUBE_CPU = $(shell echo $(CONFIG_SOC) | tr '[a-wyz]' '[A-WYZ]')
|
|
|
|
|
|
|
|
# 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
|
|
|
|
|
|
|
|
KBUILD_CFLAGS += -D$(STM32CUBE_CPU) -DUSE_HAL_DRIVER
|
|
|
|
|
2016-11-02 18:55:39 +08:00
|
|
|
ifdef CONFIG_SOC_SERIES_STM32F1X
|
|
|
|
ZEPHYRINCLUDE += -I$(srctree)/ext/hal/st/stm32cube/stm32f1xx/soc/
|
|
|
|
ZEPHYRINCLUDE += -I$(srctree)/ext/hal/st/stm32cube/stm32f1xx/drivers/include/
|
|
|
|
ZEPHYRINCLUDE += -I$(srctree)/ext/hal/st/stm32cube/stm32f1xx/drivers/include/Legacy/
|
|
|
|
endif
|
|
|
|
|
2016-11-04 19:07:09 +08:00
|
|
|
ifdef CONFIG_SOC_SERIES_STM32F3X
|
|
|
|
ZEPHYRINCLUDE += -I$(srctree)/ext/hal/st/stm32cube/stm32f3xx/soc/
|
|
|
|
ZEPHYRINCLUDE += -I$(srctree)/ext/hal/st/stm32cube/stm32f3xx/drivers/include/
|
|
|
|
ZEPHYRINCLUDE += -I$(srctree)/ext/hal/st/stm32cube/stm32f3xx/drivers/include/Legacy/
|
|
|
|
endif
|
|
|
|
|
2016-11-02 18:58:31 +08:00
|
|
|
ifdef CONFIG_SOC_SERIES_STM32F4X
|
|
|
|
ZEPHYRINCLUDE += -I$(srctree)/ext/hal/st/stm32cube/stm32f4xx/soc/
|
|
|
|
ZEPHYRINCLUDE += -I$(srctree)/ext/hal/st/stm32cube/stm32f4xx/drivers/include/
|
|
|
|
ZEPHYRINCLUDE += -I$(srctree)/ext/hal/st/stm32cube/stm32f4xx/drivers/include/Legacy/
|
|
|
|
endif
|
|
|
|
|
2016-11-04 18:57:18 +08:00
|
|
|
ifdef CONFIG_SOC_SERIES_STM32F7X
|
|
|
|
ZEPHYRINCLUDE += -I$(srctree)/ext/hal/st/stm32cube/stm32f7xx/soc/
|
|
|
|
ZEPHYRINCLUDE += -I$(srctree)/ext/hal/st/stm32cube/stm32f7xx/drivers/include/
|
|
|
|
ZEPHYRINCLUDE += -I$(srctree)/ext/hal/st/stm32cube/stm32f7xx/drivers/include/Legacy/
|
|
|
|
endif
|
|
|
|
|
2016-10-18 18:58:18 +08:00
|
|
|
ifdef CONFIG_SOC_SERIES_STM32L4X
|
|
|
|
ZEPHYRINCLUDE += -I$(srctree)/ext/hal/st/stm32cube/stm32l4xx/soc/
|
|
|
|
ZEPHYRINCLUDE += -I$(srctree)/ext/hal/st/stm32cube/stm32l4xx/drivers/include/
|
|
|
|
ZEPHYRINCLUDE += -I$(srctree)/ext/hal/st/stm32cube/stm32l4xx/drivers/include/Legacy/
|
|
|
|
endif
|
|
|
|
|
2016-11-02 18:55:39 +08:00
|
|
|
endif
|