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.

Symbol __TI_int55 has already been defined

I have a file tr_port.c. I am compiling this and getting this error

Symbol __TI_int55 has already been defined
        .intvec    ".int55",    isr_compare_match


isr_compare_match is an interrupt function. i also have another function isr_counter_rollover

#pragma vector=TIMER0_A0_VECTOR
__interrupt void isr_counter_rollover(void)
{
	HALINT_ISR_ENTRY();

	/* This can also be done using the TAIV|TBIV register.
	 * However, accessing that register automatically resets the
	 * highest priority outstanding interrupt.   There may be
	 * higher priority interrupts than what this handler can
	 * support.  So since, we are only handling a subset of
	 * interrupts in this handler, it is best to not touch
	 * TAIV|TBIV.*/


	/* Update subunits and check for timer rollover */
	if (halint_update_timer_subunits()) {
		/* If timer has rolled over */
		if (halint_re_alarm_after_rollover() ) {
			OS_KERNEL_TRAP();
		}
	}


	HALINT_ISR_EXIT();
}

/** Interrupt function for a compare match */
#pragma vector=TIMER0_A0_VECTOR
__interrupt void isr_compare_match(void)
{
	HALINT_ISR_ENTRY();
	/* We are not enabling interrupts, and we have explicit
	 * knowledge of whether a context switch is required, so we
	 * don't use OS_ISR_BEGIN and OS_ISR_END. */
	halint_disable_timer_compare();

	/* Update subunits */
	halint_update_timer_subunits();

	if (  osint_alarm_reached(&hal_os_time ) )
		OS_KERNEL_TRAP();
	HALINT_ISR_EXIT();
}

I do not what is this error and what is causing this. Please guide in this regard.

  • Mohammad Hassan Shahid said:
    I do not what is this error and what is causing this. Please guide in this regard.

    The code example has two interrupt functions isr_counter_rollover() and isr_compare_match() which are both trying to use the TIMER0_A0_VECTOR. This explains why the linker reports the "Symbol __TI_int55 has already been defined" error.

    The code looks to be a port of a RTOS, and I think the isr_counter_rollover ISR needs to be changed to use TIMER0_A1_VECTOR:

    #pragma vector=TIMER0_A1_VECTOR
    __interrupt void isr_counter_rollover(void)
    

    This should stop the linker error, but based upon the information posted not sure it will work at run time.

  • Thanks it removed the error,

    But I am curious how you guessed that it is the port of a RTOS. It indeed is.