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 | How to make a command linker file for simple program?

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

How to make a command linker file for simple program? - hend...@yahoo.com - Jan 14 12:29:15 2008



I have a simple c program to open a .dat file then print that on the output screen. When i
build with ccs it need a command linker file and i don't know hot to make it. I'm using
TMS320VC5416.

This is the .c program
#include <stdio.h>
#include <math.h>

void main()
{
	FILE *am;
	int a=0,c;
	float b[58];
	puts("Start");
	if((am=fopen("hilbert.dat","r"))== NULL)
		printf("error");
	else
	{
	for(a=0;a<57;a++)
	{
		fscanf(am,"%f",&b[a]);
	}
	fclose(am);
	}
	for(c=0;c<a;c++)
	printf("%f\n",b[c]);

puts("END\n");
}

and this is hilbert.dat

-0.000000000000009
0
-0.048970751720575
0
-0.000000000000008
0
-0.057874524760682
0
-0.000000000000006
0
-0.070735530263059
0
-0.000000000000005
0
-0.090945681766793
0
-0.000000000000004
0
-0.127323954473513
0
-0.000000000000003
0
-0.212206590789192
0
-0.000000000000001
0
-0.636619772367581
0
0
0
0.636619772367581
0
0.000000000000001
0
0.212206590789192
0
0.000000000000003
0
0.127323954473513
0
0.000000000000004
0
0.090945681766793
0
0.000000000000005
0
0.070735530263059
0
0.000000000000006
0
0.057874524760682
0
0.000000000000008
0
0.048970751720575
0
0.000000000000009

And please correct the c program if it still wrong. Thx a lot!
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: How to make a command linker file for simple program? - Jeff Brower - Jan 14 14:30:21 2008

Hendy-

> I have a simple c program to open a .dat file then print that on the
> output screen. When i build with ccs it need a
> command linker file and i don't know hot to make it. I'm using
> TMS320VC5416.

It looks to me like you and Christian CS are doing almost the same project.  Maybe Christian
can send you his file? 
He said he got his from the ../tutorial/dsk5416/shared subfolder under the TI path.

The CCS tutorials are always a good place to start.

-Jeff

> This is the .c program
> #include <stdio.h>
> #include <math.h> void main()
> {
> 	FILE *am;
> 	int a=0,c;
> 	float b[58];
> 	puts("Start");
> 	if((am=fopen("hilbert.dat","r"))== NULL)
> 		printf("error");
> 	else
> 	{
> 	for(a=0;a<57;a++)
> 	{
> 		fscanf(am,"%f",&b[a]);
> 	}
> 	fclose(am);
> 	}
> 	for(c=0;c<a;c++)
> 	printf("%f\n",b[c]);
>
> puts("END\n");
> }
>
> and this is hilbert.dat
>
> -0.000000000000009
> 0
> -0.048970751720575
> 0
> -0.000000000000008
> 0
> -0.057874524760682
> 0
> -0.000000000000006
> 0
> -0.070735530263059
> 0
> -0.000000000000005
> 0
> -0.090945681766793
> 0
> -0.000000000000004
> 0
> -0.127323954473513
> 0
> -0.000000000000003
> 0
> -0.212206590789192
> 0
> -0.000000000000001
> 0
> -0.636619772367581
> 0
> 0
> 0
> 0.636619772367581
> 0
> 0.000000000000001
> 0
> 0.212206590789192
> 0
> 0.000000000000003
> 0
> 0.127323954473513
> 0
> 0.000000000000004
> 0
> 0.090945681766793
> 0
> 0.000000000000005
> 0
> 0.070735530263059
> 0
> 0.000000000000006
> 0
> 0.057874524760682
> 0
> 0.000000000000008
> 0
> 0.048970751720575
> 0
> 0.000000000000009
>
> And please correct the c program if it still wrong. Thx a lot!

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 )