sub-sys: disk: ram: Make RAM disk size be configurable

Hardcoded 96KB starts to overload RAM regions and fail CI tests.
Quick test shows that 80KB ramdisk is ok, (passes tests/posix/fs).
And of course, targets with wealth of RAM may want to use bigger
ramdisks.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
This commit is contained in:
Paul Sokolovsky 2019-02-07 21:55:08 +03:00 committed by Anas Nashif
commit 4fd593068e
2 changed files with 9 additions and 3 deletions

View file

@ -47,6 +47,12 @@ endif # DISK_ACCESS
if DISK_ACCESS_RAM
config DISK_RAM_VOLUME_SIZE
int "RAM Disk size in kilobytes"
default 96
help
Size of the RAM Disk.
config DISK_RAM_VOLUME_NAME
string "RAM Disk mount point or drive name"
default "RAM"

View file

@ -20,10 +20,10 @@
*/
#include "fat12_ramdisk.h"
#else
/* A 96KB RAM Disk, which meets ELM FAT fs's minimum block requirement. Fit for
* qemu testing (as it may exceed target's RAM limits).
/* RAM Disk of configurable size. Fit for qemu testing (as it may exceed
* target's RAM limits).
*/
#define RAMDISK_VOLUME_SIZE (192 * RAMDISK_SECTOR_SIZE)
#define RAMDISK_VOLUME_SIZE (CONFIG_DISK_RAM_VOLUME_SIZE * 1024)
static u8_t ramdisk_buf[RAMDISK_VOLUME_SIZE];
#endif