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.

Compiler/TMS320C6674: RTFS File Descriptors > 17 open at a time?

Part Number: TMS320C6674
Other Parts Discussed in Thread: 66AK2G02

Tool/software: TI C/C++ Compiler

Hi,

      I am using ccs v7.4. I am aware that RTFS cannot open more than 17 files but I need to open 32 files in my code. How can I overcome this hurdle ?

      I am using   ti-cgt-c6000-8.1.0 compiler,     xdctools_3_32_00_06 and    bios_6_45_01_29. 

With Regards

  • What version of Processor SDK are you using with C6674 DSPs? We only support FATFS with TI RTOS in Processor SDK RTOS so I am not aware of the RTFS offering that you are referring to in your post. Can you please indicate what example and RTFA filesystem library .

    If this is a open source offering or a third party offering then we are not in a position to support that component in the device forums.

    Regards,
    Rahul
  • Hi,
    I am using 66AK2G02 board and rts6600_elf.lib.

    With Regards
  • Hi,
    I am using 66AK2G02 board and rts6600_elf.lib.

    With Regards
  • The detail that I am missing and confused with is the term RTFS. the term in RTOS environment refers to a type of file system and I am trying to understand if this is implemented on the target using SD/MMC or USB or any other mass storgae or if you are referring to File IO operations over JTAG emulator from your host machine using RTS library from TI Compiler.

    Please provide this clarification so we can respond accordingly.

    Regards,

    Rahul

  • Hi,

         Its file I/O operations over JTAG emulator from my PC using RTS library from TI compiler.

    With Regards

  • butterfly said:
     Its file I/O operations over JTAG emulator from my PC using RTS library from TI compiler.

    As per section 9.1.6 Allowable Number of Open Files in the C6000 C/C++ Optimizing Compiler v8.x User's Guide you need to increase the value of the  _NFILE macro and re-compile the run time library.

    Since the value of  _NFILE includes the three predefined streams stdin, stdout, stderr for your case you need to set _NFILE to >= 35.

  • Hi,
    I changed the value of _NFILE to 35 in stdio.h and rebuilt the rts6600_elf.lib but I am still not able to open more than 17 files...
    Do I have i have change _NFILE 's value in other packages and rebuilt it again? If so how do I rebuild it? I came across _NFILE in xdctools_3_32_00_06_core as well.


    With Regards
  • butterfly said:
    I changed the value of _NFILE to 35 in stdio.h and rebuilt the rts6600_elf.lib but I am still not able to open more than 17 files...

    I did the same, testing a bare-metal C66 program using C6000 compiler v8.2.4 and had the same problem in that couldn't open more than 17 files.

    butterfly said:
    Do I have i have change _NFILE 's value in other packages and rebuilt it again?

    When I single stepped into the fopen() call in the debugger to investigate the problem found that there is also the _NSTREAM constant in lib/src/file.h which also needs to be increased from 20 to 35.

    With both _NFILE in lib/src/stdio.h and _NSTREAM in lib/src/file.h increased to 35 was then able to open 32 files after rebuilding rts6600_elf.lib.

    butterfly said:
    I came across _NFILE in xdctools_3_32_00_06_core as well.

    I need to check if SYS/BIOS uses an alternative run time library.

  • butterfly said:
    Do I have i have change _NFILE 's value in other packages and rebuilt it again? If so how do I rebuild it? I came across _NFILE in xdctools_3_32_00_06_core as well.

    I created a C66 program which used compiler v8.2.4 with SYS/BIOS 6.45.01.29 and XDCtools 3.32.00.06 core.

    With the compiler RTS rts6600_elf.lib rebuilt as per the previous post with _NFILE and _NSTREAM set to 35 the SYS/BIOS program was able to use fopen to create 32 files. The linker map file showed that fopen() was being linked from rts6600_elf.lib.

    Searching XDCtools 3.32.00.06 core I can't see _NFILE.

  • Hi Chester,

                  I changed the value of _NSTREAM to 35 as well and now I am able to open 32 files. 

    Yeah, there is no _NFILE in XDCtools, my bad , I  saw it in compiler version 8.1.3..

    Thank You

    With regards