[SOLVED] Configuration of section placement files for Segger Embedded Studio Segger_flash.icf or Flash_placement.xml?

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [SOLVED] Configuration of section placement files for Segger Embedded Studio Segger_flash.icf or Flash_placement.xml?

    What is the current best practice?

    I am using Segger Embedded Studio v4.12 for programming a Nordic 51822 application (SDK 12.3) and need to configure the section placement file

    Information on the Segger wiki discusses use of linker scripts (*.icf)
    wiki.segger.com/Porting_from_GCC_to_SEGGER_Linker

    But documentation from Nordic and in the Segger Manual suggest use of flash_placement.xml files
    studio.segger.com/index.htm?ht…placement_file_format.htm

    Advice from Nordic for importing a Keil project states:

    If your project uses modules that require section variables (for example, the Peer Manager, Flash Data Storage, or Flash Storage), define where in the flash information from these modules should be stored.
    1. Download the flash_placement.xml and place it in your project directory.Files are provided for the following versions of the nRF5 SDK:
    2. Right-click on your project in the Project Explorer and select Import Section Placement.
    From infocenter.nordicsemi.com/topi…eveloping/import_ses.html

    However the option to 'import section placement' is not available in the menu for v4.12

    Any help much appreciated!

    Rob
  • The ".icf" extension sounds like the IAR linker (ilinkarm.exe) file.

    you would see
    define region sysram_region = mem:[from sysram_start to sysram_end ];


    place in sysram_region
    {
    block sysram_block,
    };


    GCC (and Green Hills) use ".ld" file (linker definition). You would recognize them by seeing

    syntax like:

    MEMORY
    {
    RAM (wx) : ORIGIN = 0x00200000, LENGTH = 0x00010000
    FLASH (rx) : ORIGIN = 0x00100000, LENGTH = 0x00040000
    }
  • Hello Rob,

    Thank you for your inquiry.
    Embedded Studio supports two linkers out of the box.
    The one is the gcc linker (section_placement.xml and memory map file) and the other our new Segger Linker (only one .icf file).
    The Nordic guide seems to reference the gcc linker.
    Make sure that in project options the linker is set to "GNU" instead of "SEGGER".
    Then you should get the "Import Section placement" option.
    For more information see the Embedded Studio manual.

    Best regards,
    Nino
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • Nino, Veit,

    Many thanks for the sound advice. The clarification of which linkers use which formats was the info I needed

    I guess it begs the question: Which linker should I choose for a Nordic 51822 application?

    Rob
  • Hi Rob,

    The Segger Linker obviously ;)
    See here for more information on why to switch to our linker:
    segger.com/products/developmen…logy/tools/segger-linker/

    Also it is easier to use as only one linker file needs to be maintained instead of multiple like with gcc linker.

    Best regards,
    Nino
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.