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).
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
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
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
>
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