mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
Merge pull request #17653 from benpicco/cpu/native-fatfs_defaults
boards/native: select MTD defaults for FAT
This commit is contained in:
commit
1c3a646936
@ -60,11 +60,19 @@ void _native_LED_RED_TOGGLE(void);
|
||||
* @{
|
||||
*/
|
||||
#ifndef MTD_PAGE_SIZE
|
||||
#ifdef MODULE_FATFS
|
||||
#define MTD_PAGE_SIZE (512)
|
||||
#else
|
||||
#define MTD_PAGE_SIZE (256)
|
||||
#endif
|
||||
#endif
|
||||
#ifndef MTD_SECTOR_SIZE
|
||||
#ifdef MODULE_FATFS
|
||||
#define MTD_SECTOR_SIZE (512)
|
||||
#else
|
||||
#define MTD_SECTOR_SIZE (4096)
|
||||
#endif
|
||||
#endif
|
||||
#ifndef MTD_SECTOR_NUM
|
||||
#define MTD_SECTOR_NUM (2048)
|
||||
#endif
|
||||
|
@ -91,8 +91,6 @@ riot_fatfs_disk.img
|
||||
|
||||
```
|
||||
CFLAGS += -DMTD_NATIVE_FILENAME=\"riot_fatfs_disk.img\"
|
||||
CFLAGS += -DMTD_PAGE_SIZE=512
|
||||
CFLAGS += -DMTD_SECTOR_SIZE=512
|
||||
CFLAGS += -DMTD_SECTOR_NUM=262144
|
||||
```
|
||||
|
||||
|
@ -15,8 +15,6 @@ 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
|
||||
|
@ -11,12 +11,8 @@ ifeq ($(BOARD),native)
|
||||
|
||||
#overwrite default mtd_native-config to use fat image as flash device
|
||||
MTD_NATIVE_FILENAME ?= \"./bin/riot_fatfs_disk.img\"
|
||||
MTD_PAGE_SIZE ?= 512
|
||||
MTD_SECTOR_SIZE ?= 512
|
||||
MTD_SECTOR_NUM ?= \(\(\(FATFS_IMAGE_FILE_SIZE_MIB\)*1024*1024\)/MTD_SECTOR_SIZE\)
|
||||
CFLAGS += -DMTD_NATIVE_FILENAME=$(MTD_NATIVE_FILENAME)
|
||||
CFLAGS += -DMTD_PAGE_SIZE=$(MTD_PAGE_SIZE)
|
||||
CFLAGS += -DMTD_SECTOR_SIZE=$(MTD_SECTOR_SIZE)
|
||||
CFLAGS += -DFATFS_IMAGE_FILE_SIZE_MIB=$(FATFS_IMAGE_FILE_SIZE_MIB)
|
||||
CFLAGS += -DMTD_SECTOR_NUM=$(MTD_SECTOR_NUM)
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user