Hello,
I’m using VisualGDB 6.0R3 and an ESP-IDF project. I’m writing some data to a file in the internal flash using the fwrite.c function. However I get the attached “missing source file”, even if I had included the stdio.h header. Here attached my code:
<div>void write_LittleFS(esp_vfs_littlefs_conf_t * conf, char * filename, char *source_address, unsigned short length)
</div>
<div>{
</div>
<div>char str[80];
</div>
<div></div>
<div>// Use POSIX and C standard library functions to work with files.
</div>
<div>// First create a file.
</div>
<div>strcpy(str, conf->base_path);
</div>
<div>strcat(str, "/");
</div>
<div>strcat(str, filename);
</div>
<div></div>
<div>FILE *f = fopen(str, "w");
</div>
<div>if (f == NULL) {
</div>
<div>ESP_LOGE(TAG, "Failed to open file for writing");
</div>
<div>return;
</div>
<div>}
</div>
<div>fwrite(source_address, 1, length, f);
</div>
<div>fclose(f);
</div>
<div></div>
<div>}
</div>
And also attached the missing source file.
Does it depend on a missing file in SysGCC directory, or is it because of my firmware? I only would like to be sure the SysGCC directory used for IDF is correct, because I always thought it included the stdio.c, but can’t find it.
Thanks,
Mattia Berton
-
This topic was modified 2 months, 1 week ago by mattia.
-
This topic was modified 2 months, 1 week ago by mattia.
Attachments:
You must be
logged in to view attached files.