From 2cf2852bfaa6ca562ed39f77861191c722b8c617 Mon Sep 17 00:00:00 2001 From: Eric Callahan Date: Tue, 24 May 2022 19:56:39 -0400 Subject: [PATCH] makefile: add sdcard source Signed-off-by: Eric Callahan --- src/Makefile | 5 +++++ src/stm32/Makefile | 1 + 2 files changed, 6 insertions(+) diff --git a/src/Makefile b/src/Makefile index f7ccb56..4943d5b 100644 --- a/src/Makefile +++ b/src/Makefile @@ -2,3 +2,8 @@ src-y += sched.c bootentry.c command.c flashcmd.c initial_pins.c src-$(CONFIG_ENABLE_LED) += led.c +src-$(CONFIG_ENABLE_SDCARD) += ../lib/fatfs/ff.c sdcard.c +src-$(CONFIG_SDCARD_SPI) += sdcard_spi.c + +dirs-$(CONFIG_ENABLE_SDCARD) += lib/fatfs +CFLAGS += -Ilib/fatfs diff --git a/src/stm32/Makefile b/src/stm32/Makefile index 5cdf64f..9ef5747 100644 --- a/src/stm32/Makefile +++ b/src/stm32/Makefile @@ -55,6 +55,7 @@ serial-src-$(CONFIG_MACH_STM32H7) := stm32/stm32h7_serial.c src-$(CONFIG_SERIAL) += $(serial-src-y) generic/serial_irq.c src-$(CONFIG_CANSERIAL) += stm32/can.c ../lib/fast-hash/fasthash.c src-$(CONFIG_CANSERIAL) += generic/canbus.c +src-$(CONFIG_SDCARD_SPI) += stm32/spi.c dirs-$(CONFIG_CANSERIAL) += lib/fast-hash