1# Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. 2# 3# Redistribution and use in source and binary forms, with or without modification, 4# are permitted provided that the following conditions are met: 5# 6# 1. Redistributions of source code must retain the above copyright notice, this list of 7# conditions and the following disclaimer. 8# 9# 2. Redistributions in binary form must reproduce the above copyright notice, this list 10# of conditions and the following disclaimer in the documentation and/or other materials 11# provided with the distribution. 12# 13# 3. Neither the name of the copyright holder nor the names of its contributors may be used 14# to endorse or promote products derived from this software without specific prior written 15# permission. 16# 17# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 19# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 20# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 21# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 22# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 23# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 24# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 25# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 26# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 27# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 29COMMON_DIR = get_path_info(".", "abspath") 30 31config("stm32_config") { 32 include_dirs = [ 33 ".", 34 "$COMMON_DIR/STM32F4x7_ETH_Driver/inc", 35 "$COMMON_DIR/STM32F4xx_StdPeriph_Driver/inc", 36 "//third_party/cmsis/CMSIS/Core/Include", 37 ] 38} 39 40static_library("common") { 41 sources = [ 42 "$COMMON_DIR/STM32F4x7_ETH_Driver/src/stm32f4x7_eth.c", 43 "$COMMON_DIR/STM32F4xx_StdPeriph_Driver/src/misc.c", 44 "$COMMON_DIR/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_adc.c", 45 "$COMMON_DIR/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_can.c", 46 "$COMMON_DIR/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_crc.c", 47 "$COMMON_DIR/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_cryp.c", 48 "$COMMON_DIR/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_cryp_aes.c", 49 "$COMMON_DIR/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_cryp_des.c", 50 "$COMMON_DIR/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_cryp_tdes.c", 51 "$COMMON_DIR/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_dac.c", 52 "$COMMON_DIR/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_dbgmcu.c", 53 "$COMMON_DIR/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_dcmi.c", 54 "$COMMON_DIR/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_dma.c", 55 "$COMMON_DIR/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_dma2d.c", 56 "$COMMON_DIR/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_exti.c", 57 "$COMMON_DIR/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_flash.c", 58 "$COMMON_DIR/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_flash_ramfunc.c", 59 "$COMMON_DIR/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_fsmc.c", 60 "$COMMON_DIR/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_gpio.c", 61 "$COMMON_DIR/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_hash.c", 62 "$COMMON_DIR/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_hash_md5.c", 63 "$COMMON_DIR/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_hash_sha1.c", 64 "$COMMON_DIR/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_i2c.c", 65 "$COMMON_DIR/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_iwdg.c", 66 "$COMMON_DIR/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_ltdc.c", 67 "$COMMON_DIR/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_pwr.c", 68 "$COMMON_DIR/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_rcc.c", 69 "$COMMON_DIR/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_rng.c", 70 "$COMMON_DIR/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_rtc.c", 71 "$COMMON_DIR/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_sai.c", 72 "$COMMON_DIR/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_sdio.c", 73 "$COMMON_DIR/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_spi.c", 74 "$COMMON_DIR/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_syscfg.c", 75 "$COMMON_DIR/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_tim.c", 76 "$COMMON_DIR/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_usart.c", 77 "$COMMON_DIR/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_wwdg.c", 78 "$COMMON_DIR/stm32f4xx_it.c", 79 "$COMMON_DIR/system_stm32f4xx.c", 80 ] 81 configs += [ ":stm32_config" ] 82} 83