diff BSDmakefile @ 49:ace431a0d0f5

Add SDIO code poached from STM. Use FatFS to read from SD card. LFN doesn't work reliably so it's disabled for now.
author Daniel O'Connor <darius@dons.net.au>
date Wed, 03 Apr 2013 23:34:20 +1030
parents 7d4c25c288bb
children d7207a9d3c3b
line wrap: on
line diff
--- a/BSDmakefile	Wed Apr 03 23:33:47 2013 +1030
+++ b/BSDmakefile	Wed Apr 03 23:34:20 2013 +1030
@@ -4,20 +4,24 @@
 		comm.c \
 		core_cm3.c \
 		delay.c \
+		fatfs_sd.c \
+		ff.c \
 		flash.c \
 		hw.c \
 		lcd.c \
 		main.c \
 		misc.c \
+		sd.c \
 		spi.c \
 		sprink.c \
+		stm32_eval_sdio_sd.c \
 		startup_stm32f10x_md_mthomas.c \
 		syscalls.c \
 		system_stm32f10x.c \
 		tempctrl.c \
 		touch.c
 
-STM32LIBS=	usart gpio rcc rtc pwr bkp fsmc spi tim i2c crc
+STM32LIBS=	usart gpio rcc rtc pwr bkp fsmc spi tim i2c crc sdio dma
 
 .for f in ${STM32LIBS}
 SRCS+=		stm32f10x_${f}.c
@@ -70,6 +74,13 @@
 .PATH:		${COREDIR}
 .PATH:		${SYSDIR}
 
+# FatFS
+FATFS=		${.CURDIR}/fatfs
+CFLAGS+=	-I${FATFS}
+.PATH:		${FATFS}
+.PATH:		${FATFS}/option
+
+
 DBGPORT=	/dev/cu.usbmodem7FC58901
 
 .include "${.CURDIR}/BSDmakefile.arm"