ESP8266 RTOS using open()/close()
Posted: Thu Dec 19, 2019 4:31 pm
I'm switching a project that was using the NONOS SDK to RTOS and one of the big changes is the "vfs" system. It's a nice wrapper around SPIFFS. But I really don't want to use the stdio calls (fopen, fwrite, etc.). I really want to use the system io functions (open, write, etc.). I changed the SPIFFS example in the SDK and everything link and loads onto the board (I'm using a Wemos D1 mini). This example works correctly on the board unmodified, but when I try to replace fopen with open I get back an ENOENT error. I've set the flags to O_WRONLY | O_CREAT, which should create the file if it doesn't exist.
Are these calls supported? Looking at the SDK source, the SPIFFS calls are wrapped with _open_r which should make Newlib happy for both open and fopen.
Does anyone have experience with this?
Are these calls supported? Looking at the SDK source, the SPIFFS calls are wrapped with _open_r which should make Newlib happy for both open and fopen.
Does anyone have experience with this?