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.
Tool/software: TI C/C++ Compiler
MSP430 Team,
Interrupt vectors get linked in the CCS generated linker .cmd file. For populated vectors, the .cmd file uses a construct like this for example:
ECOMP0 : { * ( .int45 ) } > INT45 type = VECT_INIT
But for unpopulated (not implemented from a peripheral) vectors for a particular device, it uses a construct like this:
.int44 : {} > INT44
I'm wondering why the difference. In other words, why isn't the ECOMP0 vector linked like this:
.int45 : {} > INT45
I understand what the type=VECT_INIT does, so I'm ignoring that above.
Thank you,
David
Hey David,
This is just a naming convention to more clearly connect a linker warning to a specific interrupt vector, you can rename it or restore it to the default assignment if desired. What is the reason to defines the "type = VECT_INIT" in linker command file ? - MSP low-power microcontroller...
Regards,
Ryan
Hi Ryan,
Thank you for your response. There seems to be some functional difference between the two linkages I showed however. I have a test program that, for example, has ECOMP0 vector populated with an ISR (using #pragma vector = ECOMP0_VECTOR, followed by the ISR). If I leave the original linkage:
ECOMP0 : { * ( .int45 ) } > INT45 type = VECT_INIT
The vector gets populated where specified (i.e., INT45 memory).
However, if I use this linkage:
.int45 : {} > INT45 type = VECT_INIT
The vector does not show up. INT45 memory is unused in the .map file.
- David
There is no such difference in the gcc linker scripts.
Does "#pragma vector = 44" actually work for you?
Clemens Ladisch said:There is no such difference in the gcc linker scripts.
Does "#pragma vector = 44" actually work for you?
Hey David,
You are correct and I was mistaken, a name of some kind must be provided and point to the interrupt vector number. I will loop in a Tools team member to explain why this must occur. What is the reason behind this request, if I might ask?
Regards,
Ryan
Ryan,
Yeah, the tools are doing something that I cannot quite decipher. Hopefully the tools guy can explain.
What I am really trying to do is selectively exclude certain (unused) interrupt vectors from being populated. If I do nothing, the compiler pulls in an ISR from the RTS library. I don't want that (I won't get into why, other than to say I have two non-overlapping programs in memory using the vector table). I found if I comment out the linkage:
/* ECOMP0 : { * ( .int45 ) } > INT45 type = VECT_INIT */
It does what I want, but then I am surprised that I don't get a warning about not having the section specified for linking (I have -w checked, so I expect the linker to complain that it found a section that is not specified for allocation). This happens (the no warning) even if I myself specify the ISR in my code using the vector pragma.
- David
**Attention** This is a public forum