Sign in

username:

password:



Not a member?

Search c54x



Search tips

Subscribe to c54x



c54x by Keywords

5409 | 5416 | AD5 | ADC | BIOS | Boot | Booting | Bootloader | C540 | C5402 | C5409 | C5416 | CCS | Codec | DMA | Dmad | DSK | DSKPlus | Dsplib | EVM | FFT | FIR | Flash | GPIO | HPI | Initialization | Interrupt | JTAG | LOG_printf | MCBSP | RFFT | RTDX | Sampling | STLM | UART | VC540

Discussion Groups

Discussion Groups | TMS320C54x | Do the CCS support the file I/O access ?

Technical discussions about the TI C54x DSPs (including the c5401, c5402, c5402a, c5404, c5407, c5409, c5409a, c5410, c5410a, c5416, c5420, c5421, c5441, c549, c5470 and c5471).

  

Post a new Thread

Do the CCS support the file I/O access ? - daya...@yahoo.com - Mar 7 12:36:26 2008



Hi,
I just want to know, is it the CCS software don't support the file I/O access ? Because I have
a program that worked well to access a txt file using c compiler but doesn't work when I use
the CCS. Thanks.

Regards,
Dayah 
Check Out Industry's First Single-Chip, Multi-Format, Real-Time HD Video Transcoding Solution
for Commercial & Consumer End Equipment: www.ti.com/dm6467



(You need to be a member of c54x -- send a blank email to c54x-subscribe@yahoogroups.com )

Re: Do the CCS support the file I/O access ? - Jeff Brower - Mar 7 12:43:50 2008

Dayah-

> I just want to know, is it the CCS software don't support the file
> I/O access ? Because I have a program that worked well to access
> a txt file using c compiler but doesn't work when I use the CCS.

CCS supports file I/O.  You have to include the correct header files.

Files can be on the host and your DSP program can access them over JTAG emulator. 
However, CCS file I/O is very slow and you shouldn't mix that part of your DSP
program with real-time code.

-Jeff
Check Out Industry's First Single-Chip, Multi-Format, Real-Time HD Video Transcoding Solution
for Commercial & Consumer End Equipment: www.ti.com/dm6467



(You need to be a member of c54x -- send a blank email to c54x-subscribe@yahoogroups.com )

Re: Do the CCS support the file I/O access ? - Jeff Brower - Mar 7 14:00:54 2008

Dayah-
> This is the program that I run in CCS.  May I know what is the header file that I
> should include in the program ? Thanks.
>
> #include <stdio.h> int main()  {
>
> FILE *f;
> char s[1000];
>
>    f=fopen("infile","r");
>
>    if (!f) return 1;
>
>    while (fgets(s,1000,f)!=NULL) printf("%s",s);
>
>    fclose(f);
>
>    return 0;
>
> }
>
How much effort / Googling are you doing on this?  Shouldn't be hard.  I tried:

  fopen include site:ti.com

and the answer is sitting there #1 hit.

-Jeff
> Jeff Brower <j...@signalogic.com> wrote:
>
>      Dayah-
>
>      > I just want to know, is it the CCS software don't support the file
>      > I/O access ? Because I have a program that worked well to access
>      > a txt file using c compiler but doesn't work when I use the CCS.
>
>      CCS supports file I/O. You have to include the correct header files.
>
>      Files can be on the host and your DSP program can access them over JTAG
>      emulator.
>      However, CCS file I/O is very slow and you shouldn't mix that part of
>      your DSP
>      program with real-time code.
>
>      -Jeff
>



(You need to be a member of c54x -- send a blank email to c54x-subscribe@yahoogroups.com )

Re: Do the CCS support the file I/O access ? - dayah nuru - Mar 9 8:14:34 2008

Hi,
   
  This is the program that I run in CCS.  May I know what is the header file that I should
include in the program ? Thanks.

#include <stdio.h>    int main()  {      FILE *f;      char s[1000];       
f=fopen("infile","r");      if (!f)          return 1;      while
(fgets(s,1000,f)!=NULL)          printf("%s",s);      fclose(f);      return 0;  }

Regards,

Dayah  
  Jeff Brower <j...@signalogic.com> wrote:
  Dayah-

> I just want to know, is it the CCS software don't support the file
> I/O access ? Because I have a program that worked well to access
> a txt file using c compiler but doesn't work when I use the CCS.

CCS supports file I/O. You have to include the correct header files.

Files can be on the host and your DSP program can access them over JTAG emulator. 
However, CCS file I/O is very slow and you shouldn't mix that part of your DSP
program with real-time code.

-Jeff
       
Check Out Industry's First Single-Chip, Multi-Format, Real-Time HD Video Transcoding Solution
for Commercial & Consumer End Equipment: www.ti.com/dm6467



(You need to be a member of c54x -- send a blank email to c54x-subscribe@yahoogroups.com )