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.

MSP430FR5969: Using FRAM above 0x10000 with MSPGCC 4.6.3

Part Number: MSP430FR5969
Other Parts Discussed in Thread: ENERGIA

We are using the MSP430FR5969 in a sensor product, and we now need to utilize upper block of FRAM at 0x10000 because our program size has increased beyond the 48k in lower FRAM. 

One solution is to locate 2 large intialized data arrays at 0x10000.   I have modifed the linker command file (from Energia) to do this:

  .upper.rodata :
  {
     . = ALIGN(2);
    KEEP(*(.upper.rodata))
     . = ALIGN(2);
    KEEP(*(.upper.rodata.*))
  }  > far_rom 

The far_rom section is located at 0x01000 in the command file, and I have declared the initialized arrays as follows:

const unsigned char  __attribute__((section(".upper.rodata"))) Program_Data_IC_1[4096} = {  <byte values here>  }

I have removed all references to this array in the code (hence the KEEP keyword), as I will be using a pointer initialized to 0x010000 to read the values.   I am building this project in CCS 6.1.3 by importing this Energia 17 project (and then modifying the linker command file).   However, the project fails to build with the following error:

makefile:164: recipe for target 'Auto_optimize_R16_expt.out' failed
./sigma_SPI.o:(.debug_info+0x90c): relocation truncated to fit: R_MSP430_16_BYTE against symbol `Program_Data_IC_1' defined in .upperFram section in ./sigma_SPI.o

All I really need is to produce a loadable file with the array mapped to upper FRAM.   I've tried a few things such as introducing the -mlarge build option, and the "far" keyword, but these produce build errors because they are not supported in MSPGCC 4.6.3.     So it appears that the Energia 17 build tools will not allow for any location of data above the 64k boundary?   

Is it feasible to build an object module using other build tools that allow location above 64k and linking that with the Energia-built main program, object modules and libraries?  (All I really need is a loadable hex file that has the initialized array in upper FRAM)  Is there any solution or workaround to this, short of switching to new build tools?  

Thanks in advance, 
John

**Attention** This is a public forum