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.

MSP430F5659: Facing an issue with Constant Memory Size. How to increase it. Does it required Linker change or any IAR settings ?

Part Number: MSP430F5659

Hi Team,

We are working on MSP430F5659 with IAR IDE.

As a product requirement, we have a LCD and some constant data is using to display data on LCD.

When we added few new menus, we are getting compiler error.

When look in to the MAP file, observed that it is occupying more than 31K constant data. If future as per need we may add few more screens and this data may be increased.

What we have understood is that, CODE16 memory range is from 8000 – FF7F, as it is increasing this size it is giving compiler error.

Does it required change in Linker File / Settings  to support more constant data without effecting others.

Activities we have done before reaching you

1. Modified the Linker Page data 

// Constant Data

-Z(CONST)DATA16_C,DATA16_ID,TLS16_ID,DIFUNCT,CHECKSUM=8000-FF7F

to

-Z(CONST)DATA16_C,DATA16_ID,TLS16_ID,DIFUNCT,CHECKSUM=8000-FF7F,10040-87FFF

and

// Code 

-Z(CODE)CSTART,ISR_CODE,CODE16=8000-FF7F

to 

-Z(CODE)CSTART,ISR_CODE,CODE16=8000-FF7F,10040-87FFF

2. Changed the Data Model from "Small" to " Med/ High" in IAR settings - General Options - Target.

With second option, we could able to compile the code but its not working.

Please help us.

Thanks,

Krishna

  • Hello Krishna,

    You'll need to switch the memory model to "Large" so the linker can use the full memory address. You may also need to go back to the default Linker file so IAr cna link things appropriately.
  • Hi Jace,

    We changed Data Model from small to large as you suggested (refer attached SystemModel1.jpeg) and also used default linker file. We are able to compile and decode the code on target board but system performance is not up to the mark compared to Data Model small.

    What are the precautions we have to take to improve system performance?

    Please let me know.

    Thanks,

    Krishna

  • Hello Kishna,

    What kind of performance issues are you referring to?
  • Hi Jace,

    We are implemented some tasks on LCD and observation shared below please refer DataModel_Large.mp4, DataModel_Small.mp4.

    Thanks,

    krishna

  • Hello Krishna,

    Using the upper portions of memory do make for extra cycles to handle the extended memory addressing. (Up to 2-4 extra cycles per instruction depending on the instruction.) Try upping the optimization settings in the IDE towards more speed optimization. In addition you could increase your MCLK speed. Beyond that, you would need to make some optimizations within your code for faster access to what you want to display.

**Attention** This is a public forum