I just cloned the latest zephyr from github and tried building fat_fs. Got this error:
/Users/macbook/zephyrproject/zephyr/zephyr/samples/subsys/fs/fat_fs/src/main.c:11:10: fatal error: storage/disk_access.h: No such file or directory
11 | #include <storage/disk_access.h>
Although the file is present in:
/Users/macbook/zephyrproject/zephyr/zephyr/include/storage/disk_access.h
Also in: /Users/macbook/zephyrproject/zephyr/zephyr/include/disk/disk_access.h.
Hard-coding the full path takes care of it:#include "/Users/macbook/zephyrproject/zephyr/zephyr/include/storage/disk_access.h"
Next problem:
In file included from /Users/macbook/zephyrproject/zephyr/zephyr/samples/subsys/fs/fat_fs/src/main.c:11:
/Users/macbook/zephyrproject/zephyr/zephyr/include/storage/disk_access.h:23:10: fatal error: drivers/disk.h: No such file or directory
23 | #include <drivers/disk.h>
Again, hard-coding helps:
#include </Users/macbook/zephyrproject/zephyr/zephyr/include/drivers/disk.h>
Probably something wrong with my paths, etc. Any help would be appreciated.
However, next problem is:
/Users/macbook/zephyrproject/zephyr/subsys/disk/disk_access.c:18:1: warning: data definition has no type or storage class
18 | LOG_MODULE_REGISTER(disk);
| ^~~~~~~~~~~~~~~~~~~
/Users/macbook/zephyrproject/zephyr/subsys/disk/disk_access.c:18:1: error: type defaults to 'int' in declaration of 'LOG_MODULE_REGISTER' [-Werror=implicit-int]
/Users/macbook/zephyrproject/zephyr/subsys/disk/disk_access.c:18:1: warning: parameter names (without types) in function declaration
/Users/macbook/zephyrproject/zephyr/subsys/disk/disk_access.c: In function 'disk_access_register':
/Users/macbook/zephyrproject/zephyr/subsys/disk/disk_access.c:129:3: warning: implicit declaration of function 'LOG_ERR' [-Wimplicit-function-declaration]
129 | LOG_ERR("invalid disk interface!!");
| ^~~~~~~
/Users/macbook/zephyrproject/zephyr/subsys/disk/disk_access.c:142:2: warning: implicit declaration of function 'LOG_DBG' [-Wimplicit-function-declaration]
142 | LOG_DBG("disk interface(%s) registred", disk->name);
| ^~~~~~~
And here I'm lost. How do I fix this?
And if there are other problems after this, could you point me in the right direction?