Search found 65 matches

by ndjurov
Wed May 11, 2022 9:12 pm
Forum: General Discussion
Topic: Spiffs partition formatting
Replies: 0
Views: 1596

Spiffs partition formatting

My ESP32 WROVER has 16MB of flash, half of which we use as a spiffs partition to store debug log files. However, it turned out that if the file is large (above 2MB), it really starts slowing the application down. I tried renaming the file, and/or deleting it and logging into a different file, but th...
by ndjurov
Mon Apr 04, 2022 2:53 pm
Forum: General Discussion
Topic: SpifFS, newlib, logging and fprintf
Replies: 3
Views: 3325

Re: SpifFS, newlib, logging and fprintf

Thanks a lot.
I'll try the same with littleFS and let you know which file system is better for this task.
by ndjurov
Sun Apr 03, 2022 4:38 am
Forum: General Discussion
Topic: SpifFS, newlib, logging and fprintf
Replies: 3
Views: 3325

SpifFS, newlib, logging and fprintf

Hi, Our ESP32 WROVER application is a multitasking one and it is using NewLib. We have 16MG of flash, so we decided to use half of it for a debug log file, using spifFS. Instead of using vprintf redirection, we use fprintf(), where we change the file pointer to either stdio or to a log file pointer....
by ndjurov
Tue Mar 01, 2022 11:43 pm
Forum: ESP-IDF
Topic: File not opening from SPIFFS
Replies: 7
Views: 8011

Re: File not opening from SPIFFS

I just had a small issue with reading from spiffs file. I use it to store the application debug logs, so at the start of application run I open it for appending only. Once I want to read it I do separate fopen() with "r" mode and get another file pointer, read the log and send it to a host. It turns...
by ndjurov
Tue Mar 01, 2022 7:33 am
Forum: General Discussion
Topic: Saving debug log
Replies: 3
Views: 3320

Re: Saving debug log

Thank you very much. In the end, instead of using file descriptors and dup(), or freopen(), I decided to use fprintf() instead of printf() everywhere in the code and just to use either stdout or to a log file pointer as the parameter, flushing the buffers before switching. Appears to be safe and sim...
by ndjurov
Mon Feb 28, 2022 1:18 am
Forum: General Discussion
Topic: Saving debug log
Replies: 3
Views: 3320

Re: Saving debug log

Just to ask if there are any suggestions.
Thank you.
by ndjurov
Fri Feb 25, 2022 11:52 pm
Forum: General Discussion
Topic: Saving debug log
Replies: 3
Views: 3320

Saving debug log

I would like to reroute debug messages (those that normally go out to UART0 and are captured by a host terminal application on the other side) to a local SPIFFS file. My understanding is that there are at least two ways of doing it: Either by using printf() in the code and replacing stdout file desc...
by ndjurov
Thu Feb 10, 2022 11:39 pm
Forum: General Discussion
Topic: NVS handle
Replies: 0
Views: 1357

NVS handle

I have an application that initializes NVS (one nvs partition with default nvs lablel) and later calls set/get, mostly for integers and short strings - non encrypted. My question is whether it makes any difference (except for execution time), to get nvs handle only once - during init procedure and r...
by ndjurov
Thu Feb 10, 2022 11:34 pm
Forum: General Discussion
Topic: ESP-IDF, esptool and flash download tool
Replies: 5
Views: 5225

Re: ESP-IDF, esptool and flash download tool

Thank you for your response.

It appears that the problem was in the flash frequency.
After changing the flash frequency from 80MHz to 40MHz, everything runs as expected.
by ndjurov
Wed Feb 09, 2022 4:35 pm
Forum: General Discussion
Topic: ESP-IDF, esptool and flash download tool
Replies: 5
Views: 5225

Re: ESP-IDF, esptool and flash download tool

Thank you very much, I'll do that, Would that explain the log that I put in the first post?