Quantcast
Channel: Processors forum - Recent Threads
Viewing all articles
Browse latest Browse all 17527

CGT 8.1.2 for C6000 not initializing static variables (even in EABI mode )

$
0
0

Hey,


it seems to be expected that static variables aren't initialized in COFF mode, but all the sources seem to assume that it is different by default for the EABI compiler. Yet I'm still experiencing the problem with the current compiler set to EABI.


I'm running CCS6.2 with XDCtools 3.25.3.72 and sys/bios 6.35.6.56, targeting OMAP L138.


There is custom linker script added to the project in addition to the generated ones. The variables not being initialized do NOT belong to the custom defined sections:

SECTIONS
{

// !!! IMPORTANT: IROM is not programmable on OMAP-L138 !!!

// -------------  ACQ hwi stuff into L2 ------------------------

.text_fast: { *.*(.text.fast*) } > IRAM
.data_fast: { *.*(.data.fast*) } > IRAM
.data_quick: { *.*(.data.quick*) } > L3_CBA_RAM

// ------------- Kernel stuff into fast memory -----------------

/* place all the knl APIs in IRAM */
.knl: { *.*(.text:*ti_sysbios_knl*) } > IRAM

/* place all the Hwi APIs in IROM */
.hwi: { *.*(.text:*ti_sysbios*_Hwi_*) } > IRAM

/* place the remainder of the SYS/BIOS APIs in DDR */
.sysbios: { *.*(.text:*ti_sysbios*) } > DDR

}

The linker script generated by XDCtools under Debug/configPkg looks as follows (I've removed the commented out stuff to reduce size):

-l"/home/maverick/ccsworkspace/_SCARY_PROJECT_NAME_/Debug/configPkg/package/cfg/sysbios_pe674.oe674"
-l"/home/maverick/ti/syslink_2_21_03_11/packages/ti/syslink/ipc/rtos/lib/debug/ti.syslink.ipc.rtos.ae674"
-l"/home/maverick/ccsworkspace/_SCARY_PROJECT_NAME_/src/ipc/ipc.ae674"
-l"/home/maverick/ccsworkspace/_SCARY_PROJECT_NAME_/src/sysbios/sysbios.ae674"
-l"/home/maverick/ti/syslink_2_21_03_11/packages/ti/syslink/utils/rtos/bios6/lib/debug/ti.syslink.utils.rtos.bios6.ae674"
-l"/home/maverick/ti/edma3_lld_02_12_00_20/packages/ti/sdo/edma3/drv/lib/674/debug/edma3_lld_drv.ae674"
-l"/home/maverick/ti/edma3_lld_02_12_00_20/packages/ti/sdo/edma3/rm/lib/omapl138-evm/674/debug/edma3_lld_rm.ae674"
-l"/home/maverick/ti/xdctools_3_25_03_72/packages/ti/targets/rts6000/lib/ti.targets.rts6000.ae674"
-l"/home/maverick/ti/xdctools_3_25_03_72/packages/ti/targets/rts6000/lib/boot.ae674"

--retain="*(xdc.meta)"


--args 0x64
-heap  0x0
-stack 0x1000

MEMORY
{
    IROM (RX) : org = 0x11700000, len = 0x100000
    IRAM (RWX) : org = 0x11800000, len = 0x20000
    L3_CBA_RAM (RWX) : org = 0x80000000, len = 0x20000
    DDR (RWX) : org = 0xc6800000, len = 0x1800000
    DDR_SHARED (RWX) : org = 0xc6000000, len = 0x800000
}


SECTIONS
{
    ti.sdo.ipc.SharedRegion_0:  { . += 0x800000;} run > 0xc6000000, type = NOLOAD

    ti_sdo_ipc_init: load > DDR, type = NOINIT 
}



    /*
     *  Set entry point to the HWI reset vector 0 to automatically satisfy
     *  any alignment constraints for the boot vector.
     */
    -eti_sysbios_family_c64p_Hwi0

    /*
     * We just modified the entry point, so suppress the "entry point symbol other
     * than _c_int00 specified" warning.
     */
    --diag_suppress=10063

    /* Add the flags needed for SysLink ELF build. */
    --dynamic
    --retain=_Ipc_ResetVector

    /* 
     * Added symbol to ensure SysBios code is retained when entrypoint is
     * something other than _c_int00.  This workaround will be removed once
     * fixed in the SysBios package
     */
    -u _c_int00


/*
 * 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 + 228;

SECTIONS
{
    .text: load >> DDR
    .ti.decompress: load > DDR
    .stack: load > L3_CBA_RAM
    GROUP: load > DDR
    {
        .bss:
        .neardata:
        .rodata:
    }
    .cinit: load > DDR
    .pinit: load >> DDR
    .init_array: load > DDR
    .const: load >> DDR
    .data: load >> DDR
    .fardata: load >> DDR
    .switch: load >> DDR
    .sysmem: load > DDR
    .far: load >> DDR
    .args: load > DDR align = 0x4, fill = 0 {_argsize = 0x64; }
    .cio: load >> DDR
    .ti.handler_table: load > DDR
    .c6xabi.exidx: load > DDR
    .c6xabi.extab: load >> DDR
    .heap: load > DDR
    .vecs: load > DDR
    .plt: load > DDR
    xdc.meta: load > DDR, type = COPY

}



It seems to be an option to add "fill" attribute to the .bss and other sections via sysbios.cfg, but considering the TI documentation says I shouldn't have to change anything for the EABI compiler - I'm confused. The compiler and linker settings seem to be normal:

Compiler flags:
-mv6740 --abi=eabi -Ooff --include_path="/home/maverick/ti/ti-cgt-c6000_8.1.2/include" -g --c99 --define=omapl138 --diag_warning=225 --display_error_number --diag_wrap=off

Linker flags:
-mv6740 --abi=eabi -Ooff -g --c99 --define=omapl138 --diag_warning=225 --display_error_number --diag_wrap=off -z -m"_SCARY_PROJECT_NAME_.map" --heap_size=0x300000 --stack_size=0x1000 -i"/home/maverick/ti/ti-cgt-c6000_8.1.2/lib" -i"/home/maverick/ti/ti-cgt-c6000_8.1.2/include" --reread_libs --define=DSP_CORE=1 --diag_wrap=off --warn_sections --display_error_number --xml_link_info="_SCARY_PROJECT_NAME_linkInfo.xml" --rom_model --zero_init=on



Thank you in advance,
Mav


Viewing all articles
Browse latest Browse all 17527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>