Tool/software: Code Composer Studio
CCS Version: 7.0.0.00043running on Win10
I have a data section created in the linker command file as:
PARAM_DATA10 : origin = 0x26E00, length = 0x0200
the sections portion of the linker cmd file:
SECTIONS
{
.bss : {} > RAM /* Global & static vars */
.data : {} > RAM /* Global & static vars */
.TI.noinit : {} > RAM /* For #pragma noinit */
.sysmem : {} > RAM /* Dynamic memory allocation area */
.stack : {} > RAM (HIGH) /* Software system stack */
#ifndef __LARGE_DATA_MODEL__
.text : {} > FLASH /* Code */
#else
.text : {} >> FLASH2 | FLASH /* Code */
#endif
.text:_isr : {} > FLASH /* ISR Code space */
.cinit : {} > FLASH /* Initialization tables */
#ifndef __LARGE_DATA_MODEL__
.const : {} > FLASH /* Constant data */
#else
.const : {} >> FLASH | FLASH2 /* Constant data */
#endif
.cio : {} > RAM /* C I/O Buffer */
.pinit : {} > FLASH /* C++ Constructor tables */
.binit : {} > FLASH /* Boot-time Initialization tables */
.init_array : {} > FLASH /* C++ Constructor tables */
.mspabi.exidx : {} > FLASH /* C++ Constructor tables */
.mspabi.extab : {} > FLASH /* C++ Constructor tables */
#ifdef __TI_COMPILER_VERSION__
#if __TI_COMPILER_VERSION__ >= 15009000
#ifndef __LARGE_DATA_MODEL__
.TI.ramfunc : {} load=FLASH, run=RAM, table(BINIT)
#else
.TI.ramfunc : {} load=FLASH | FLASH2, run=RAM, table(BINIT)
#endif
#endif
#endif
.infoA : {} > INFOA /* MSP430 INFO FLASH Memory segments */
.infoB : {} > INFOB
.infoC : {} > INFOC
.infoD : {} > INFOD
.param_data1 : {} > PARAM_DATA1
.param_data2 : {} > PARAM_DATA2
.param_data3 : {} > PARAM_DATA3
.param_data4 : {} > PARAM_DATA4
.param_data5 : {} > PARAM_DATA5
.param_data6 : {} > PARAM_DATA6
.param_data7 : {} > PARAM_DATA7
.param_data8 : {} > PARAM_DATA8
.param_data9 : {} > PARAM_DATA9
.param_data10 : {} > PARAM_DATA10
.param_data11 : {} > PARAM_DATA11
.param_data12 : {} > PARAM_DATA12
.param_data13 : {} > PARAM_DATA13
.param_data14 : {} > PARAM_DATA14
.param_data15 : {} > PARAM_DATA15
.param_data16 : {} > PARAM_DATA16
.param_data20 : {} > PARAM_DATA20
.param_data21 : {} > PARAM_DATA21
The declaration of the variable to access the data section is:
#pragma DATA_SECTION(VarName, ".param_data10")
T_typeName VarName;
When I try to pass an element (char) from the structure to an IO port (using all 8 bits) the compiler gives the warning
Description Resource Path Location Type
<a href="processors.wiki.ti.com/.../17003"> relocation from function "FunctionName" to symbol "VarName" overflowed; the 18-bit relocated address 0x26e00 is too large to encode in the 16-bit field (type = 'R_MSP430X_ABS16' (15), file = "./main.obj", offset = 0x0000003e, section = ".text:FunctionName") FileName.h /ProjectName line 387 C/C++ Problem
(Yes I have changed some of the names to protect the innocent)
I have also tried to use a local temp variable to receive the value from the structure and then put it out the IO Port but then the error moved to the line with the temp variable.
I have specified in the Project to use large code and large data model. Along with this warning is the warning:
Description Resource Path Location Type
#10015-D output file "ProjectName.out" cannot be loaded and run on a target system ProjectName C/C++ Problem
which to me is a little more than a warning!
The code compiled and ran fine from IAR
Any ideas?