Skip to main content
Visitor II
April 20, 2007
Question

fopen function on STR910-eval

  • April 20, 2007
  • 3 replies
  • 700 views
Posted on April 20, 2007 at 19:47

fopen function on STR910-eval

    This topic has been closed for replies.

    3 replies

    yuhleonAuthor
    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 09:41

    Hi all ,

    I was added a fopen function in IAP , my board is STR910-EVAL .

    ex:

    inFile=fopen(''RTOSDemo.lzma'',''ab+'');

    but it will cause other function cannot execute successfully .

    My question is :

    If there is no filesystem , can I use fopen or fwrite ?

    Thank you!

    yuhleonAuthor
    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 09:41

    I am using IAR Embedded Workbench .

    I can compile and link my code successfully . But it cannot execute normally .

    Other normal functions will be effected by fopen and cannot execute normally . ( the functions are before fopen )

    I don't know what's going on .

    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 09:41

    I assume you are using the IAR DLIB-full library when you compile, and you have written your our __open, __write, __read and __close routines to access your ''file system'' (ie serial device, flash device, socket, etc). If so, it should work. I'm using it now to open serial devices, MMC flash card and uIP socket.

    The only issue I had was being dumb, and using close() instead of fclose(). This caused fopen to run out of file stream descriptors.