Forums

Reclaim MSP430F5438A unused interrupt vector locations in IAR tools

Started by dynamo 3 months ago1 replylatest reply 3 months ago53 views
The MSP430F5438A defines the addresses for its interrupt vectors from 0xFF80-0xFFFF, but only the addresses from 0xFFD2-0xFFFF are used. The MSP430F5438A manual says that the unused locations "can be used for regular program code if necessary". I'm using the IAR tools and get a linker error when I locate a variable in the unused space (for example address 0xFFB0). The error is the following.

Error[e16]: Segment INTVEC (size: 0x78 align: 0x1) is too long for segment definition. At least 0x38 more bytes needed. The problem occurred while processing the segment placement command "-Z(CODE)INTVEC=FF80-FFFF", where at the moment of placement the available memory ranges were "CODE:ff80-ffaf,CODE:ffbf-ffff"
Reserved ranges relevant to this placement:
ff80-ffaf INTVEC
ffb0-ffbe DATA16_AC
ffbf-ffff INTVEC

It seems that the IAR tools define the starting location of the interrupt vector table to 0xFF80 and then reference all the interrupt vectors from this base address. Does anyone know how to get around this issue to reclaim the addresses? Where does IAR define the base address for the interrupt vector table? I'm not able to locate it. The reason we'd like to do this is to maintain compatibility with another product.

Thanks,
NM
[ - ]
Reply by kabelltexJune 8, 2021

First crude guess, you have declared INTVEC twice with two different ranges.  It isn't clear if "INTVEC" is tied to a fixed size representing the entire interrupt vector range.  I suggest you contact IAR support even if you have to pay a few (when I was working we paid the early support fee to keep free tech support active) and get there input as to how to redirect vector space to code space.  You might be able to declare some address variable(s) and assign them the vector addresses you wish to exploit and move datum into those locations using you address variable(s).  If the space is not really used for interrupt vectors this may work if there aren't compiler or other IAR operational considerations that would corrupt your datum.  That's why I suggest getting IAR help.

Regards, Keith Abell