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.

MSP430FR5964: Issues with code an higher memory segments (>0xffff)

Part Number: MSP430FR5964
Other Parts Discussed in Thread: MSP430F149,

I am in the process of migrating my code from a old MSP430F149 to a new MSP430FR5964. As this newer processor has more IO and more RAM, there is less space for code in the first memory 'segment' (0000-FFFF). So far I managed to mitigate this with placing the code (.text) in the first 'segment' (FRAM) and constants (.const) in the second 'segment' (0x10000-0x1FFFF) (FRAM2).

And then the code didn't fit anymore in the first segment, so I thought easy: I place the constants in FRAM and the code in FRAM2. And then my program stopped working.

So I tried another approach to try to isolate and understand the problem with a GROUP linker directive, something like :

    GROUP 0x10000:
    {
        .framework
        {
        	"Constants.obj"(.text)
        	"TActor.obj"(.text)
            ...
        }
    }

This works for some modules, and not for others.

I have been able to identify a case, where a call to an object method works twice and the third time it seems to jump to address 0xFFFFF. This processor restarts with (seemingly) a VMA interrupt flag. This is not yet so clear what exactly is happening...

My understanding is that code is location independent, at least that's documented in the (TI) compiler documentation. Of course I took care of having the ISRs in the first memory segment.

Is there some guidance out there for migrating code from lower memory segments to higher ones ? Isn't this fool-proof ? Are there any compiler settings (other than code (large) and data (restricted) memory models) that should be taken care of ? Any help is appreciated...