Hi,
I integrate MPY as a library to my main program in Arduino ESP32. On ESP32, it already has VFS implementation. So I want to integrate it into MPY VFS.
I look at the code of MPY vfs, vfs fat, found that the module is integrated tightly with library oofatfs.
Please guide me how to integrate ESP32 Arduino VFS into MPY VFS, discard oofatfs. So that MPY has features of file io, doing import, run .py, .mpy from the file system, open/write/find/close file,...
I mean I want to keep all MPY io APIs, but I will make glue code to ESP32 Arduino VFS (to support SPIFFS too).
Thank you so so much.
Integrate VFS interface to external other file system
-
- Posts: 14
- Joined: Sun May 30, 2021 7:38 am
-
- Posts: 14
- Joined: Sun May 30, 2021 7:38 am
Re: Integrate VFS interface to external other file system
In file vfs_fat_file.c, MPY 1.15, I really dont understand why.
line 217, it calls file_open with NULL as 1st argument.
But, in function file_open, at line 199, it checks
So FileIO class could not be created!
Please help me explain the reason.
Thanks.
line 217, it calls file_open with NULL as 1st argument.
Code: Select all
STATIC mp_obj_t file_obj_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) {
mp_arg_val_t arg_vals[FILE_OPEN_NUM_ARGS];
mp_arg_parse_all_kw_array(n_args, n_kw, args, FILE_OPEN_NUM_ARGS, file_open_args, arg_vals);
return file_open(NULL, type, arg_vals);
}
Code: Select all
assert(vfs != NULL);
Please help me explain the reason.
Thanks.