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.

TMS320C6678: TMS320C6678:编译错误:未解析的 Symvol intVectorTable

Part Number: TMS320C6678

错误如下

(+) TMS320C6655: 如何把中断服务程序加载到ISTP中?(不使用库函数) - 处理器论坛 - 处理器 - E2ETm 设计支持 (ti.com)

TMS320C6655: Compiling Error: Unresolved Symvol intVectorTable - 处理器论坛 - 处理器 - E2ETm 设计支持 (ti.com)

读了这两篇帖子,按照这个帖子在CCS8配置了一个工程,工程包含只main.c和intvecs.asm,按照帖子删掉了intvecs.asm中_intcVectorTable和__c_int00的第一个_符号,但是仍然报错,无法编译,请各位工程师帮忙看看

代码如下

main.c

/*
 * main.c
 */

#define C674X_NMI 1
#define C674X_GEE 2
#define C674X_XEN 3
#define C674X_INT_COUNT 16
#define NUM_SYS_EVENTS 128

extern cregister volatile unsigned int AMR;			//Addressing mode register
extern cregister volatile unsigned int CSR;			//Control status register
extern cregister volatile unsigned int GFPGFR;		//Galois field multiply control register
extern cregister volatile unsigned int ICR;			//Interrupt clear register
extern cregister volatile unsigned int IER;			//Interrupt enable register
extern cregister volatile unsigned int IFR;			//Interrupt flag register
extern cregister volatile unsigned int IRP;			//Interrupt return pointer register
extern cregister volatile unsigned int ISR;			//Interrupt set register
extern cregister volatile unsigned int ISTP;		//Interrupt service table pointer register

typedef void (*c674xISR)(void);

void Intc_Init (void);
void IntDefaultHandler (void);


/******************************************************************************
**                      EXTERNALLY DEFINED FUNCTIONS
******************************************************************************/
extern void intcVectorTable(void);


/******************************************************************************
**                      STATIC VARIABLES/FUNCTIONS
******************************************************************************/
static c674xISR c674xISRtbl[C674X_INT_COUNT];


int main(void) {
	
	Intc_Init();

//	pInterruptRegs->INTMUX1 =
	IER |= (1<<4) + (1<<1);		// set INT4 and NMIE
	CSR |= 1;				// enable GIE

	while(1)
	{
		ISR = (1<<4);	// trigger INT4
		asm(" NOP");
		asm(" NOP");
		asm(" NOP");
	}

	return 0;
}

void Intc_Init (void)
{
   unsigned int step = 0;

   /* Set ISRs to default "do-nothing" routine */
   while(step != C674X_INT_COUNT)
       c674xISRtbl[step++] = IntDefaultHandler;

   /* Set interrupt service table pointer to the vector table */
   ISTP = (unsigned int)intcVectorTable;

   /* Clear pending CPU maskable interrupts (if any) */
   ICR = 0xFFF0;

   /* Enable NMIE bit to allow CPU maskable interrupts */
   IER = (1 << C674X_NMI);
}


void Intc_IntRegister (unsigned int cpuINT, void (*userISR)(void))
{
   /* Assign the user's ISR to the CPU maskable interrupt */
   c674xISRtbl[cpuINT] = userISR;
}

/******************************************************************************
**                 INTERRUPT SERVICE ROUTINES - Used Internally
******************************************************************************/
void IntDefaultHandler (void)
{
   while(1);
}

interrupt void c674x_nmi_isr (void)
{
   c674xISRtbl[1]();
}

interrupt void c674x_rsvd_int2_isr (void)
{
   c674xISRtbl[2]();
}

interrupt void c674x_rsvd_int3_isr (void)
{
   c674xISRtbl[3]();
}

interrupt void c674x_mask_int4_isr (void)
{
   c674xISRtbl[4]();
}

interrupt void c674x_mask_int5_isr (void)
{
   c674xISRtbl[5]();
}

interrupt void c674x_mask_int6_isr (void)
{
   c674xISRtbl[6]();
}

interrupt void c674x_mask_int7_isr (void)
{
   c674xISRtbl[7]();
}

interrupt void c674x_mask_int8_isr (void)
{
   c674xISRtbl[8]();
}

interrupt void c674x_mask_int9_isr (void)
{
   c674xISRtbl[9]();
}

interrupt void c674x_mask_int10_isr (void)
{
   c674xISRtbl[10]();
}

interrupt void c674x_mask_int11_isr (void)
{
   c674xISRtbl[11]();
}

interrupt void c674x_mask_int12_isr (void)
{
   c674xISRtbl[12]();
}

interrupt void c674x_mask_int13_isr (void)
{
   c674xISRtbl[13]();
}

interrupt void c674x_mask_int14_isr (void)
{
   c674xISRtbl[14]();
}

interrupt void c674x_mask_int15_isr (void)
{
   c674xISRtbl[15]();
}

intvecs.asm

;
; File: intvecs.asm
;
; Brief: Contains interrupt vector table and fetch packets
;
; Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
; ALL RIGHTS RESERVED

;**********************************************************
;				Global Symbols
;**********************************************************
	.global intcVectorTable
	.ref _c_int00
	.global _c674x_nmi_isr
	.global _c674x_rsvd_int2_isr
	.global _c674x_rsvd_int3_isr
	.global _c674x_mask_int4_isr
	.global _c674x_mask_int5_isr
	.global _c674x_mask_int6_isr
	.global _c674x_mask_int7_isr
	.global _c674x_mask_int8_isr
	.global _c674x_mask_int9_isr
	.global _c674x_mask_int10_isr
	.global _c674x_mask_int11_isr
	.global _c674x_mask_int12_isr
	.global _c674x_mask_int13_isr
	.global _c674x_mask_int14_isr
	.global _c674x_mask_int15_isr

;**********************************************************
;				Interrupt Fetch Packet
;**********************************************************
VEC_ENTRY .macro addr
	STW B0,*--B15
	MVKL addr,B0
	MVKH addr,B0
	B B0
	LDW *B15++,B0
	NOP 2
	NOP
	NOP
	.endm

;**********************************************************
;				Interrupt Vector Table
;**********************************************************

	.align 1024
intcVectorTable:
	VEC_ENTRY _c_int00
	VEC_ENTRY _c674x_nmi_isr
	VEC_ENTRY _c674x_rsvd_int2_isr
	VEC_ENTRY _c674x_rsvd_int3_isr
	VEC_ENTRY _c674x_mask_int4_isr
	VEC_ENTRY _c674x_mask_int5_isr
	VEC_ENTRY _c674x_mask_int6_isr
	VEC_ENTRY _c674x_mask_int7_isr
	VEC_ENTRY _c674x_mask_int8_isr
	VEC_ENTRY _c674x_mask_int9_isr
	VEC_ENTRY _c674x_mask_int10_isr
	VEC_ENTRY _c674x_mask_int11_isr
	VEC_ENTRY _c674x_mask_int12_isr
	VEC_ENTRY _c674x_mask_int13_isr
	VEC_ENTRY _c674x_mask_int14_isr
	VEC_ENTRY _c674x_mask_int15_isr

 

工程配置如下