Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Helper Method to Re-Format Internal Flash Drives on Boards that Support It #1229

Closed
gligorov opened this issue Feb 22, 2023 · 5 comments · Fixed by nanoframework/nf-interpreter#2911

Comments

@gligorov
Copy link

Description

At present there is no way to reformat the internal flash on devices. If for any reason, format is needed, ( security, troubleshooting etc.), there is no way to do that.

How to solve the problem

Add a simple helper method like Format(string driveLetter) or something similar to be used from a library that is best suited for this.

Describe alternatives you've considered

none at present

Aditional context

No response

@Ellerbach
Copy link
Member

You can already do this by getting all the files and deleting all of them. Wouldn't that be enough?
It's especially easy on an internal storage as no folder is supported. But it will just work the same way with a recurring function.

@josesimoes
Copy link
Member

Nope. This requires a native call in order to restart/format the file system or SPIFFs. When it comes to this, it's because the file system got unusable.

@torbacz
Copy link
Contributor

torbacz commented Dec 29, 2023

Maybe command with nanoff will be sufficient?

@networkfusion
Copy link
Member

@josesimoes should this be closed now?

@josesimoes
Copy link
Member

@josesimoes should this be closed now?

The linked PR has added support for this only for SPIFFs storage. I think it should be extended to the other supported storage: SD Cards and USB MSD. That's why I left it open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants