Page 1 of 1

nanoFramework on ESP32-S3 can't write to file system (FileStream Exception)

Posted: Sat Aug 02, 2025 6:59 am
by Murat Keçeli
Subject: File System Access Issue on ESP32-S3 with .NET nanoFramework

Hello,

We are using a device based on the ESP32-S3 (QFN56) with .NET nanoFramework.
Our goal is to store configuration settings in a text file (e.g., 'ayarlar.txt') using SPIFFS file system.
However, all file system operations (creation, writing, reading) fail on the current firmware.

✔️ Device Information:
- Model: ESP32-S3 (QFN56)
- Flash: 16MB
- PSRAM: 8MB
- Firmware: nanoFramework 1.12.4.231 (target: ESP32_S3_ALL)
- Serial Port: COM14 (confirmed connection)

❌ Problem Description:

The following code fails when attempting to create a file:
```csharp
using (var fs = new FileStream(@"\ayarlar.txt", FileMode.Create, FileAccess.Write))
{
// Exception is thrown here
}
```

Error received:
```
Exception System.Exception - CLR_E_PATH_TOO_LONG (1)
System.IO.NativeIO::GetAttributes
```

Additionally, trying to list directory contents fails:
```csharp
Directory.GetFiles(@"\");
```

⚠️ This indicates that the internal file system (SPIFFS) is either missing or not mounted.

🎯 Expected Behavior:
If the firmware includes SPIFFS support, file access via paths like `@"\ayarlar.txt"` should work without exception.

🧪 What We Have Tried:
- Firmware flashed via nanoff using:
--target ESP32_S3_ALL
--serialport COM14
--fwversion 1.12.4.231
--masserase
- Device successfully connects and responds via COM14.
- nanoCLR is running and recognized by Visual Studio.

📌 Our Request:
Please verify whether the current firmware includes SPIFFS support for the ESP32_S3_ALL target.
If not, we kindly request guidance or a rebuilt firmware that includes a working SPIFFS file system section.
We are also open to rebuilding the firmware ourselves if given instructions for enabling SPIFFS and partition configuration.

Kind regards,
Murat Keceli