Part Number: AM3358
Other Parts Discussed in Thread: SYSBIOS
Tool/software: TI C/C++ Compiler
Hi,
I've ported a program from GCC to the TI compiler and have been unable to set _c_int00 to address 0x80000000. How is this done?
I've consulted all the manuals for the compiler, for XDC, searched the forums and the FAQ here:
processors.wiki.ti.com/.../Accessing_c_int00
On GCC the address was set in the *.CFG with the following code:
Program.sectMap[".c_int00"] = new Program.SectionSpec();
Program.sectMap[".c_int00"].loadAddress = 0x80000000;
Program.sectMap[".c_int00"].runAddress = 0x80000000;
Under the TI compiler, it adds a line to the linker script:
.c_int00: load > 0x80000000, run > 0x80000000
The end result is the same though - the linker assigns the wrong address as shown below in this fragment of the map file:
ENTRY POINT SYMBOL: "_c_int00" address: 8518c020
I would greatly appreciate any suggestions as to how to resolve this issue.
The tools I am using are:
CCS 6.1.1.00022
TI Compiler v5.2.5
XDC Tools 3.31.0.24_core
SYS/BIOS 6.42.3.35
CPU is AM335x
I've attached a copy of the linker script and map file.
/*
* Do not modify this file; it is automatically generated from the template
* linkcmd.xdt in the ti.targets.elf package and will be overwritten.
*/
/*
* put '"'s around paths because, without this, the linker
* considers '-' as minus operator, not a file name character.
*/
-l"C:\Users\astevenson\TIWorkspace\xDEV\Debug\configPkg\package\cfg\bigtime_pea8f.oea8f"
-l"C:\Users\astevenson\TIWorkspace\xDEV\src\sysbios\sysbios.aea8f"
-l"C:\ti\bios_6_42_03_35\packages\ti\targets\arm\rtsarm\lib\ti.targets.arm.rtsarm.aea8f"
-l"C:\ti\bios_6_42_03_35\packages\ti\targets\arm\rtsarm\lib\boot.aea8f"
-l"C:\ti\bios_6_42_03_35\packages\ti\targets\arm\rtsarm\lib\auto_init.aea8f"
--retain="*(xdc.meta)"
/* C6x Elf symbols */
--symbol_map __TI_STACK_SIZE=__STACK_SIZE
--symbol_map __TI_STACK_BASE=__stack
--symbol_map _stack=__stack
--args 0x0
-heap 0x0
-stack 0x100000
MEMORY
{
SRAM_LO (RWX) : org = 0x402f0000, len = 0x400
SRAM_HI (RWX) : org = 0x402f0400, len = 0xfc00
OCMC_SRAM (RWX) : org = 0x40300000, len = 0x10000
DDR3 (RWX) : org = 0x80000000, len = 0x40000000
}
/*
* Linker command file contributions from all loaded packages:
*/
/* Content from xdc.services.global (null): */
/* Content from xdc (null): */
/* Content from xdc.corevers (null): */
/* Content from xdc.shelf (null): */
/* Content from xdc.services.spec (null): */
/* Content from xdc.services.intern.xsr (null): */
/* Content from xdc.services.intern.gen (null): */
/* Content from xdc.services.intern.cmd (null): */
/* Content from xdc.bld (null): */
/* Content from ti.targets (null): */
/* Content from ti.targets.arm.elf (null): */
/* Content from xdc.rov (null): */
/* Content from xdc.runtime (null): */
/* Content from ti.targets.arm.rtsarm (null): */
/* Content from ti.sysbios.interfaces (null): */
/* Content from ti.sysbios.family (null): */
/* Content from ti.sysbios.family.arm (ti/sysbios/family/arm/linkcmd.xdt): */
--retain "*(.vecs)"
/* Content from xdc.services.getset (null): */
/* Content from ti.sysbios.family.arm.a8 (null): */
/* Content from ti.sysbios.rts (ti/sysbios/rts/linkcmd.xdt): */
/* Content from xdc.runtime.knl (null): */
/* Content from ti.catalog.arm.cortexa8 (null): */
/* Content from ti.catalog.peripherals.hdvicp2 (null): */
/* Content from ti.catalog (null): */
/* Content from xdc.platform (null): */
/* Content from xdc.cfg (null): */
/* Content from ti.platforms.generic (null): */
/* Content from ADK_14P0062C (null): */
/* Content from ti.sysbios (null): */
/* Content from ti.sysbios.hal (null): */
/* Content from ti.sysbios.knl (null): */
/* Content from ti.sysbios.gates (null): */
/* Content from ti.sysbios.heaps (null): */
/* Content from ti.sysbios.family.arm.exc (null): */
/* Content from ti.sysbios.family.arm.a8.intcps (ti/sysbios/family/arm/a8/intcps/linkcmd.xdt): */
ti_sysbios_family_arm_a8_intcps_Hwi_intc = 0x48200000;
/* Content from ti.sysbios.xdcruntime (null): */
/* Content from ti.sysbios.utils (null): */
/* Content from configPkg (null): */
/* Content from xdc.services.io (null): */
/*
* symbolic aliases for static instance objects
*/
xdc_runtime_Startup__EXECFXN__C = 1;
xdc_runtime_Startup__RESETFXN__C = 1;
TSK_idle = ti_sysbios_knl_Task_Object__table__V + 0;
SECTIONS
{
.text: load >> DDR3
.stack: load > DDR3
GROUP: load > DDR3
{
.bss:
.neardata:
.rodata:
}
.binit: load > DDR3
.cinit: load > DDR3
.init_array: load > DDR3
.const: load >> DDR3
.data: load >> DDR3
.fardata: load >> DDR3
.switch: load >> DDR3
.sysmem: load > DDR3
.far: load >> DDR3
.args: load > DDR3 align = 0x4, fill = 0 {_argsize = 0x0; }
.cio: load >> DDR3
.ARM.exidx: load > DDR3
.ARM.extab: load >> DDR3
.c_int00: load > 0x80000000, run > 0x80000000
.vecs: load > DDR3
ti.sysbios.family.arm.a8.mmuTableSection: load > DDR3, type = NOINIT
xdc.meta: load > DDR3, type = COPY
}