STM32_DRIV_PATH = STM32H7xx_HAL_Driver ifeq ($(BOARD_NAME), stm32h743zi) INCLUDES += $(CURRENTPATH)/STM32H7xx_HAL_Driver/Inc INCLUDES += $(CURRENTPATH)/STM32H7xx_Nucleo INCLUDES += $(CURRENTPATH)/Components/lan8742 CSRC += $(CURRENTPATH)/STM32H7xx_Nucleo/stm32h7xx_nucleo.c CSRC += $(CURRENTPATH)/Components/lan8742/lan8742.c # Only add whats required. CSRC += $(CURRENTPATH)/$(STM32_DRIV_PATH)/Src/stm32h7xx_hal_gpio.c CSRC += $(CURRENTPATH)/$(STM32_DRIV_PATH)/Src/stm32h7xx_hal.c CSRC += $(CURRENTPATH)/$(STM32_DRIV_PATH)/Src/stm32h7xx_hal_cortex.c CSRC += $(CURRENTPATH)/$(STM32_DRIV_PATH)/Src/stm32h7xx_hal_tim.c CSRC += $(CURRENTPATH)/$(STM32_DRIV_PATH)/Src/stm32h7xx_hal_tim_ex.c CSRC += $(CURRENTPATH)/$(STM32_DRIV_PATH)/Src/stm32h7xx_hal_rcc.c CSRC += $(CURRENTPATH)/$(STM32_DRIV_PATH)/Src/stm32h7xx_hal_rcc_ex.c CSRC += $(CURRENTPATH)/$(STM32_DRIV_PATH)/Src/stm32h7xx_hal_flash.c CSRC += $(CURRENTPATH)/$(STM32_DRIV_PATH)/Src/stm32h7xx_hal_flash_ex.c CSRC += $(CURRENTPATH)/$(STM32_DRIV_PATH)/Src/stm32h7xx_hal_hsem.c CSRC += $(CURRENTPATH)/$(STM32_DRIV_PATH)/Src/stm32h7xx_hal_dma.c CSRC += $(CURRENTPATH)/$(STM32_DRIV_PATH)/Src/stm32h7xx_hal_dma_ex.c CSRC += $(CURRENTPATH)/$(STM32_DRIV_PATH)/Src/stm32h7xx_hal_mdma.c CSRC += $(CURRENTPATH)/$(STM32_DRIV_PATH)/Src/stm32h7xx_hal_pwr.c CSRC += $(CURRENTPATH)/$(STM32_DRIV_PATH)/Src/stm32h7xx_hal_pwr_ex.c CSRC += $(CURRENTPATH)/$(STM32_DRIV_PATH)/Src/stm32h7xx_hal_i2c.c CSRC += $(CURRENTPATH)/$(STM32_DRIV_PATH)/Src/stm32h7xx_hal_i2c_ex.c CSRC += $(CURRENTPATH)/$(STM32_DRIV_PATH)/Src/stm32h7xx_hal_uart.c CSRC += $(CURRENTPATH)/$(STM32_DRIV_PATH)/Src/stm32h7xx_hal_eth.c CSRC += $(CURRENTPATH)/$(STM32_DRIV_PATH)/Src/stm32h7xx_hal_adc.c endif