Hey all,
I’m playing with the 2.2 preview, and trying to replicate the intended use case; i.e. save a file to flash, then make it available for the user via USB.
I can get the drive to show, I can format it as FAT with diskpart, all good there. I’m having trouble then opening the drive to actually write data to it in the application.
Following the filesystem doc, I have this:
var qspi= StorageController.FromName(SC20100.StorageController.QuadSpi);
drive = FileSystem.Mount(qspi.Hdc);
The application is crashing on the Mount, with error:
#### Exception System.InvalidOperationException - CLR_E_INVALID_OPERATION (1) ####
#### Message:
#### GHIElectronics.TinyCLR.IO.FileSystem::Initialize [IP: 0000] ####
#### GHIElectronics.TinyCLR.IO.FileSystem::Mount [IP: 0024] ####
#### ConduitX1.SettingsFileManager::Setup [IP: 0010] ####
#### ConduitX1.Program::Main [IP: 01b4] ####
Exception thrown: 'System.InvalidOperationException' in GHIElectronics.TinyCLR.IO.dll
An unhandled exception of type 'System.InvalidOperationException' occurred in GHIElectronics.TinyCLR.IO.dll
Windows is reporting the format as being MBR. Any help appreciated!