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.

MSP430FR6043: Persistent attribute causes the code size to increase dramatically

Part Number: MSP430FR6043


Hi

When I try to make a variable persistent the code size increase by roughly 1000 bytes. 

Before the FRAM has 832 bytes free and after it is 294 bytes that were unable to be allocated.

The variable I try to make persistent shows up in the Memmory Allocation view and has a size of 26 bytes.

Anyone out there who have experienced something similar?

Best regards

Peter

  • How often is this variable referenced? When in RAM, 16 bit addresses are sufficient but with the persistent attribute upper FRAM is an option which could result in the use of 20 bit addresses. I can't see that adding 1K but if it forced a large data model effecting all data accesses, it could.

  • A Persistent variable does take up FRAM, in section  TI.persistent, alongside .text. The linker appears to align/extend this segment (and some others) to a 1K MPU boundary (watch how .cinit moves in the .map file)

    Ordinarily I would suggest putting your variable in one of the .infoX segments, but I don't see any of these in the FR6043..

**Attention** This is a public forum