1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/tests/pkg/fatfs_vfs/Makefile
Frederik Haxel 5ed0bafc92 examples, tests: Changes for the native64 board
- Adapted build system and test checks for the native boards to include native64
- Added `native64` to the same tests as `native`
2024-02-05 22:02:14 +01:00

36 lines
1.0 KiB
Makefile

include ../Makefile.pkg_common
USEMODULE += fatfs_vfs
FEATURES_OPTIONAL += periph_rtc
FEATURES_REQUIRED += periph_spi
# remove this if you don't want to format your SD card
USEMODULE += fatfs_vfs_format
CFLAGS += -DCONFIG_FATFS_FORMAT_ALLOC_STATIC=1
FATFS_IMAGE_FILE_SIZE_MIB ?= 128
ifneq (,$(filter native native64,$(BOARD)))
USEMODULE += mtd_native
#overwrite default mtd_native-config to use fat image as flash device
MTD_NATIVE_FILENAME ?= \"./bin/riot_fatfs_disk.img\"
MTD_SECTOR_NUM ?= \(\(\(FATFS_IMAGE_FILE_SIZE_MIB\)*1024*1024\)/MTD_SECTOR_SIZE\)
CFLAGS += -DMTD_NATIVE_FILENAME=$(MTD_NATIVE_FILENAME)
CFLAGS += -DFATFS_IMAGE_FILE_SIZE_MIB=$(FATFS_IMAGE_FILE_SIZE_MIB)
CFLAGS += -DMTD_SECTOR_NUM=$(MTD_SECTOR_NUM)
else
USEMODULE += mtd_sdcard
endif
TEST_DEPS += image
include $(RIOTBASE)/Makefile.include
image:
@tar -xjf riot_fatfs_disk.tar.gz -C ./bin/
#this generates a compressed fat image file that can be used by the fat driver on native
compressed-image:
@./create_fat_image_file.sh $(FATFS_IMAGE_FILE_SIZE_MIB)