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.

Segment INTVEC Linker error e16

Other Parts Discussed in Thread: MSP430FG4618

Hello everyone,

I get the following linker error:

e16: Segment INTVEC (size: 0x34 align: 0x1) is too long for segment definition. Atleast 0x14 more bytes needed. The problem occurred while processing the segment placement command "-Z(CODE) INTVEC = FFE0-FFFF", where at the moment of placement the available memory ranges were "CODE:ffe0-ffff"

   Reserved ranges relevant to this placement:
      ffe0-ffff            INTVEC

 

Kindly advise me,

Krishna.

 

 

 

  • You probably have a mis-match between the device you picked for the project and the device header in your source code.

    Which MSP430 chips do you intend to use? Which one did you tell the Project to use? Which device header file did you include in your source code?

    The error msg says that according to your source code, you need at least 26 interrupt  vectors but according to the device you picked for the project, it has only 16.

  • OCY is correct. To add to his point, here is another possibility: Are you writing an assembly-only project? If so this error can be caused by an imporperly setup assembly project in IAR. Namely under the Project->Options->General Options the "Assembler-only project" box needs to be checked. 

  • hey i got a similar message too...i compiled the following code in IAR....when i download n debug it to msp430fg4618 experimenters board, it shows similar error message...whats the solution

     

    #include "msp430fg4618.h"


    void main(void)
    {
      WDTCTL = WDTPW + WDTHOLD;                   
      P1DIR = 0x01;  
      P1OUT = 0x00;
      TACCTL0 = CCIE;                                                
      TACCR0 =32767;
      TACTL = TASSEL_1+ MC_1 + TACLR;                           

      __bis_SR_register(GIE);         

    }                                                                           
    #pragma vector=TIMERA0_VECTOR
    __interrupt void Timer_A (void)
    {
      P1OUT ^= 0x01;                                                                
    }

  • Hello amj.

     

    Right click on the work space on your left. Select options. Then go to the option debugger. You'll find the drop down for 'Driver' in Setup. Select FET debugger.

     

    Hope that works,

    Krishna.

  • tried that...but it still didnt change things :(

  • In options, check other settings like:

     

    General Options -> target. Is it set to the device you intend to download to.

    FET debugger -> Setup -> Connection. Is it set to Texas Instrument USB - IF.

     

    Regards,

    Krishna.

  • yep, even that too is done....yet the same error message sayin: segment INTVEC is too long and 0xe more bytes needed

  • After changing the project settings to match the processor you have and to match the processor whose definitions you included in your source code, you need to recompile the code. The IDE won't automatically compile it since the already existing (and probably wrong) object code is newer than the date and time of your source code.

    I don't work with any IDE (I use mspgcc), so I don't know whether there is a 'clean' command available. If not, you might need to manually delete the already compiled data.

  • hey thank u all...its working....now based on my program, my port1 values should toggle right during ISR....but it remains the same...

    how do i chek whats happening during ISR?

  • amj said:
    how do i chek whats happening during ISR

    Either with the debugger (if there is no 'realtime' component involved) or , well, by toggling an LED :)

     

    Your program looks good except one thing: your main thread exits immediately after setting GIE, and so the program ends. It is undefined (and may be different from compiler to compiler) what happens then (as there is no OS to which control can be turned back). Some compilers just add code to clear GIE and enter LPM.

    You should keep your main thread running by adding a while(1); at the end.

**Attention** This is a public forum