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.

TMS320F28379S: High Location Specifier makes different for COFF and EABI

Part Number: TMS320F28379S

Hallo,

I'm migrating system from COFF to EABI.

The last issue is data structure, which must be placed at the end of the second Flash Bank.

Linker command file (relevant part of it):

MEMORY {
   FLASH_1          : origin = 0x080002, length = 0x040000 - 2 		// no discontinued space for 1MB Flash, no prefetch gap with last 16 words (see Table 6, SPRZ422I)
   FLASH_2          : origin = 0x0C0000, length = 0x040000
   ...
   ...
}

SECTIONS {
   ...
   ...
   	.buildinfo       : >  FLASH_2(HIGH)
}

Result (map file) for EABI, what is inacceptable, because some ending bytes after .buildInfo of Flash stays unused:

.buildinfo 
*          0    000fff80    00000078     
                  000fff80    00000078     buildInfo.obj (.buildinfo)

Result (map file) for COFF, what I do expect to get, and what already works for me:

.buildinfo 
*          0    000fff88    00000078     
                  000fff88    00000078     buildInfo.obj (.buildinfo)

The size of structure stays the same (0x78) but the placement is not. I would expect to see my structure at the same address (0x000fff88).

How can I get my structure at 0x0x000fff88 ?

Direct placement with ".buildinfo       :  0x0x000fff88 " causes linker error. Why?

  • Hi,

    Can you share the error message when you use the absolute address?

    Regards,

    Veena

  • Hi,

    The absolute placement looks like this:

    SECTIONS {
       ...
       ...
       	.buildinfo       : 0x0x000FFF88
    }

    there comes warning and following list of errors. But the warning matches exact the line with problematic placement.

    line 75: warning #10096-D: specified address lies outside memory map
    error #10264: DEFAULT memory range overlaps existing memory range RAM_M0
    error #10264: DEFAULT memory range overlaps existing memory range RAM_M1
    error #10264: DEFAULT memory range overlaps existing memory range RAMLS
    error #10264: DEFAULT memory range overlaps existing memory range RAMGS0_3
    error #10264: DEFAULT memory range overlaps existing memory range RAMGS4_8
    error #10264: DEFAULT memory range overlaps existing memory range RAMGS8_15
    error #10264: DEFAULT memory range overlaps existing memory range BEGIN
    error #10264: DEFAULT memory range overlaps existing memory range FLASH_1
    error #10264: DEFAULT memory range overlaps existing memory range FLASH_2
    error #10264: DEFAULT memory range overlaps existing memory range RESET

    error #10010: errors encountered during linking; "Firmware.out" not built

    It seems strange. Thru this single placement all the memory ranges (RAM as well as flash) are no more valid. Without absolute placement linker do the job without any warning.

  • Just another try to workaround: separated memory range, exclusive for .buildInfo struct.

    MEMORY CONFIGURATION
    
             name            origin    length      used     unused   attr    fill
    ----------------------  --------  ---------  --------  --------  ----  --------
      RAM_M0                00000123   000002dd  00000000  000002dd  RWIX
      ...
      ...
      BEGIN                 00080000   00000002  00000002  00000000  RWIX
      FLASH_1               00080002   0003fffe  0003fff8  00000006  RWIX
      FLASH_2               000c0000   0003ff88  00018073  00027f15  RWIX
      FLASH_XXX             000fff88   00000078  00000000  00000078  RWIX
      RESET                 003fffc0   00000002  00000000  00000002  RWIX

    and placement into the exact sized range:

    	.buildinfo       : > FLASH_XXX

    results with another kind of error.

    line 75: error #10099-D: program will not fit into available memory, or the section contains a call site that requires a trampoline that can't be generated for this section. placement with alignment/blocking fails for section ".buildinfo" size 0x78 page 0.  Available memory ranges:

    But this is not coherent. From memory map comes: FLASH_XXX size:  0x00000078 and .buildInfo size also 0x0078

     output                                  attributes/
    section   page    origin      length       input sections
    --------  ----  ----------  ----------   ----------------
    .buildinfo 
    *          0    00000000    00000078     FAILED TO ALLOCATE

  • I think it might be due to data blocking. For more details - https://software-dl.ti.com/ccs/esd/documents/C2000_c28x_migration_from_coff_to_eabi.html#data-page-dp-pointer-load-optimization

    If the section includes globals, could you try adding __attribute__((noblocked))?

    Regards,

    Veena

  • Yes, it helps.

    Thank you very much.

    Even better explanation of"data blocking":
    software-dl.ti.com/.../cgt_data-blocking-c2000.html