Creating folders on the SD card, anyone have experience with this?

So as some people know I am attempting to having config files read from the sd card, and so far it’s going well. (Even changing motor configs).
However, my program can’t create folders for the sd card, and I have been trying to make it happen.

I have tried pros, and it builds and compiles, but it does not make the folder on the SD card.
I used my Custom SDK, but it says that mkdir and _stat is undefined in the linker, and I am aware I need to use newlib, but I can’t figure out how to get it to work.
(Used std::filesystem::create_directory(“/config”); with #include .)

Not supported IIRC.

2 Likes

The SDK is only a partial implementation of newlib. Other parts of newlib are just stubbed (directory creation would give you FR_NOPATH), including some of the FFS/io functions. With what’s provided to user code, can read directories, but not create new ones afaik.

3 Likes

Thank you all, I do hope that one day it will be supported, but I get that there are more important things to do :slight_smile:

  • DVT

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.