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.

Time Interrupt problem on C6748:error #10234-D: unresolved symbols remain

I have a interrupt build error for my first interrupt pragramm on TMS C320 C6748, I want to debug successfully a simple Timer Interrupt.But got the unresolved symbols remain. I think the problem maybe occur on the .asm file. Could you please help make a check for it ? Follow is my detail source code. Thanks!

/*interrupt*/
extern cregister volatile unsigned int AMR;     /* Address Mode Register      */
extern cregister volatile unsigned int CSR;     /* Control Status Register    */
extern cregister volatile unsigned int IFR;     /* Interrupt Flag Register    */
extern cregister volatile unsigned int ISR;     /* Interrupt Set Register     */
extern cregister volatile unsigned int ICR;     /* Interrupt Clear Register   */
extern cregister volatile unsigned int IER;     /* Interrupt Enable Register  */
extern cregister volatile unsigned int ISTP;    /* Interrupt Service Tbl Ptr  */
extern cregister volatile unsigned int IRP;     /* Interrupt Return Pointer   */
extern cregister volatile unsigned int NRP;     /* Non-maskable Int Return Ptr*/
extern cregister volatile unsigned int IN;      /* General Purpose Input Reg  */
extern cregister volatile unsigned int OUT;     /* General Purpose Output Reg */

#define INTMUX1 0x01800104
#define INTMUX2 0x01800108
#define INTMUX3 0x0180010C

#define CTL1 0x01C20020     //Timer1 control register
#define PRD1 0x01C20018     //Timer1 period register
#define CNT1 0x01C20010     //Timer1 counter register

/*interrupt*/

void Interrupt_Init(void)
{
  ICR = 0x00000400;
  *( volatile unsigned int* )INTMUX1=0x7fff7fe2;//DSP中断10分配给Timer中断
  *( volatile unsigned int* )CTL1= 0x00000201;  //计数器功能设置
  *( volatile unsigned int* )PRD1= 0x1000;      //计数器周期值
}

int counter = 0;//记录中断次数

interrupt void xint0_isr(void)
{
   counter++;
}

void Interrupt_Start(void)
{
  IER |= 0x00000402;   // IE10=1
  CSR |= 0x00000001;   // 全局中断使能
  *( volatile unsigned int* )CTL1|= 0x000000C0;  //计数器清零,启动
}

void main(void)
{

     Interrupt_Init();
     Interrupt_Start();
     while(1)
     {
        ;
     }

}

vector.asm file

   .ref     _c_int00
   .ref     _xint0_isr   ; timer 1 interrupt handler
   .sect    ".vectors"
RESET_RST: mvkl .S2 _c_int00, B0
       mvkh .S2 _c_int00, B0
       B    .S2 B0
       NOP
       NOP
       NOP
       NOP
       NOP
NMI_RST: .loop 8
       NOP
      .endloop
RESV1: .loop 8
       NOP
       .endloop
RESV2: .loop 8
       NOP
       .endloop
INT4: .loop 8
      NOP
      .endloop
INT5: .loop 8
      NOP
      .endloop
INT6: .loop 8
      NOP
      .endloop
INT7: .loop 8
      NOP
      .endloop
INT8: .loop 8
      NOP
      .endloop
INT9: .loop 8
      NOP
      .endloop
INT10: B _xint0_isr
       .loop 7
       NOP
       .endloop
INT11: .loop 8
      NOP
      .endloop
INT12: .loop 8
      NOP
      .endloop
INT13: .loop 8
      NOP
      .endloop
INT14: .loop 8
      NOP
      .endloop
INT15: .loop 8
      NOP
      .endloop

Build result:

error #10234-D: unresolved symbols remain
warning #10281-D: Section ".neardata" requires a STATIC_BASE relative relocation, but is located at 0xc00142d0, which is probably out of range of the STATIC_BASE. STATIC_BASE is located at 0xc00071e8. Might be required to correct   placement of ".neardata" so it lies within 0x8000 of the STATIC_BASE.
error #10010: errors encountered during linking; 

  • Regarding ...

    user1648837 said:
    warning #10281-D: Section ".neardata" requires a STATIC_BASE relative relocation, but is located at 0xc00142d0, which is probably out of range of the STATIC_BASE. STATIC_BASE is located at 0xc00071e8. Might be required to correct   placement of ".neardata" so it lies within 0x8000 of the STATIC_BASE.

    Your linker command file needs lines like this in it ...

     GROUP
        {
                .neardata   /* Move .bss after .neardata and .rodata.  ELF allows */
                .rodata     /* uninitialized data to follow initialized data in a */
                .bss        /* single segment. This order facilitates a single    */
                            /* segment for the near DP sections.                  */
        }>BMEM
    

    These sections are accessed at an offset from the DP register (which is B14).  So they all need to be GROUP'd together.  

    Regarding ...

    user1648837 said:
    error #10234-D: unresolved symbols remain

    That's probably something completely different.  I don't see enough here to comment.

    Thanks and regards,

    -George

  • Hello George,

          Thank you very much for your help. I'm sorry for reply so late. I have study the DSP interrupt by some other Demo and have a good understand for it now. It works well also. Thanks again!


    BRs,

    Shuanghong