Hi All, I am a new newsgroup member and I have a question that I hope has not been posted many times and the answer is in the archives. So here goes. Using the MSP430_149 I want to have an assembler interrupt vector for timer A1 linked to a 'C' vector hander for timer interrupt A0. The IAR linker complains about lack of space and I can't find a way to define a segment etc for the Assembler vector code. Can someone tell me how this is done? Simon Price Melbourne Australia
Linking C and Assembler Interrupt Vectors within the IAR environment
Started by ●April 7, 2003
Reply by ●April 8, 20032003-04-08
"Simon Price" <sprice@spri...> writes: > Hi All, > I am a new newsgroup member and I have a question that I hope has > not been posted many times and the answer is in the archives. > > So here goes. > Using the MSP430_149 I want to have an assembler interrupt vector > for timer A1 linked to a 'C' vector hander for timer interrupt A0. > > The IAR linker complains about lack of space and I can't find a way > to define a segment etc for the Assembler vector code. > > Can someone tell me how this is done? The interrupt vector itself is placed in a segment named INTVEC. The segment is of a special type named "common" that allows different modules to place objects at specific locations. Below is an example of the assembler definition of an interrupt function named "test" that is placed at vector offset 10. COMMON INTVEC:CONST:ROOT(1) ORG 10 DC16 test In general, the best way to figure out how to do things like this is to write the corresponding code in C, enable the "generate assembler list file" option, compile the file and study the assembler listing. -- Anders
Reply by ●April 9, 20032003-04-09
Thanks Anders it works just fine Simon Simon wrote... >>Using the MSP430_149 I want to have an assembler interrupt vector >> for timer A1 linked to a 'C' vector hander for timer interrupt A0. >> >> The IAR linker complains about lack of space and I can't find a way >> to define a segment etc for the Assembler vector code. Anders replied... >The interrupt vector itself is placed in a segment named INTVEC. The >segment is of a special type named "common" that allows different >modules to place objects at specific locations. >Below is an example of the assembler definition of an interrupt >function named "test" that is placed at vector offset 10. > COMMON INTVEC:CONST:ROOT(1) > ORG 10 > DC16 test >In general, the best way to figure out how to do things like this is >to write the corresponding code in C, enable the "generate assembler >list file" option, compile the file and study the assembler listing. > -- Anders