aboutsummaryrefslogtreecommitdiff
path: root/stmhal/Makefile
diff options
context:
space:
mode:
authorDamien George2014-12-20 21:15:16 +0000
committerDamien George2014-12-27 17:36:16 +0000
commit20236a8a990cae729bca1f7a4e0d619e92a5e37d (patch)
treef69bbda4935e7d56ed6cbc7d6d401bc023993b34 /stmhal/Makefile
parent6b755d827ac96fab8649f35b0e3508a28106c532 (diff)
stmhal: Upgrade to latest fatfs driver.
Diffstat (limited to 'stmhal/Makefile')
-rw-r--r--stmhal/Makefile14
1 files changed, 5 insertions, 9 deletions
diff --git a/stmhal/Makefile b/stmhal/Makefile
index 98f31ebad..d9d854877 100644
--- a/stmhal/Makefile
+++ b/stmhal/Makefile
@@ -21,7 +21,7 @@ CMSIS_DIR=cmsis
HAL_DIR=hal
USBDEV_DIR=usbdev
#USBHOST_DIR=usbhost
-FATFS_DIR=fatfs
+FATFS_DIR=lib/fatfs
DFU=../tools/dfu.py
# may need to prefix dfu-util with sudo
USE_PYDFU ?= 0
@@ -40,7 +40,7 @@ INC += -I$(CMSIS_DIR)/devinc
INC += -I$(HAL_DIR)/inc
INC += -I$(USBDEV_DIR)/core/inc -I$(USBDEV_DIR)/class/cdc_msc_hid/inc
#INC += -I$(USBHOST_DIR)
-INC += -I$(FATFS_DIR)/src
+INC += -I../$(FATFS_DIR)
CFLAGS_CORTEX_M4 = -mthumb -mtune=cortex-m4 -mabi=aapcs-linux -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -fsingle-precision-constant -Wdouble-promotion
CFLAGS = $(INC) -Wall -Wpointer-arith -Werror -ansi -std=gnu99 -nostdlib $(CFLAGS_MOD) $(CFLAGS_CORTEX_M4) $(COPT)
@@ -81,6 +81,8 @@ SRC_LIB = $(addprefix lib/,\
libm/sf_sin.c \
libm/sf_cos.c \
libm/sf_tan.c \
+ fatfs/ff.c \
+ fatfs/option/ccsbcs.c \
)
SRC_C = \
@@ -199,11 +201,6 @@ SRC_USBDEV = $(addprefix $(USBDEV_DIR)/,\
usbd_storage_msd.c \
)
-SRC_FATFS = $(addprefix $(FATFS_DIR)/src/,\
- ff.c \
- option/ccsbcs.c \
- )
-
ifeq ($(MICROPY_PY_WIZNET5K),1)
WIZNET5K_DIR=drivers/wiznet5k
INC += -I$(TOP)/$(WIZNET5K_DIR)
@@ -247,7 +244,6 @@ OBJ += $(addprefix $(BUILD)/, $(SRC_C:.c=.o))
OBJ += $(addprefix $(BUILD)/, $(SRC_S:.s=.o))
OBJ += $(addprefix $(BUILD)/, $(SRC_HAL:.c=.o))
OBJ += $(addprefix $(BUILD)/, $(SRC_USBDEV:.c=.o))
-OBJ += $(addprefix $(BUILD)/, $(SRC_FATFS:.c=.o))
OBJ += $(addprefix $(BUILD)/, $(SRC_MOD:.c=.o))
OBJ += $(BUILD)/pins_$(BOARD).o
@@ -255,7 +251,7 @@ OBJ += $(BUILD)/pins_$(BOARD).o
# If we compile these using -O0 then it won't fit. So if you really want these
# to be compiled with -O0, then edit stm32f405.ld (in the .isr_vector section)
# and comment out the following 2 lines.
-$(BUILD)/$(FATFS_DIR)/src/ff.o: COPT += -Os
+$(BUILD)/$(FATFS_DIR)/ff.o: COPT += -Os
$(BUILD)/$(HAL_DIR)/src/stm32f4xx_hal_sd.o: COPT += -Os
all: $(BUILD)/firmware.dfu $(BUILD)/firmware.hex