2016-11-07 21:34:08 +01:00
|
|
|
include ../Makefile.tests_common
|
|
|
|
|
|
|
|
BOARD ?= native
|
|
|
|
|
2017-10-18 23:59:37 +02:00
|
|
|
FEATURES_OPTIONAL += periph_rtc
|
|
|
|
|
2017-07-05 14:54:42 +02:00
|
|
|
# this list is composed of boards that support spi/gpio + native
|
|
|
|
BOARD_WHITELIST := airfy-beacon arduino-due arduino-duemilanove arduino-mega2560 \
|
|
|
|
arduino-mkr1000 arduino-mkrzero arduino-uno arduino-zero avsextrem \
|
|
|
|
b-l072z-lrwan1 b-l475e-iot01a bluepill cc2538dk ek-lm4f120xl \
|
|
|
|
feather-m0 fox frdm-k22f frdm-k64f ikea-tradfri iotlab-a8-m3 \
|
|
|
|
iotlab-m3 limifrog-v1 maple-mini msb-430 msb-430h msba2 msbiot \
|
2018-01-25 10:55:06 +01:00
|
|
|
mulle nrf52840dk nrf52dk nrf6310 nucleo-f207zg nucleo144-f303 \
|
2017-07-05 14:54:42 +02:00
|
|
|
nucleo144-f412 nucleo144-f413 nucleo144-f429 nucleo144-f446 \
|
|
|
|
nucleo32-f031 nucleo32-f042 nucleo32-f303 nucleo32-l031 \
|
2018-02-27 14:30:54 +01:00
|
|
|
nucleo32-l432 nucleo-f072rb nucleo-f091rc nucleo-f103rb nucleo-f302r8 \
|
2018-02-27 14:33:51 +01:00
|
|
|
nucleo-f303re nucleo-f334r8 nucleo-f401re nucleo-f410rb nucleo-f411 \
|
2017-07-05 14:54:42 +02:00
|
|
|
nucleo-f446 nucleo-l053 nucleo-l073 nucleo-l152 nucleo-l476 \
|
|
|
|
nz32-sc151 openmote-cc2538 pba-d-01-kw2x remote-pa remote-reva \
|
|
|
|
remote-revb samd21-xpro saml21-xpro samr21-xpro sltb001a \
|
|
|
|
sodaq-autonomo sodaq-explorer spark-core stm32f0discovery \
|
2017-08-24 17:10:27 +02:00
|
|
|
stm32f3discovery stm32f4discovery telosb udoo waspmote-pro \
|
2017-07-05 14:54:42 +02:00
|
|
|
wsn430-v1_3b wsn430-v1_4 yunjia-nrf51822 z1 native
|
|
|
|
|
|
|
|
USEMODULE += shell
|
|
|
|
USEMODULE += fatfs_diskio_mtd
|
|
|
|
USEMODULE += mtd
|
|
|
|
USEPKG += fatfs
|
|
|
|
|
|
|
|
FATFS_IMAGE_FILE_SIZE_MIB ?= 128
|
2016-11-07 21:34:08 +01:00
|
|
|
|
|
|
|
ifeq ($(BOARD),native)
|
2017-07-05 14:54:42 +02:00
|
|
|
#overwrite default mtd_native-config to use fat image as flash device
|
|
|
|
CFLAGS += -DMTD_NATIVE_FILENAME=\"./bin/riot_fatfs_disk.img\"
|
2018-02-22 08:27:24 +01:00
|
|
|
CFLAGS += -DMTD_PAGE_SIZE=512
|
|
|
|
CFLAGS += -DMTD_SECTOR_SIZE=512
|
2017-07-05 14:54:42 +02:00
|
|
|
CFLAGS += -DFATFS_IMAGE_FILE_SIZE_MIB=$(FATFS_IMAGE_FILE_SIZE_MIB)
|
2018-02-22 08:27:24 +01:00
|
|
|
CFLAGS += -DMTD_SECTOR_NUM=\(\(\(FATFS_IMAGE_FILE_SIZE_MIB\)*1024*1024\)/MTD_SECTOR_SIZE\)
|
2016-11-07 21:34:08 +01:00
|
|
|
else
|
2017-07-05 14:54:42 +02:00
|
|
|
# for actual hardware use mtd_sdcard as storage device
|
|
|
|
USEMODULE += mtd_sdcard
|
2016-11-07 21:34:08 +01:00
|
|
|
endif
|
|
|
|
|
2017-07-05 14:54:42 +02:00
|
|
|
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)
|
2016-11-07 21:34:08 +01:00
|
|
|
|
|
|
|
include $(RIOTBASE)/Makefile.include
|