Search found 49 matches

by ESP_adokitkat
Sun Aug 25, 2024 5:19 pm
Forum: General Discussion
Topic: can't fail to open file
Replies: 11
Views: 2022

Re: can't fail to open file

Ok, I just noticed a very strange behavior. Even if my code is behaving as 'expected' (provided you delay 3 seconds and execute the weird conditional logic), the file doesn't exist when I insert my sd card in my laptop.. Even if the esp32 is able to read it back again when I mount back the sd card ...
by ESP_adokitkat
Fri Aug 23, 2024 3:09 pm
Forum: General Discussion
Topic: can't fail to open file
Replies: 11
Views: 2022

Re: can't fail to open file

well, for example I definitely tried to change the filename, like if it was "filetext.txt" I rename it "filetex2.txt". normally I would expect that opening the same file twice execute the 1st code block(FA_CREATE_NEW creates a new file), then the second open would execute the 2nd code block(FA_OPEN...
by ESP_adokitkat
Fri Aug 23, 2024 3:06 pm
Forum: General Discussion
Topic: can't fail to open file
Replies: 11
Views: 2022

Re: can't fail to open file

Hello. I am not sure why is it happening, but can you try something like this? I am using `access` to see if the file exists. #include <unistd.h> //... FIL* file = (FIL*) ff_memalloc(sizeof(FIL)); if (file == NULL) { ;/* handle NULL */ } memset(file, 0, sizeof(FIL)); FRESULT fr = 0; if (access(FILE_...
by ESP_adokitkat
Fri Aug 23, 2024 2:30 pm
Forum: ESP-IDF
Topic: some esp_vfs_fat and FatFs functions are unavailable
Replies: 3
Views: 777

Re: some esp_vfs_fat and FatFs functions are unavailable

Well, yes, I am an employee of Espressif, hence "ESP_" in my nickname here :) I was able to pinpoint your issue because it was me who enabled FF_USE_EXPAND and added those helper functions to esp-idf (and they were able to make it to release v5.3) after noticing it wasn't enabled before and could ha...
by ESP_adokitkat
Thu Aug 22, 2024 2:51 pm
Forum: General Discussion
Topic: filesystem fatfs function unavailable
Replies: 1
Views: 568

Re: filesystem fatfs function unavailable

Please let's move the conversation to one thread, I answered in the other one: https://esp32.com/viewtopic.php?f=13&t=41464
by ESP_adokitkat
Thu Aug 22, 2024 2:41 pm
Forum: ESP-IDF
Topic: some esp_vfs_fat and FatFs functions are unavailable
Replies: 3
Views: 777

Re: some esp_vfs_fat and FatFs functions are unavailable

Hello. Which esp-idf version are you using? It is only available from v5.3 stable branch (or in release/v5.3 or master branch). To make f_expand from fatfs available on lower idf version you have to modify `components/fatfs/src/ffconf.h` from `#define FF_USE_EXPAND 0` to `#define FF_USE_EXPAND 1`.
by ESP_adokitkat
Thu Aug 15, 2024 11:18 pm
Forum: General Discussion
Topic: ESP32S3 microSD read issue
Replies: 1
Views: 1010

Re: ESP32S3 microSD read issue

Hello. It seems like a heap corruption problem (buffer overflow, underflow, etc.). Are you sure you initialize/allocate and deinitialize/deallocate everything properly? Please see https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/api-reference/system/heap_debug.html or an equivalent for ...
by ESP_adokitkat
Mon Jul 15, 2024 5:11 pm
Forum: ESP-IDF
Topic: Create two sdmmc partition
Replies: 5
Views: 2012

Re: Create two sdmmc partition

You cannot simply call `esp_vfs_fat_sdmmc_mount` twice - it is a helper function for easy usage (i.e. mounting 1 SDMMC device with 1 partition). The SDMMC host peripheral has to be only initialized once. Using this code I was able to mount eMMC, partition it to 2 partitions, format and mount them. T...
by ESP_adokitkat
Mon Jul 15, 2024 1:39 am
Forum: ESP-IDF
Topic: How to upload wifi credentials from nvs partition
Replies: 4
Views: 1627

Re: How to upload wifi credentials from nvs partition

Hello, have you seen ` examples/storage/nvsgen ` example? It is using more user-friendly way of doing this. You can see there is `nvs_data.csv` file there (and there is a string inside as well) and in `main/CMakeLists.txt` there is a line `nvs_create_partition_image(nvs ../nvs_data.csv FLASH_IN_PROJ...
by ESP_adokitkat
Mon Jul 15, 2024 1:15 am
Forum: General Discussion
Topic: Why there is no 'Example Configuration' in the menuconfig? ESP-IDF_v5.2.2
Replies: 2
Views: 1077

Re: Why there is no 'Example Configuration' in the menuconfig? ESP-IDF_v5.2.2

Hello. I am on IDF branch v5.2.2, did `./install.sh` and `. ./exports.sh`, went to the folder of the example and I can see the Example configuration menuconfig option: Screenshot 2024-07-15 031035.png Are you sure you have done everything correctly or have ESP-IDF installed properly? Maybe try to to...