Other Parts Discussed in Thread: SYSBIOS
Hi,
I am tring to link with some libraries in neardata mode on DM8127 (C674x) IPNC RDK 3.5, and get errors almost same as http://e2e.ti.com/support/development_tools/compiler/f/343/t/129681.aspx
Here is the info.
ERROR MESSAGE
error #17003-D:
relocation from function "DSKT2_cfgInit" to symbol "DSKT2_eprogHeap"
overflowed; the 18-bit relocated address 0x2fd0a is too large to encode in
the 15-bit unsigned field (type = 'R_C6000_SBR_U15_W' (13), file =
"/ipnc_rdk/../ipnc_rdk/ipnc_mcfw/build/ipnc_rdk/obj/ti814x-evm/c6xdsp/release/MAIN_APP_c6xdsp_pe674.oe674", offset
= 0x00000008, section = ".text:DSKT2_cfgInit")
SOURCE CODE(only an empty line between definition and access)
xdc_runtime_IHeap_Handle DSKT2_daram0Heap = NULL;
xdc_runtime_IHeap_Handle DSKT2_daram1Heap = NULL;
xdc_runtime_IHeap_Handle DSKT2_daram2Heap = NULL;
xdc_runtime_IHeap_Handle DSKT2_saram0Heap = NULL;
xdc_runtime_IHeap_Handle DSKT2_saram1Heap = NULL;
xdc_runtime_IHeap_Handle DSKT2_saram2Heap = NULL;
xdc_runtime_IHeap_Handle DSKT2_iprogHeap = NULL;
xdc_runtime_IHeap_Handle DSKT2_eprogHeap = NULL;
xdc_runtime_IHeap_Handle DSKT2_esdataHeap = NULL;
xdc_runtime_IHeap_Handle _DSKT2_heap = NULL;
Void DSKT2_cfgInit()
{
DSKT2_daram0Heap = (xdc_runtime_IHeap_Handle)DSP_HEAPINT_MEM;
DSKT2_daram1Heap = (xdc_runtime_IHeap_Handle)DSP_HEAPINT_MEM;
DSKT2_daram2Heap = (xdc_runtime_IHeap_Handle)DSP_HEAPINT_MEM;
DSKT2_saram0Heap = (xdc_runtime_IHeap_Handle)DSP_HEAPEXT_MEM;
DSKT2_saram1Heap = (xdc_runtime_IHeap_Handle)DSP_HEAPEXT_MEM;
DSKT2_saram2Heap = (xdc_runtime_IHeap_Handle)DSP_HEAPEXT_MEM;
DSKT2_iprogHeap = (xdc_runtime_IHeap_Handle)DSP_HEAPEXT_MEM;
DSKT2_eprogHeap = (xdc_runtime_IHeap_Handle)DSP_HEAPEXT_MEM;
DSKT2_esdataHeap = (xdc_runtime_IHeap_Handle)DSP_HEAPEXT_MEM;
_DSKT2_heap = (xdc_runtime_IHeap_Handle)DSP_HEAPEXT_MEM;
}
LINK CMD
.bss:extMemNonCache:remoteDebugCoreShm: load >> REMOTE_DEBUG_MEM
GROUP: load > DSP_CODE_MEM
{
.bss: {*(.bss)}
.rodata: {*(.rodata)}
.neardata: {*(.neardata)}
.text:DSKT2_cfgInit:
.text:
.far: {
*(.far)
} load > DSP_CODE_MEM
MAP
run origin load origin length init length attrs members
---------- ----------- ---------- ----------- ----- -------
90000000 90000000 006bf070 00000000 rw-
90000000 90000000 00600000 00000000 rw- .systemHeap
90600000 90600000 000bf070 00000000 rw- .bss
906bf070 906bf070 0000000c 0000000c r--
906bf070 906bf070 0000000c 0000000c r-- .rodata
906bf07c 906bf07c 000006d5 000006d5 rw-
906bf07c 906bf07c 000006d5 000006d5 rw- .neardata
906bf760 906bf760 00516d00 00516d00 r-x
906bf760 906bf760 00000040 00000040 r-x .text:DSKT2_cfgInit
906bf7a0 906bf7a0 00516cc0 00516cc0 r-x .text
90bd6460 90bd6460 00313893 00000000 rw-
90bd6460 90bd6460 00313893 00000000 rw- .far
90ee9cf8 90ee9cf8 00020000 00000000 rw-
90ee9cf8 90ee9cf8 00020000 00000000 rw- .internalHeap
90f09d00 90f09d00 00006140 00006140 r-x
90f09d00 90f09d00 00003d40 00003d40 r-x .scd_core
906bf760 DSKT2_cfgInit
906bf40c DSKT2_daram0Heap
906bf410 DSKT2_daram1Heap
906bf414 DSKT2_daram2Heap
906bf418 DSKT2_saram0Heap
906bf41c DSKT2_saram1Heap
906bf420 DSKT2_saram2Heap
906bf424 DSKT2_iprogHeap
906bf428 DSKT2_eprogHeap
906bf42c DSKT2_esdataHeap
906bf430 _DSKT2_heap
ASS
.global DSKT2_eprogHeap
.sect ".neardata", RW
.align 4
.elfsym DSKT2_eprogHeap,SYM_SIZE(4)
DSKT2_eprogHeap:
.field 0,32 ; DSKT2_eprogHeap @ 0
DSKT2_cfgInit:
;** --------------------------------------------------------------------------*
;* 5206 ----------------------- DSKT2_daram0Heap = C$2 = (struct dc_runtime_IHeap___Object *)(C$1 = &ti_sysbios_heaps_HeapMem_Object__table__V)+20;
;* 5207 ----------------------- DSKT2_daram1Heap = C$2;
;* 5208 ----------------------- DSKT2_daram2Heap = C$2;
;* 5209 ----------------------- DSKT2_saram0Heap = (struct dc_runtime_IHeap___Object *)C$1;
;* 5210 ----------------------- DSKT2_saram1Heap = (struct dc_runtime_IHeap___Object *)C$1;
;* 5211 ----------------------- DSKT2_saram2Heap = (struct dc_runtime_IHeap___Object *)C$1;
;* 5212 ----------------------- DSKT2_iprogHeap = (struct dc_runtime_IHeap___Object *)C$1;
;* 5213 ----------------------- DSKT2_eprogHeap = (struct dc_runtime_IHeap___Object *)C$1;
;* 5214 ----------------------- DSKT2_esdataHeap = (struct dc_runtime_IHeap___Object *)C$1;
;* 5215 ----------------------- _DSKT2_heap = (struct dc_runtime_IHeap___Object *)C$1;
;** ----------------------- return;
MVKL .S1 ti_sysbios_heaps_HeapMem_Object__table__V,A3
MVKH .S1 ti_sysbios_heaps_HeapMem_Object__table__V,A3
STW .D2T1 A3,*+DP(DSKT2_eprogHeap) ; |5213|
STW .D2T1 A3,*+DP(DSKT2_iprogHeap) ; |5212|
STW .D2T1 A3,*+DP(DSKT2_saram2Heap) ; |5211|
STW .D2T1 A3,*+DP(DSKT2_saram1Heap) ; |5210|
$C$DW$6367 .dwtag DW_TAG_TI_branch
.dwattr $C$DW$6367, DW_AT_low_pc(0x00)
.dwattr $C$DW$6367, DW_AT_TI_return
RET .S2 B3 ; |5216|
|| STW .D2T1 A3,*+DP(DSKT2_esdataHeap) ; |5214|
STW .D2T1 A3,*+DP(DSKT2_saram0Heap) ; |5209|
ADD .D1 A3,20,A3 ; |5206|
|| STW .D2T1 A3,*+DP(_DSKT2_heap) ; |5215|
STW .D2T1 A3,*+DP(DSKT2_daram0Heap) ; |5206|
STW .D2T1 A3,*+DP(DSKT2_daram1Heap) ; |5207|
I have tried to modify mem-model to near, far, far_aggregates, and can't work.
so, someone can help me?
ps:
what's the meaning of the address 0x2fd0a(the 18-bit relocated address, how to calculate), I have changed the postion of .neardata and .text:cfgInit by link file, but the address is unchangable.
Thanks,
Frank