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.

Error in Linking the File CCS5

Other Parts Discussed in Thread: OMAPL138, OMAP-L138

My Project in LCDK138  out of Memory.

How can i resolve that ? any Linker file modification required.

'Finished building: ../L138_fir4types_intr.c'
' '
'Building target: L138_fir4types_intr.out'
'Invoking: C6000 Linker'
"C:/ti/ccsv5/tools/compiler/c6000_7.4.4/bin/cl6x" -mv6740 -g --diag_warning=225 -z -m"L138_fir4types_intr.map" --warn_sections -i"C:/ti/ccsv5/tools/compiler/c6000_7.4.4/lib" -i"C:/ti/ccsv5/tools/compiler/c6000_7.4.4/include" --reread_libs --xml_link_info="L138_fir4types_intr_linkInfo.xml" --rom_model -o "L138_fir4types_intr.out" "./vectors_intr.obj" "./L138_fir4types_intr.obj" "./L138_LCDK_aic3106_init.obj" "C:/LCDK/L138_support/linker_dsp.cmd" -l"rts6740.lib" -l"C:\omapl138\bsl\lib\evmomapl138_bsl.lib"
<Linking>
"C:/LCDK/L138_support/linker_dsp.cmd", line 16: error: program will not fit
into available memory. placement with alignment fails for section ".const"
size 0x955d6 . Available memory ranges:
dsp_l2_ram size: 0x40000 unused: 0x1f7a0 max hole: 0x1f600
error: errors encountered during linking; "L138_fir4types_intr.out" not built

>> Compilation failure
gmake: *** [L138_fir4types_intr.out] Error 1
gmake: Target `all' not remade because of errors.

**** Build Finished ****

  • Yes. The linker file(linker_dsp.cmd) modification required.

    Please find the similar issue and the workaround from below thread,

    Thank you.

  • The issue seems to be your code is not able to fit into DSP L2 RAM.
    So please move your code to DDR.

    Ex:

    // ============================================================================
    // Linker Command File for Linking c674 DSP Programs
    //
    // These linker options are for command line linking only. For IDE linking,
    // you should set your linker options in Project Properties.
    // -c Link Using C Conventions
    // -stack 0x1000 Software Stack Size
    // -heap 0x1000 Heap Area Size
    // ===========================================================================
    -stack 0x1000
    -heap 0x1000

    // ============================================================================
    // Specify the System Memory Map
    // ============================================================================
    MEMORY
    {
    L1P: o = 0x11E00000 l = 0x00008000
    L1D: o = 0x11F00000 l = 0x00008000
    L2: o = 0x11800000 l = 0x00040000
    DDR2: o = 0xC0000000 l = 0x08000000
    }

    // ============================================================================
    // Specify the Sections Allocation into Memory
    // ============================================================================
    SECTIONS
    {
    .cinit > DDR2 // Initialization Tables
    .pinit > DDR2 // Constructor Tables
    .init_array > DDR2 //
    .binit > DDR2 // Boot Tables
    .const > DDR2 // Constant Data
    .switch > DDR2 // Jump Tables
    .text > DDR2 // Executable Code
    .text:_c_int00: align=1024 > DDR2 // Entrypoint

    GROUP (NEARDP_DATA) // group near data
    {
    .neardata
    .rodata
    .bss // note: removed fill = 0
    } > DDR2
    .far: fill = 0x0, load > DDR2 // Far Global & Static Variables
    .fardata > DDR2 // Far RW Data
    .stack > DDR2 // Software System Stack
    .sysmem > DDR2 // Dynamic Memory Allocation Area

    .cio > DDR2 // C I/O Buffer
    .vecs > DDR2 // Interrupt Vectors
    }
  • when i load the pgm i got the error below

    ICEPICK_C: Output: Target Connected.
    ICEPICK_C: Output: ---------------------------------------------
    ICEPICK_C: Output: Memory Map Cleared.
    ICEPICK_C: Output: ---------------------------------------------
    ICEPICK_C: Output: Memory Map Setup Complete.
    ICEPICK_C: Output: ---------------------------------------------
    ICEPICK_C: Trouble Reading Memory Block at 0x1c10800 on Page 0 of Length 0x4
    ICEPICK_C: GEL: Error while executing OnTargetConnect(): Target failed to read 0x01C10800 at (*((unsigned int *) ((0x01C10000+0x800)+(4*LPSC_num)))&0x1F) [OMAP-L138_LCDK.gel:868] at PSC0_LPSC_enable(0, 0) [OMAP-L138_LCDK.gel:509] at PSC_All_On() [OMAP-L138_LCDK.gel:244] at OnTargetConnect() .
    C674X_0: Trouble Writing Memory Block at 0xc0000000 on Page 0 of Length 0x7ff0: (Error -1137 @ 0x64) Device is held in reset. Take the device out of reset, and retry the operation. (Emulation package 5.1.232.0)
    C674X_0: GEL: File: D:\workspace_v5_4_OMAPL138_ExperimenterBook\L138_fir4types_intr\Debug\L138_fir4types_intr.out: Load failed.
    C674X_0: Power Failure on Target CPU
    C674X_0: Failed to remove the debug state from the target before disconnecting. There may still be breakpoint op-codes embedded in program memory. It is recommended that you reset the emulator before you connect and reload your program before you continue debugging
  • What emulator are you using ?
    Is it XDS100 ?
    If yes, reduce the JTAG frequency by enabling the adaptive freq in target configuration setting and try.