Missing source file

Sysprogs forums Forums VisualGDB Missing source file

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #35987
    mattia
    Participant

    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 1 month ago by mattia.
    • This topic was modified 1 month ago by mattia.
    Attachments:
    You must be logged in to view attached files.
    #35991
    support
    Keymaster

    Hi,

    Please refer to the ESP-IDF documentation for an explanation of the ESP-IDF project structure.

    #35992
    mattia
    Participant

    Sorry, I did a complete mistake, can you delete this post?

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.