Hi,
MCU: MSP430FR6989
IDE: Code Composer Studio 6.1.1
Compiler version: v4.4.6
I am working with the MSP430FR6989 and am using a large portion of the onboard FRAM for data storage. This ticket gives some background into how I updated the linker file in order to store data in the FRAM segment starting at address 0x10000:
MSP430FR6989, Unable to use FRAM2 with #pragma PERSISTENT
For the extended address range, I have declared a single uint8_t array (m_stepData2) as PERSISTENT and set its length so that it occupies all of the space from 0x10000 - 0x24000:
#define STEP_DATA_BUF_2_SIZE_BYTES 0x14000U #pragma PERSISTENT uint8_t SMemory::m_stepData2[STEP_DATA_BUF_2_SIZE_BYTES] = {0};
I also have a function called WriteStepData that writes to this array. When testing in my debug build with the optimization level set to 0, everything works fine and if I look in the Memory Allocation GUI I can see that m_stepData2 is taking up all of the DATA_FRAM2 segment we declared in the linker:
The problem I have now is if I change the optimization level from 0 to level 4 (Whole Program Optimizations), my calls to WriteStepData result in this warning:
I seem to have narrowed it down to changing the optimization level that generates this warning. The problem is that I need to be able to use a high level of optimization to reduce the code size to a manageable level.
Do you have any insight into how I can still use the extended address space AND still keep the optimization level 4 enabled?