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.

Compiler/TMS320F28388D: Placing libraries in specific memory location

Part Number: TMS320F28388D
Other Parts Discussed in Thread: C2000WARE

Tool/software: TI C/C++ Compiler

Hi,

Three real-time libraries are created for our application from TI provided source files.

We need to know how to place those three libraries in a specific memory location in linker command file.

From where we can get information for this?

(The three libraries are Flash, Ram and Flash API).

Thanks,

Subha

  • Please see Allocate a Single Input Section from a Library, which is one part of the larger article Linker Command File Primer.

    Thanks and regards,

    -George

  • Hi,

    When I try to place my libraries, i got error like this,

    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 5: error #10264: BEGIN memory range overlaps existing memory range FLASH0
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 5: error #10263: BEGIN memory range has already been specified
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 6: error #10264: RESET_SOURCE memory range overlaps existing memory range BOOT_RSVD
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 7: error #10263: BOOT_RSVD memory range has already been specified
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 7: error #10264: BOOT_RSVD memory range overlaps existing memory range BOOT_RSVD
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 8: error #10263: RAMM0 memory range has already been specified
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 8: error #10264: RAMM0 memory range overlaps existing memory range RAMM0
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 9: error #10263: RAMM1 memory range has already been specified
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 9: error #10264: RAMM1 memory range overlaps existing memory range RAMM1
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 11: error #10263: RAMD0 memory range has already been specified
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 11: error #10264: RAMD0 memory range overlaps existing memory range RAMD0
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 12: error #10263: RAMD1 memory range has already been specified
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 12: error #10264: RAMD1 memory range overlaps existing memory range RAMD1
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 13: error #10264: RAMLS0_R memory range overlaps existing memory range RAMLS0
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 14: error #10264: RAMLS0_INDEX memory range overlaps existing memory range RAMLS0
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 15: error #10263: RAMLS0 memory range has already been specified
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 15: error #10264: RAMLS0 memory range overlaps existing memory range RAMLS0
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 16: error #10263: RAMLS1 memory range has already been specified
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 16: error #10264: RAMLS1 memory range overlaps existing memory range RAMLS1
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 17: error #10263: RAMLS2 memory range has already been specified
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 17: error #10264: RAMLS2 memory range overlaps existing memory range RAMLS2
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 18: error #10263: RAMLS3 memory range has already been specified
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 18: error #10264: RAMLS3 memory range overlaps existing memory range RAMLS3
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 21: error #10264: RAMLS5_6_7 memory range overlaps existing memory range RAMLS4
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 21: error #10263: RAMLS5_6_7 memory range has already been specified
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 21: error #10264: RAMLS5_6_7 memory range overlaps existing memory range RAMLS5_6_7
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 24: error #10263: RAMGS0 memory range has already been specified
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 24: error #10264: RAMGS0 memory range overlaps existing memory range RAMGS0
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 25: error #10263: RAMGS1 memory range has already been specified
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 25: error #10264: RAMGS1 memory range overlaps existing memory range RAMGS1
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 26: error #10263: RAMGS2 memory range has already been specified
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 26: error #10264: RAMGS2 memory range overlaps existing memory range RAMGS2
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 27: error #10263: RAMGS3 memory range has already been specified
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 27: error #10264: RAMGS3 memory range overlaps existing memory range RAMGS3
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 28: error #10263: RAMGS4 memory range has already been specified
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 28: error #10264: RAMGS4 memory range overlaps existing memory range RAMGS4
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 29: error #10263: RAMGS5 memory range has already been specified
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 29: error #10264: RAMGS5 memory range overlaps existing memory range RAMGS5
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 30: error #10263: RAMGS6 memory range has already been specified
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 30: error #10264: RAMGS6 memory range overlaps existing memory range RAMGS6
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 31: error #10263: RAMGS7 memory range has already been specified
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 31: error #10264: RAMGS7 memory range overlaps existing memory range RAMGS7
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 32: error #10263: RAMGS8 memory range has already been specified
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 32: error #10264: RAMGS8 memory range overlaps existing memory range RAMGS8
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 33: error #10263: RAMGS9 memory range has already been specified
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 33: error #10264: RAMGS9 memory range overlaps existing memory range RAMGS9
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 34: error #10263: RAMGS10 memory range has already been specified
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 34: error #10264: RAMGS10 memory range overlaps existing memory range RAMGS10
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 35: error #10263: RAMGS11 memory range has already been specified
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 35: error #10264: RAMGS11 memory range overlaps existing memory range RAMGS11
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 36: error #10263: RAMGS12 memory range has already been specified
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 36: error #10264: RAMGS12 memory range overlaps existing memory range RAMGS12
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 37: error #10263: RAMGS13 memory range has already been specified
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 37: error #10264: RAMGS13 memory range overlaps existing memory range RAMGS13
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 38: error #10263: RAMGS14 memory range has already been specified
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 38: error #10264: RAMGS14 memory range overlaps existing memory range RAMGS14
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 39: error #10263: RAMGS15 memory range has already been specified
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 39: error #10264: RAMGS15 memory range overlaps existing memory range RAMGS15
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 43: error #10263: FLASH0 memory range has already been specified
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 43: error #10264: FLASH0 memory range overlaps existing memory range FLASH0
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 44: error #10263: FLASH1 memory range has already been specified
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 44: error #10264: FLASH1 memory range overlaps existing memory range FLASH1
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 45: error #10263: FLASH2 memory range has already been specified
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 45: error #10264: FLASH2 memory range overlaps existing memory range FLASH2
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 46: error #10263: FLASH3 memory range has already been specified
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 46: error #10264: FLASH3 memory range overlaps existing memory range FLASH3
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 47: error #10263: FLASH4 memory range has already been specified
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 47: error #10264: FLASH4 memory range overlaps existing memory range FLASH4
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 48: error #10263: FLASH5 memory range has already been specified
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 48: error #10264: FLASH5 memory range overlaps existing memory range FLASH5
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 49: error #10263: FLASH6 memory range has already been specified
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 49: error #10264: FLASH6 memory range overlaps existing memory range FLASH6
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 50: error #10263: FLASH7 memory range has already been specified
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 50: error #10264: FLASH7 memory range overlaps existing memory range FLASH7
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 51: error #10263: FLASH8 memory range has already been specified
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 51: error #10264: FLASH8 memory range overlaps existing memory range FLASH8
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 52: error #10263: FLASH9 memory range has already been specified
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 52: error #10264: FLASH9 memory range overlaps existing memory range FLASH9
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 53: error #10263: FLASH10 memory range has already been specified
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 53: error #10264: FLASH10 memory range overlaps existing memory range FLASH10
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 54: error #10263: FLASH11 memory range has already been specified
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 54: error #10264: FLASH11 memory range overlaps existing memory range FLASH11
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 55: error #10263: FLASH12 memory range has already been specified
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 55: error #10264: FLASH12 memory range overlaps existing memory range FLASH12
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 56: error #10263: FLASH13 memory range has already been specified
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 56: error #10264: FLASH13 memory range overlaps existing memory range FLASH13
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 59: error #10264: FLASH4_BUILD_CRC memory range overlaps existing memory range BEGIN
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 60: error #10264: FLASH4_BUILD_INFO memory range overlaps existing memory range FLASHE_BUILD_INFO
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 63: error #10264: FLASH10_CDF_CRC memory range overlaps existing memory range FLASH10
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 65: error #10263: CPU1TOCPU2RAM memory range has already been specified
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 65: error #10264: CPU1TOCPU2RAM memory range overlaps existing memory range CPU1TOCPU2RAM
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 66: error #10263: CPU2TOCPU1RAM memory range has already been specified
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 66: error #10264: CPU2TOCPU1RAM memory range overlaps existing memory range CPU2TOCPU1RAM
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 67: error #10263: CPUTOCMRAM memory range has already been specified
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 67: error #10264: CPUTOCMRAM memory range overlaps existing memory range CPUTOCMRAM
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 68: error #10263: CMTOCPURAM memory range has already been specified
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 68: error #10264: CMTOCPURAM memory range overlaps existing memory range CMTOCPURAM
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 70: error #10263: CANA_MSG_RAM memory range has already been specified
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 70: error #10264: CANA_MSG_RAM memory range overlaps existing memory range CANA_MSG_RAM
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 71: error #10263: CANB_MSG_RAM memory range has already been specified
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 71: error #10264: CANB_MSG_RAM memory range overlaps existing memory range CANB_MSG_RAM
    fatal error #99900: error limit reached; 100 errors detected

    Why this happens so? How to fix it?

    Thanks,

    Subha

  • Hi,

    In TI provided Flash API library(F2838x_C28x_FlashAPI.lib), what does the below mentioned section in f2838x_flash_api_lnk.cmd file means?


    GROUP
    {
    .TI.ramfunc
    { -l F2838x_C28x_FlashAPI.lib}

    } LOAD = FLASH3,
    RUN = RAMLS03,
    LOAD_START(RamfuncsLoadStart),
    LOAD_SIZE(RamfuncsLoadSize),
    LOAD_END(RamfuncsLoadEnd),
    RUN_START(RamfuncsRunStart),
    RUN_SIZE(RamfuncsRunSize),
    RUN_END(RamfuncsRunEnd),
    ALIGN(8)

    Thanks,

    Subha

  • Diagnostics like these ...

    Subha R said:
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 5: error #10264: BEGIN memory range overlaps existing memory range FLASH0
    "../Source/2838x_FLASH_lnk_cpu1.cmd", line 5: error #10263: BEGIN memory range has already been specified

    ... are usually caused by supplying two linker command files as input to the linker.  Please carefully check the invocation of the linker and see if this is happening.  If it is, then remove one of the linker command files.

    Thanks and regards,

    -George

  • Subha R said:
    In TI provided Flash API library(F2838x_C28x_FlashAPI.lib), what does the below mentioned section in f2838x_flash_api_lnk.cmd file means?

    I don't see that linker command file in C2000Ware, so I don't know where it comes from.

    This code ...

    Subha R said:

    GROUP
    {
    .TI.ramfunc
    { -l F2838x_C28x_FlashAPI.lib}

    } LOAD = FLASH3,
    RUN = RAMLS03,
    LOAD_START(RamfuncsLoadStart),
    LOAD_SIZE(RamfuncsLoadSize),
    LOAD_END(RamfuncsLoadEnd),
    RUN_START(RamfuncsRunStart),
    RUN_SIZE(RamfuncsRunSize),
    RUN_END(RamfuncsRunEnd),
    ALIGN(8)

    ... is unusual in a few respects.  That is why I suspect it has been modified.  All that said, here is what this code does.

    It forms a GROUP with one output section in it.  While that is is legal syntax, it doesn't do anything useful.  The GROUP could be removed.

    It forms an output section named .TI.ramfunc.  It is made up of all the input sections from the library F2838x_C28x_FlashAPI.lib.  It is a good guess that this library only contains code sections (named .text) and no data sections.  This GROUP/section is allocated a load address in the FLASH3 memory range, and a run address in the RAMLS03 memory range.  It is aligned on an 8 word boundary.  The LOAD_START, LOAD_SIZE, etc. operators create symbols that are used to implement the code which copies the GROUP/section from flash to RAM.

    Thanks and regards,

    -George

  • Hi,

    When I tried placing our own created RTL files, why certain .obj files are missing placed in memory range.

    Why is that happen so? Is there any way to place those object files also ?

    We created RTL flash library with the below mentioned files

    _lock.c,

     args_main.c, 

    sqrt_f32.asm,  

    log_f32.asm,

    logtable_f32.asm, 

    errno.c,

    exit.c, 

    s_frexpf.c , 

    atol.c, ctype.c, 

    u_div28.asm, 

    div_f32.asm, 

    boot28.asm, 

    ll_aox28.asm,

    ll_cmp28.asm, 

    ll_div28.asm, 

    ll_mpy28.asm,

    autoinit.c,  

    startup.c,

    pre_init.c,

    cpy_tbl.c,

    fs_div28.asm.

    While placing the library in RAM, only the below mentioned .obj files are placed,

    fs_div28.obj (.text)

     cpy_tbl.obj (.text:copy_in)

    autoinit.obj (.text:run_cinit)

    exit.obj (.text:exit)

    autoinit.obj (.text:run_pinit)

    autoinit.obj (.text:__TI_auto_init_template)

    sqrt_f32.obj (.text)

    args_main.obj (.text:_args_main)

    boot28.obj (.text)

    autoinit.obj (.text:run_binit)

    _lock.obj (.data:_lock)

    exit.obj (.data)

    autoinit.obj (.text:__TI_auto_init:__TI_auto_init)

    pre_init.obj (.text:_system_pre_init)

    exit.obj (.text:abort)

     _lock.obj (.text:_nop)

    startup.obj (.text:_system_post_cinit)

    Why others are missed and how to place all at one instant?

    Thanks,

    Subha

  • The linker brings in a file from an library only if it contains a function (or data) that is needed by the program.  Consider for instance ...

    Subha R said:
    s_frexpf.c

    This RTS source file defines the function frexpf.  It must be the case that your program never calls this function.  

    Thanks and regards,

    -George