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.

Linker warning when adding C++ constructor

Other Parts Discussed in Thread: HALCOGEN

Hello,

I'm using CCS 5.5, RM46, HalCoGen, and user program in C++.

So, create the startup with HalCoGen, all compiles/funs fine.  Add a C++ file where my user program will run, add a class, member variables, member functions, and all compiles/runs fine.  Add a default constructor to my class and get this error:

<Linking>
warning #10247-D: creating output section ".init_array" without a SECTIONS specification

Any ideas as to what I do to resolve this warning?

TIA

  • Yes,

    See: http://www.ti.com/lit/ug/spnu151i/spnu151i.pdf pages 120-121 and it'll explain what this section is.  It should go into nonvolatile memory (i.e. Flash on our part) according to this table:

     

    You can add a section entry into the sys_lnk.cmd file output by HalCoGen, between the USER CODE comments so that the change is maintained through re-generations.

    See highlighted line below:

    /*----------------------------------------------------------------------------*/
    /* Section Configuration */
    
    
    SECTIONS
    {
    .intvecs : {} > VECTORS
    
    
    .text : {} > FLASH0 | FLASH1
    
    
    .const : {} > FLASH0 | FLASH1
    
    
    .cinit : {} > FLASH0 | FLASH1
    
    
    .pinit : {} > FLASH0 | FLASH1
    
    
    .bss : {} > RAM
    
    
    .data : {} > RAM
    
    
    .sysmem : {} > RAM
    
    
    /* USER CODE BEGIN (4) */
    .init_array : {} > FLASH0 | FLASH1
    /* USER CODE END */
    }