Invalid section type=VECT_INIT

What it means

This error occurs when the linker is parsing a linker command file and finds an invalid section type following a section definition. If you see below error then you might have MSP CGT 4.1.x device linker command files being used with the 4.0.x version of MSP compiler.

"lnk_msp430f5438a.cmd", line 177: error #10030-D: expecting section type (COPY, DSECT, or NOLOAD) instead of "VECT_INIT"

MSP430 compiler revision 4.1.x has a new feature for section type=VECT_INIT. For details see: [1]

Risks, Severity

This error can be avoided using below remedy. Once doing below if you instead get a warning for “no matching section” then you may need to generate an interrupt ISR. However, uninitialized ISR vectors when triggered could lead to jumping to unknown addresses, execution of erroneous code which at the very least could lead to application crashing, unexpected application behavior, or more severely memory erasure or electrical damage.

Why it is happening

The most likely scenario to generate this error is if a CCS 5.2.0 project was created and then later the compiler version choice was changed from 4.1.x back to 4.0.x. CCS 5.2.0 includes new MSP CGT 4.1.0 and the associated linker command files containing section type=VECT_INIT.

Remedy

Either replace the lnk_msp430xxxx.cmd file with an older version or edit your project’s lnk_msp430xxxx.cmd file to remove “type=VECT_INIT”. You will still get below warnings about “no matching section” due to having explicit section specifiers eg: { * ( .int14 ) }:

"lnk_msp430f5438a.cmd", line 165: warning #10068-D: no matching section

Section entries for lnk_msp430f5438a.cmd as included with MSP CGT 4.1.x:

    .int38       : {}               > INT38
    .int39       : {}               > INT39
    .int40       : {}               > INT40
    RTC          : { * ( .int41 ) } > INT41 type = VECT_INIT
    PORT2        : { * ( .int42 ) } > INT42 type = VECT_INIT
    USCI_B3      : { * ( .int43 ) } > INT43 type = VECT_INIT
    USCI_A3      : { * ( .int44 ) } > INT44 type = VECT_INIT

Version of above included in MSP CGT 4.0.x:

    .int38   : {} > INT38
    .int39   : {} > INT39
    .int40   : {} > INT40
    .int41   : {} > INT41
    .int42   : {} > INT42
    .int43   : {} > INT43
    .int44   : {} > INT44    

Code Example

Refer to our following code example for guidance on using and initializing interrupt vectors.

processors.wiki.ti.com/index.php/File:Msp430_initialize_unused_interrrupt_vectors.zip

See the rest of the code examples for all MSP430 devices here!

More Resources

Leverage the e2e (Engineer-to-Engineer) online community to get all of your MSP430 questions answered! Or, if you are an MSP430 pro user, give back to the community with your expertise.

Go to MSP430's e2e online forum! 

E2e.jpg For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article Compiler/diagnostic messages/MSP430/10030 here.