Skip to content

Commit 20236a8

Browse files
committed
stmhal: Upgrade to latest fatfs driver.
1 parent 6b755d8 commit 20236a8

143 files changed

Lines changed: 182 additions & 46245 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

stmhal/Makefile

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ CMSIS_DIR=cmsis
2121
HAL_DIR=hal
2222
USBDEV_DIR=usbdev
2323
#USBHOST_DIR=usbhost
24-
FATFS_DIR=fatfs
24+
FATFS_DIR=lib/fatfs
2525
DFU=../tools/dfu.py
2626
# may need to prefix dfu-util with sudo
2727
USE_PYDFU ?= 0
@@ -40,7 +40,7 @@ INC += -I$(CMSIS_DIR)/devinc
4040
INC += -I$(HAL_DIR)/inc
4141
INC += -I$(USBDEV_DIR)/core/inc -I$(USBDEV_DIR)/class/cdc_msc_hid/inc
4242
#INC += -I$(USBHOST_DIR)
43-
INC += -I$(FATFS_DIR)/src
43+
INC += -I../$(FATFS_DIR)
4444

4545
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
4646
CFLAGS = $(INC) -Wall -Wpointer-arith -Werror -ansi -std=gnu99 -nostdlib $(CFLAGS_MOD) $(CFLAGS_CORTEX_M4) $(COPT)
@@ -81,6 +81,8 @@ SRC_LIB = $(addprefix lib/,\
8181
libm/sf_sin.c \
8282
libm/sf_cos.c \
8383
libm/sf_tan.c \
84+
fatfs/ff.c \
85+
fatfs/option/ccsbcs.c \
8486
)
8587

8688
SRC_C = \
@@ -199,11 +201,6 @@ SRC_USBDEV = $(addprefix $(USBDEV_DIR)/,\
199201
usbd_storage_msd.c \
200202
)
201203

202-
SRC_FATFS = $(addprefix $(FATFS_DIR)/src/,\
203-
ff.c \
204-
option/ccsbcs.c \
205-
)
206-
207204
ifeq ($(MICROPY_PY_WIZNET5K),1)
208205
WIZNET5K_DIR=drivers/wiznet5k
209206
INC += -I$(TOP)/$(WIZNET5K_DIR)
@@ -247,15 +244,14 @@ OBJ += $(addprefix $(BUILD)/, $(SRC_C:.c=.o))
247244
OBJ += $(addprefix $(BUILD)/, $(SRC_S:.s=.o))
248245
OBJ += $(addprefix $(BUILD)/, $(SRC_HAL:.c=.o))
249246
OBJ += $(addprefix $(BUILD)/, $(SRC_USBDEV:.c=.o))
250-
OBJ += $(addprefix $(BUILD)/, $(SRC_FATFS:.c=.o))
251247
OBJ += $(addprefix $(BUILD)/, $(SRC_MOD:.c=.o))
252248
OBJ += $(BUILD)/pins_$(BOARD).o
253249

254250
# We put ff.o and stm32f4xx_hal_sd.o into the first 16K section with the ISRs.
255251
# If we compile these using -O0 then it won't fit. So if you really want these
256252
# to be compiled with -O0, then edit stm32f405.ld (in the .isr_vector section)
257253
# and comment out the following 2 lines.
258-
$(BUILD)/$(FATFS_DIR)/src/ff.o: COPT += -Os
254+
$(BUILD)/$(FATFS_DIR)/ff.o: COPT += -Os
259255
$(BUILD)/$(HAL_DIR)/src/stm32f4xx_hal_sd.o: COPT += -Os
260256

261257
all: $(BUILD)/firmware.dfu $(BUILD)/firmware.hex

stmhal/diskio.h

Lines changed: 0 additions & 114 deletions
This file was deleted.

stmhal/fatfs/doc/00index_e.html

Lines changed: 0 additions & 118 deletions
This file was deleted.

0 commit comments

Comments
 (0)