This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

fopen problem

Hi!!

I have problem with fopen funciton. I'm using MCB2300 (lpc2378). When I use SD_File examle its work's fine. Now I'm doing my project, I have proglem. I could incialize SD card, but I can't open file (fopen returns error). I have set IRAM2 to addres 0x7FD00000 and size 0x2000, RTLFS.lib (code/cons: default; Zero Initialized Data: IRAM2, Other data: Default)

Default: IRAM1 0x40000000 0x8000
         IRAM2 0x7FD00000 0x2000 (USB)
         RAM1  0x7FE00000 0x4000 (ethernet)

In project I have also included: ETHERNET, DHCP, TELNET, TCP/IP, UDP, TFTP, serial and kernal (from example Http)

I even tried this and don't work:

int main (void) {
   /* Start with 'init' task. */

   FILE *fin;

init_serial();
init_card ();

   fin = fopen ("Test.txt","w");
   if (fin == NULL) {
      send_text ("File not found!\n");
   }
   else {
      // process file content
      fclose (fin);
      send_text ("File OK!\n");
   }
   //os_sys_init(init);
   while(1);
}


Any idea where could be a problem?

Best regard
Peter

0