[ABANDONED] Segger Linker - how to define symbol to be end of block? And some other questions / suggestion

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

  • [ABANDONED] Segger Linker - how to define symbol to be end of block? And some other questions / suggestion

    In the linker .icf file, I want to define a symbol to be the end of a block. For example:

    define region CCMRAM = [0x10000000 size 0x10000];
    define block stack with size = __STACKSIZE__, alignment = 8, readwrite access { };
    place at end of CCMRAM { block heap, block stack };

    define symbol _estack = end of stack; <- this doesn't work. What is the proper syntax for determining the start or end of a region / block?

    Also, where is _estack referenced? I looked and in the .map file it says "Linker created".

    A suggestion - in "Placing at the end of a range" description, think about adding something that the placement is done at the end starting with the first item in the list i.e. if the list is:
    place at end of RAM { block heap, block stack };
    it will be placed with block heap at the end and then just before it, block stack. In other words, stack will have a lower address than heap. So, you really want:
    place at end of RAM { block stack, block heap};

    Once you know this, it is kind of obvious but, I got it wrong the first go around.
  • Hello,

    Thank you for your inquiry.
    Not sure what the question is here. Could you elaborate?
    If you are looking to place certain sections at beginning or end of memory areas you can use "place at end of" or "palce at start of" etc.
    Section 3.2.6.2 of the SEGGER Linker manual explains this in more detail.

    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.
  • Sorry my question wasn't clear.

    How can I define a symbol to be the end of a region or block.

    The use case is, define a block in RAM for the stack. Then, take the end address of the stack and use that to initialize the stack pointer.

    Thank you.