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/CC2640: #10237-D split placement (>>) ignored for ".init_array"

Part Number: CC2640


Tool/software: TI C/C++ Compiler

Hello,

I am using the simple_peripheral_cc2650lp_app to build the BLE project.  It was fine before.

Recently, I added a C++ class to support a adafruit module.  Once I declare the Class as following in global segment :

Adafruit_FONA fona = Adafruit_FONA(FONA_RST);

I received the below warning :

#10237-D split placement (>>) ignored for ".init_array": split placement for this section is not permitted cc26xx_app.cmd /simple_peripheral_cc2650lp_app/TOOLS line 126 C/C++ Problem

SECTIONS
{
.intvecs : > FLASH_APP_BASE
.text : >> FLASH | FLASH_LAST_PAGE
.const : >> FLASH | FLASH_LAST_PAGE
.constdata : >> FLASH | FLASH_LAST_PAGE
.rodata : >> FLASH | FLASH_LAST_PAGE
.cinit : > FLASH | FLASH_LAST_PAGE
.pinit : >> FLASH | FLASH_LAST_PAGE
.init_array : >> FLASH | FLASH_LAST_PAGE
.emb_text : >> FLASH | FLASH_LAST_PAGE
.ccfg : > FLASH_LAST_PAGE (HIGH)

What should I change to correct it ?

Thanks for advice.

  • There is an error in the linker command file cc26xx_app.cmd.  

    Dilbert K said:
    What should I change to correct it ?

    Change the .init_array line to look just like the .cinit line.

    .init_array : > FLASH | FLASH_LAST_PAGE

    Note the >> changes to > .

    Of course the error is present all the time.  But it doesn't affect anything until you add that C++ code.  If you define a global object with a non-trivial constructor, that constructor is called before main starts.  The section .init_array contains pointers to functions for those constructors.  It was empty before, which is why the error didn't matter.  Now that it is not empty, you see the diagnostic.  

    The syntax >> says to split that output section across those memory ranges.  Some sections, like .init_array, cannot be split.  The startup code which processes .init_array presumes it is completely contained in a single contiguous block of memory.

    I presume you get this linker command file from an example provided by TI.  I'll let the relevant people know about the problem.

    Another option is to just the ignore the diagnostic.  The linker does the right thing.  Your code will work.

    Thanks and regards,

    -George

  • Hi George,

    Thanks for detail info.  After the change, warning is gone.

    Yes, the linker command file was from TI-SDK ble_sdk_2_02_01_18.

  • Thank you for the analysis. I have submitted this to our development team.

    Best wishes