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.

Interrupt Vectors changed in mixed C/ASM Project?

Other Parts Discussed in Thread: MSP430F449

Hi again,

i have a mixed c/asm project and got the error "placement fails for ibject ".int03" , "int05" and ".reset"
Thanks to Aarti i now know that i have to change the length and origin in the Linker Command File to solve the problem (every vector changed its length from 2 to 4 byte).

Well, i have no errors anymore, but the c code doesnt work correctly now.

I am using a changed code from example "fet440_uart01_09600.c" (added a timer interrupt function to let my LED blink and changed to UART1). The main program initializes UART1, the LED on Port 6, TIMERA and puts a welcome message via UART to the windows hyperterminal. Every second normaly the timer interrupt routine should toggle the LED.

Without the asm-code and without changing the interrupt vectors in the Linker Command File everything works fine.
But after changing the .cmd file (still without the asm code), the timerA interrupt seems to fail...not to mention what happens if im sending characters to the msp430 via hyperterminal...

I tried to change the interrupt vector definitions at the end of the msp430x44x.h Header file from
#define BASICTIMER_VECTOR       (0 * 1u)                    /* 0xFFE0 Basic Timer */
to
#define BASICTIMER_ISR(func)    ISR_VECTOR(func, ".int00")  /* 0xFFE0 Basic Timer */ /* CCE V2 Style */
and so on ...

It works too, but nothing changed.

Edit:
um, i was just debugging the code step by step and after the main procedure the little blue arrow in the disassembly window disappeared after 1 second...i would say the timera interrupt vector jumped to nowhere but i dont know where the failure is!?

I only changed the vectors in the linker command file, because i want to use the asm file, and i changed the vector definitions at the end of the msp430f449 header file, and even if not changed, the blue arrow (PC?) disappears... [^o)]

  • Are you still having issues?

    I would not suggest adjusting the size of the vectors.  In the actual MSP430 device, each vector is 2 bytes which is essentially the address of the interrupt service routine that gets loaded into the Program Counter of the MSP430.

  • Sorry, i forgot this post.

    You are right, that was stupid.

    I created a second list ok vectors in the linker command file (like int100, int101, ... , reset1) and changed the assembler code to use the new list.
    Now the TIMERA, USART and RESET vector are working correctly for each code (c AND asm).

    The thread can be closed, thank you!

**Attention** This is a public forum