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.

TMS320VC5416

Other Parts Discussed in Thread: TMS320VC5416, CCSTUDIO

hi

m using TMS320VC5416 DSK simulator for this m using ccstudio_v3.1.For circular convolution program it wont asking user to enter the sequence . i pasted that program below....

 #include<stdio.h>
 #include<math.h>
 int m,n,x[30],h[30],y[30],i,j,temp[30],k,x2[30],a[30];
 void main()
 {
   printf("  enter the length of the first sequence\n");
   scanf("%d",&m);
   printf("  enter the length of the second sequence\n");
   scanf("%d",&n);
   printf("  enter the first sequence\n");
   for(i=0;i<m;i++)
   scanf("%d",&x[i]);
   printf("  enter the second sequence\n");
   for(j=0;j<n;j++)
   scanf("%d",&h[j]);
   if(m-n!=0)   /*If length of both sequences are not equal*/
   {
 if(m>n)   /* Pad the smaller sequence with zero*/
 {
 for(i=n;i<m;i++)
 h[i]=0;
 n=m;
 }
 for(i=m;i<n;i++)
 x[i]=0;
 m=n;
   }
   y[0]=0;
   a[0]=h[0];
   for(j=1;j<n;j++)     /*folding h(n) to h(-n)*/
   a[j]=h[n-j];
     /*Circular convolution*/
  for(i=0;i<n;i++)
   y[0]+=x[i]*a[i];
  for(k=1;k<n;k++)
  {
   y[k]=0;
   /*circular shift*/
   for(j=1;j<n;j++)
   x2[j]=a[j-1];
   x2[0]=a[n-1];
   for(i=0;i<n;i++)
    {
 a[i]=x2[i];
 y[k]+=x[i]*x2[i];
    }
 }
  /*displaying the result*/
  printf("  the circular convolution is\n");
  for(i=0;i<n;i++)
  printf("%d \t",y[i]);

  }


as program it should ask user to enter the sequnce length and value but wen we run the program it wont ask to enter the value to user ,,,,

please help me out

 

  • Hi,

    I ran your code and see the same thing happened. It skipped printf and scanf. BTW, can you share your linker file?

    Regards,

    Hyun

  • thank you for your response

    m adding rts_ext.lib library file

    path   C:\ccstudio_v3.1\c5400\cgtools\lib\rts_ext

    linker command file is hello.cmd

    path   C:\ccstudio_v3.1\tutorial\sim54xx\hello1\hello

     

     

    plase help ....

  • Hi,

       not sure if u are still facing the same problem...?but i tryed with ur posted code and got it RESOLVED !! at my end by including the proper linker command file in project and also  it had worked without any vector.asm file....so please make sure that the following sections are mapped correctly.....ie...cmd file should look some thing like this......

        .vectors: {} > VECT PAGE 0
        .sysregs: {} > BIOSREGS PAGE 1
        .trcinit: {} > EPROG PAGE 0
        .gblinit: {} > EPROG PAGE 0
         frt:     {} > EPROG PAGE 0
        .text:    {} > EPROG PAGE 0
        .cinit:   {} > EPROG PAGE 0
        .pinit:   {} > EPROG PAGE 0
        .sysinit: {} > EPROG PAGE 0
        .bss:     {} > IDATA PAGE 1
        .far:     {} > IDATA PAGE 1
        .const:   {} > IDATA PAGE 1
        .switch:  {} > IDATA PAGE 1
        .sysmem:  {} > IDATA PAGE 1
        .cio:     {} > IDATA PAGE 1
        .MEM$obj: {} > IDATA PAGE 1
        .sysheap: {} > IDATA PAGE 1
        .stack:   {} > IDATA PAGE 1

     

    Regards,

    Ganesh

  • MEMORY
    {
        PAGE 0: EPROG:      origin = 0x1400,        len = 0x7c00
                VECT:       origin = 0xff80,        len = 0x80

        PAGE 1: USERREGS:   origin = 0x60,          len = 0x1c
                BIOSREGS:   origin = 0x7c,          len = 0x4
                IDATA:      origin = 0x80,          len = 0x1380
                EDATA:      origin = 0x1400,        len = 0x8000
                EDATA1:     origin = 0x9400,        len = 0x4c00
    }

    SECTIONS
    {
        .vectors: {} > VECT PAGE 0
        .sysregs: {} > BIOSREGS PAGE 1
        .trcinit: {} > EPROG PAGE 0
        .gblinit: {} > EPROG PAGE 0
         frt:     {} > EPROG PAGE 0
        .text:    {} > EPROG PAGE 0
        .cinit:   {} > EPROG PAGE 0
        .pinit:   {} > EPROG PAGE 0
        .sysinit: {} > EPROG PAGE 0
        .bss:     {} > IDATA PAGE 1
        .far:     {} > IDATA PAGE 1
        .const:   {} > IDATA PAGE 1
        .switch:  {} > IDATA PAGE 1
        .sysmem:  {} > IDATA PAGE 1
        .cio:     {} > IDATA PAGE 1
        .MEM$obj: {} > IDATA PAGE 1
        .sysheap: {} > IDATA PAGE 1
        .stack:   {} > IDATA PAGE 1
    }
    this is linker commond file m using then also m getting same problem .... please help me out...

  • can i use same library and linker cmd file in CCS v5.5 for simple loopback