1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/tests/pkg_fatfs/Makefile
Benjamin Valentin 42df626181 tests/pkg_fatfs{_vfs}: drop whitelist
We have the `FEATURES_REQUIRED` now, no need to whitelist boards with SPI
and GPIOs.
2022-01-06 14:28:38 +01:00

36 lines
982 B
Makefile

include ../Makefile.tests_common
BOARD ?= native
FEATURES_OPTIONAL += periph_rtc
FEATURES_REQUIRED += periph_spi
USEMODULE += shell
USEMODULE += fatfs_diskio_mtd
USEMODULE += mtd
USEPKG += fatfs
FATFS_IMAGE_FILE_SIZE_MIB ?= 128
ifeq ($(BOARD),native)
#overwrite default mtd_native-config to use fat image as flash device
CFLAGS += -DMTD_NATIVE_FILENAME=\"./bin/riot_fatfs_disk.img\"
CFLAGS += -DMTD_PAGE_SIZE=512
CFLAGS += -DMTD_SECTOR_SIZE=512
CFLAGS += -DFATFS_IMAGE_FILE_SIZE_MIB=$(FATFS_IMAGE_FILE_SIZE_MIB)
CFLAGS += -DMTD_SECTOR_NUM=\(\(\(FATFS_IMAGE_FILE_SIZE_MIB\)*1024*1024\)/MTD_SECTOR_SIZE\)
else
# for actual hardware use mtd_sdcard as storage device
USEMODULE += mtd_sdcard
endif
image:
${Q}mkdir -p bin
${Q}tar -xjf riot_fatfs_disk.tar.bz2 -C ./bin/
#this generates a compressed fat image file that can be used by the fat driver on native
compressed-image:
${Q}./create_fat_image_file.sh $(FATFS_IMAGE_FILE_SIZE_MIB)
include $(RIOTBASE)/Makefile.include