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.

placement of libraries (stdio) in DDR not working

Hi

  • CCSv5.5
  • CGT 7.2.6 
  • IPC 1.24.3.32 
  • SYS/BIOS 6.35.4.50
  • XDCtools 3.25.3.72
  • C6472

I've followed the syntax specified in the link below in trying to move stdio library functions into DDR.

processors.wiki.ti.com/.../Code_Generation_Tools_FAQ

My RTSC Configuration .cfg file points to a custom linker file that has the entries below.

`$args[1]`

    .boot_entry:                    load >> LL2BOOT     align = 0x8
    .cio:                           load >> LL2RAM      align = 0x8
    .text:                          load >> SL2RAM      align = 0x8
    .far:                           load >> LL2RAM      align = 0x8
    .sysmem:                        load >  LL2RAM      align = 0x8
    .bss:                           load >  LL2RAM      align = 0x8
    .pinit:                         load >  LL2RAM      align = 0x8
    .cinit:                         load >  DDR2        align = 0x8
    .switch:                        load >> LL2RAM      align = 0x8
    .data:                          load >> LL2RAM      align = 0x8
    .stack:                         load >  LL2RAM      align = 0x8
    .vecs:                          load >> SL2RAM      align = 0x8
    .const:                         load >  DDR2        align = 0x8
    .sect_LL2:                      load >> LL2RAM      align = 0x8
    .heapll2:                       load >> LL2HEAP     align = 0x8
    .sect_SL2:                      load >> SL2RAM      align = 0x8
    .sect_DDR2:                     load >  DDR2        align = 0x8
    .sect_DDR2_code:                load >  DDR2        align = 0x8
    .sect_mem_ext                   load >> DDR2        align = 0x8
    .sect_SL2_EDMA:                 load >> SL2RAM      align = 0x8
    .sect_cine_data:                load >> DDR2CINE    align = 0x8      
    .sect_colorflow_ddr:            load >> DDR2        align = 0x80
    .sect_doppler_output:           load >> DDR2        align = 0x8
    .sect_doppler_data:             load >> DDR2        align = 0x8
    .sect_doppler_data_LL2:         load >> LL2RAM      align = 0x8
    .sect_diagnostics:              load >> DDR2DIAG    align = 0x8
	.my_section: load > DDR2 
	{
	
	    -lrts64plus.lib<fscanf.obj>(.text)
	    -lrts64plus.lib<printf.obj>(.text)
	    -lrts64plus.lib<_printfi.obj>(.text)
	    -lrts64plus.lib<_scanfi.obj>(.text)
	
	}   


    GROUP: load = DDR2HOST
    {
        .sect_host_interface_struct:    {} align = 0x8
        .sect_params:                   {} align = 0x8
        .sect_params_misc:              {} align = 128
        .sect_error:                    {} align = 128
        .sect_noncached_DDR2            {} align = 128
        .sect_top_of_DDR_vars:          {} align = 128
    }

    
    UNION: run = LL2RAM 
    {
        .sect_Core0_LL2 {}
        .sect_RSC_LL2 {}
        .sect_Doppler_LL2 {}
    }

I've compared the .map file before and after adding the .my_section below and the .obj's are still in SL2.

Is there a syntax error I'm making? CODE_SECTION pragmas work, but I need to move the library files in order to give me SL2 space.

Cheers2u

Eddie

  • I tried to reproduce this behavior in a simple build context, and failed.  I will ask the RTSC experts to take a look.

    Thanks and regards,

    -George

  • Are you trying to place the section in the .cfg also? Can you please attach your .cfg file (please attach and not cut/paste).

    Todd

  • Hi Todd

    I tried to attach the custom linker file and the .cfg file but something's wrong with the attach tool. Nonetheless, I was able to get it working by specifying the sections as below.  Now I've got lots of SL2 available.  :)

    Thanks for looking at this.

    Cheers

    Eddie

    	.getTheseOutOfSl2_section: load > DDR2 
    	{
    	
            -lrts64plus.lib<atexit.obj>(.text)
            -lrts64plus.lib<_bufread.obj>(.text)
            -lrts64plus.lib<fclose.obj>(.text)
            -lrts64plus.lib<fflush.obj>(.text)
            -lrts64plus.lib<fgetc.obj>(.text)
            -lrts64plus.lib<fgets.obj>(.text)
            -lrts64plus.lib<fflush.obj>(.text)
            -lrts64plus.lib<fopen.obj>(.text)
            -lrts64plus.lib<fputc.obj>(.text)
            -lrts64plus.lib<fputs.obj>(.text)
            -lrts64plus.lib<fputsc.obj>(.text)
            -lrts64plus.lib<frcmpyd.obj>(.text)
    	    -lrts64plus.lib<fscanf.obj>(.text)
            -lrts64plus.lib<fseek.obj>(.text)
            -lrts64plus.lib<_io_perm.obj>(.text)
            -lrts64plus.lib<lowlev.obj>(.text)
    	    -lrts64plus.lib<printf.obj>(.text)
    	    -lrts64plus.lib<_printfi.obj>(.text)
            -lrts64plus.lib<remu.obj>(.text)
    	    -lrts64plus.lib<_scanfi.obj>(.text)
            -lrts64plus.lib<setvbuf.obj>(.text)
            -lrts64plus.lib<strtod.obj>(.text)
            -lrts64plus.lib<strtold.obj>(.text)
            -lrts64plus.lib<strtoll.obj>(.text)
            -lrts64plus.lib<strtol.obj>(.text)
            -lrts64plus.lib<strtoul.obj>(.text)
            -lrts64plus.lib<strtoull.obj>(.text)
            -lrts64plus.lib<strcpy.obj>(.text)
            -lrts64plus.lib<strasg.obj>(.text)        
            -lrts64plus.lib<trgdrv.obj>(.text)
            -lrts64plus.lib<trgmsg.obj>(.text)
            -lrts64plus.lib<ungetc.obj>(.text)
    	
    	} 

  • You can also use wildcards, like so:

    	
    .getTheseOutOfSl2_section: load > DDR2 
    {
            -lrts64plus.lib<*.obj>(.text)
    }
    
  • Thanks. I wish the rts64plus lib didn't have the math functions (i.e. they were in a library separate from the file IO functions). Using the wild card would work great in that case.

    Cheers

    Eddie

  • You can combine the wildcard with more specific rules:

    .text.fpmath: load > DDR2 
    {
            -lrts64plus.lib<cos*.obj>(.text)
            -lrts64plus.lib<sin*.obj>(.text)
            -lrts64plus.lib<frexp.obj>(.text)
    }
    .text.others: load > DDR2 
    {
            -lrts64plus.lib<*.obj>(.text)
    }