1# Copyright (c) 2022 Nanjing Xiaoxiongpai Intelligent Technology Co., Ltd. 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13 14SOC_COMPANY := $(subst $\",,$(LOSCFG_DEVICE_COMPANY)) 15 16ST_DRIVERS_ROOT := $(LITEOSTOPDIR)/../../device/soc/$(SOC_COMPANY)/common/platform/ 17 18ifeq ($(LOSCFG_DRIVERS_HDF_PLATFORM_I2C), y) 19 LITEOS_BASELIB += -lhdf_i2c 20 LIB_SUBDIRS += $(ST_DRIVERS_ROOT)/i2c 21endif 22 23ifeq ($(LOSCFG_DRIVERS_HDF_PLATFORM_ADC), y) 24 LITEOS_BASELIB += -lhdf_adc 25 LIB_SUBDIRS += $(ST_DRIVERS_ROOT)/adc 26endif 27 28ifeq ($(LOSCFG_DRIVERS_HDF_PLATFORM_SPI), y) 29 LITEOS_BASELIB += -lhdf_spi 30 LIB_SUBDIRS += $(ST_DRIVERS_ROOT)/spi 31endif 32 33ifeq ($(LOSCFG_DRIVERS_HDF_PLATFORM_GPIO), y) 34 LITEOS_BASELIB += -lhdf_gpio 35 LIB_SUBDIRS += $(ST_DRIVERS_ROOT)/gpio 36endif 37 38ifeq ($(LOSCFG_DRIVERS_HDF_PLATFORM_WATCHDOG), y) 39 LITEOS_BASELIB += -lhdf_iwdg 40 LIB_SUBDIRS += $(ST_DRIVERS_ROOT)/iwdg 41endif 42 43ifeq ($(LOSCFG_DRIVERS_HDF_PLATFORM_PWM), y) 44 LITEOS_BASELIB += -lhdf_pwm 45 LIB_SUBDIRS += $(ST_DRIVERS_ROOT)/pwm 46endif 47 48ifeq ($(LOSCFG_DRIVERS_HDF_PLATFORM_UART), y) 49 LITEOS_BASELIB += -lhdf_uart 50 LIB_SUBDIRS += $(ST_DRIVERS_ROOT)/uart 51endif 52 53ifeq ($(LOSCFG_KERNEL_SMP), y) 54 LIB_SUBDIRS += $(ST_DRIVERS_ROOT)/smp 55 LITEOS_BASELIB += -lsmp 56endif 57 58LITEOS_BASELIB += -lstm32mp1x_hal 59LIB_SUBDIRS += $(ST_DRIVERS_ROOT)/stm32mp1xx_hal 60 61LITEOS_BASELIB += -lrng 62LIB_SUBDIRS += $(ST_DRIVERS_ROOT)/rng 63 64# ltdc dirvers 65LITEOS_BASELIB += -lltdc 66 67# mmc dirvers 68ifeq ($(LOSCFG_DRIVERS_HDF_PLATFORM_MMC), y) 69 LITEOS_BASELIB += -lmmc 70endif 71 72# wifi dirvers 73ifeq ($(LOSCFG_DRIVERS_HDF_WIFI), y) 74 LITEOS_BASELIB += -lhdf_vendor_wifi 75 76ifeq ($(LOSCFG_DRIVERS_HI3881), y) 77 LITEOS_BASELIB += -lhi3881 78endif 79endif 80 81LITEOS_LD_PATH += -L$(ST_DRIVERS_ROOT)/libs/ohos/llvm/stm32mp1xx 82 83 84