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.

C6X CGT 7.4.1: cannot mix noinit sections with sections that require initialization error



Migrating to CGT 7.4.1 from 7.3.3, the linker signal an error that I  didn't have before:

error #10367-D: output section "INIT_NO_INIT" cannot mix noinit sections with sections that require initialization

I have this problem when grouping some section together and using operator table() to generate specifica initialization table.

Device: C66XX, CCS: 5.1.0.06

A simplified  exampple:

--stack=1000
--heap=1000

MEMORY
{
    L2SRAM: origin=00800000h, length=08000h  //512K
    SH_RAM: o=0x0C000000, l=0x00400000

    EXT_RAM: o=0x80000000, l=0x00400000
}

SECTIONS
{

  .text > SH_RAM
  .cinit > SH_RAM
 
  .fardata > SH_RAM
  .stack > SH_RAM
  .ovly > SH_RAM
 
  GROUP(INIT_NO_INIT)
  {
    GROUP(g_no_init): type=NOINIT
    {
    .my_no_init: type=NOINIT
    }
    GROUP(g_init)
    {
    .my_init
    } table(table_2)
  } > EXT_RAM
}

---- main.c:

struct data_t
{
  unsigned long d[1000];
};
#pragma DATA_SECTION(my_no_init, ".my_no_init")
struct data_t my_no_init;

#pragma DATA_SECTION(my_init, ".my_init")
struct data_t  my_init={{1,2,3,4,5,6,7,8}};

void main(void)
{
  my_no_init=my_init;
}

  • Thank you for a test case.  I can use it to reproduce what you describe.  It appears to be a bug in the linker.  I filed SDSCM00045211 in the SDOWP system to have this issue addressed.  Feel free to follow it with the SDOWP link below in my signature.

    Thanks and regards,

    -George