This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

FAT file error

Hi,

we are trying to use FAT file in nRF9160. Referring the test case in "ncs\zephyr\tests\subsys\fs\multi-fs\src" to mount the FAT file.

But getting an error like "ff.h" not found:

../src/main.c:24:10: fatal error: ff.h: No such file or directory
#include <ff.h>

Code tried:

#define FATFS_MNTP "/RAM:"
#define TEST_FILE FATFS_MNTP"/testfile.txt"
#define TEST_DIR FATFS_MNTP"/testdir"
#define TEST_DIR_FILE FATFS_MNTP"/testdir/testfile.txt"

static FATFS fat_fs;

static struct fs_mount_t fatfs_mnt = {
.type = FS_FATFS,
.mnt_point = FATFS_MNTP,
.fs_data = &fat_fs,
};

void main(void)
{
int res;
res = fs_mount(&fatfs_mnt);
if (res < 0) {
printk("Error mounting fs [%d]\n", res);
return 0;
}}

Help us to resolve the error or please point us to the sample code/application to store the content in file system.

And what all are ways to persist  the settings/content in nRF9160 ?

Thanks,
Bala

 

Parents Reply Children
No Data
Related