This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Unable to open more than 16 files through fopen using GCC ARM version "4.7 2013q3 "

Hi Team,

1. I am using GCC ARM compiler to build my solution (.out)

2. My application requires to open 64 files. I am not able to open more than 16 files using fopen.

Sample code :

A15TOOLS = "C:\Program Files\GNU Tools ARM Embedded\4.7 2013q3\bin\arm-none-eabi-gcc"

for(i = 0; i < 64; i++)
{
  fp[i] = fopen(fileArray[i], "w");
  if(fp[i] == NULL)
  {
     printf("%s : Unable to open\n", fileArray[i]);
  }
}


Using the above sample code I am able to open only 16 files. fopen return NULL for index greater than 16.

3. We faced similar issue with TI RTS Library. (ti-cgt-c6000_8.1.0)

4. We fixed the same by modifing value of macro _NFILE in file stdio.h and _NSTREAM macro in file file.h and rebuilding RTS library fixed the issue.

5. Can you please help me to fix the issue for GCC ARM compiler version 4.7 2013q3.

6. Can you please help me to find the source code for CCS ARM compiler version 4.7 2013q3 or above and rebuild libc.a.

Thanks and Regards,

Palachandra M V