blob: fdb150137d4235ec2887eaeef841e9b5aa8fbb67 [file] [log] [blame]
# Copyright 2021 The Pigweed Authors
#
# 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
#
# https://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.
import("//build_overrides/pigweed.gni")
import("$dir_pw_build/target_types.gni")
import("$dir_pw_third_party_stm32cubef4/stm32cubef4.gni")
config("flags") {
cflags = [
"-DUSE_HAL_DRIVER",
"-D" + pw_third_party_stm32cubef4_PRODUCT,
"-Wno-redundant-decls",
"-Wno-unused-parameter",
]
visibility = [ ":*" ]
}
config("public_include_paths") {
include_dirs = [
"$dir_pw_third_party_stm32cubef4_cmsis_core/Include",
"$dir_pw_third_party_stm32cubef4_cmsis_device/Include",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Inc",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Inc/Legacy",
]
visibility = [ ":*" ]
}
pw_source_set("stm32f4xx_hal") {
public_configs = [
":flags",
":public_include_paths",
]
public = [ "$dir_pw_third_party_stm32cubef4_cmsis_device/Include/stm32f4xx.h" ]
public_deps = [
"$pw_third_party_stm32cubef4_CONFIG"
]
sources = [
#TODO: Allow target to not use these templates if desired.
"$dir_pw_third_party_stm32cubef4_cmsis_device/Source/Templates/system_stm32f4xx.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_hal_msp_template.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_hal_timebase_tim_template.c",
]
sources += [
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/Legacy/stm32f4xx_hal_can.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_hal.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_hal_adc.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_hal_adc_ex.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_hal_can.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_hal_cec.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_hal_cortex.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_hal_crc.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_hal_cryp.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_hal_cryp_ex.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_hal_dac.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_hal_dac_ex.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_hal_dcmi.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_hal_dcmi_ex.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_hal_dfsdm.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_hal_dma.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_hal_dma2d.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_hal_dma_ex.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_hal_dsi.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_hal_eth.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_hal_exti.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_hal_flash.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_hal_flash_ex.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_hal_flash_ramfunc.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_hal_fmpi2c.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_hal_fmpi2c_ex.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_hal_fmpsmbus.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_hal_fmpsmbus_ex.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_hal_gpio.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_hal_hash.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_hal_hash_ex.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_hal_hcd.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_hal_i2c.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_hal_i2c_ex.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_hal_i2s.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_hal_i2s_ex.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_hal_irda.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_hal_iwdg.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_hal_lptim.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_hal_ltdc.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_hal_ltdc_ex.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_hal_mmc.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_hal_nand.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_hal_nor.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_hal_pccard.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_hal_pcd.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_hal_pcd_ex.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_hal_pwr.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_hal_pwr_ex.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_hal_qspi.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_hal_rcc.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_hal_rcc_ex.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_hal_rng.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_hal_rtc.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_hal_rtc_ex.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_hal_sai.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_hal_sai_ex.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_hal_sd.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_hal_sdram.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_hal_smartcard.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_hal_smbus.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_hal_spdifrx.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_hal_spi.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_hal_sram.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_hal_tim.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_hal_tim_ex.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_hal_uart.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_hal_usart.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_hal_wwdg.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_ll_adc.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_ll_crc.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_ll_dac.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_ll_dma.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_ll_dma2d.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_ll_exti.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_ll_fmc.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_ll_fmpi2c.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_ll_fsmc.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_ll_gpio.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_ll_i2c.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_ll_lptim.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_ll_pwr.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_ll_rcc.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_ll_rng.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_ll_rtc.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_ll_sdmmc.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_ll_spi.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_ll_tim.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_ll_usart.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_ll_usb.c",
"$dir_pw_third_party_stm32cubef4_stm32f4xx_hal/Src/stm32f4xx_ll_utils.c",
]
}