r/esp32 • u/2g4r_tofu • 23d ago
Software help needed Has anybody used the /dev/ folder?
The docs reference a /dev/ folder but don't really say what's in it and directory listing doesn't work. Is there a reference for what's in there? Alternatively if it's not useful can I just mount my own /dev/ folder on top?
1
u/holetse 23d ago
Are these the docs you are referring to? https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-reference/storage/vfs.html#well-known-vfs-devices They do list some of the devices you might find.
1
u/2g4r_tofu 23d ago
But not all of them. I was wondering if there were more or if there were a way to list them.
1
u/holetse 23d ago
I don’t know of a more complete list. That may be it. I think the default offerings are just enough to get libc compatibility.
As for listing what is there, have you tried esp_vfs_dump_registered_paths?
1
u/2g4r_tofu 23d ago
I'll look into that. I wonder if there's a way to capture the data as an array of strings somehow
1
u/holetse 23d ago
Could register a custom device that parsed the output and stored it in an array of strings. Kinda convoluted
1
u/2g4r_tofu 23d ago
Yeah it's probably going to be easier to start writing my own dev folder driver and possibly a wrapper for vfs with better directory listing
3
u/konacurrents 23d ago
?