Visual Studio, Eclipse equivalent of FileIO open & read files

Sysprogs forums Forums VisualGDB Visual Studio, Eclipse equivalent of FileIO open & read files

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #20441
    CrazySD
    Participant

    Using Visual Studio & VisualGDB for the STM32F407VG
    And in this C program I have to open and read various .bin and .wav files that come with the project.

    I’m looking for the equivalent of Eclipses, adding files to ReadIO and it can locate the file, by filename reference alone.
    Is this possible, or do I need to change the function to set folder location for all the files, when using Visual Studio?

    Attachments:
    You must be logged in to view attached files.
    #20444
    support
    Keymaster

     

    Hi,

    Yes, there are several libraries that can help you do that. Where do you envision storing the files on the device? FLASH memory, SD card, or some other location?

    #20445
    CrazySD
    Participant

    Ah, sorry these ones are just being read on the computer and run using MinGW (Same as Eclipse)
    Is there much change in programming if I run it on the pc, and switch to linking to the STM?

    #20446
    support
    Keymaster

    Hi,

    Eclipse likely does is via the semihosting mechanism that allows reading files on the Windows machine via special syscalls that are handled by the debugger. VisualGDB doesn’t support it as this has a very limited use (it won’t work in production code that doesn’t run with the debugger attached) and introduces security risk (attaching to a board running malicious firmware could potentially let it compromise files on your computer).

    If you would like to embed binary resources (such as graphics or sound files) into your program, please consider following our Embedded Resource Tutorial.

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