[SOLVED] SES v6.20 - linker incompatibility

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

  • [SOLVED] SES v6.20 - linker incompatibility

    Hello,

    After upgrade from SES 5.70a to SES 6.20 (segger-ld from 4.24.1 to 4.30.1), some statements in linker script return an error.
    For example according to
    studio.segger.com/segger/UM20005_Linker.pdf [Document: UM20005 Software Version: 4.24.1 Revision: 0 Date: January 19, 2022] and segger.com/doc/UM20005_Linker.html [accessed Mar 2nd 2022]

    i can use following syntax:


    C Source Code: SEGGER_Flash.icf

    1. [...]
    2. //
    3. // Define an empty section that acts as a high-water marker.
    4. //
    5. define section ConfigHighWater { };
    6. //
    7. // Place data in the block but make sure the sentinel is placed
    8. // after all other sections.
    9. //
    10. define block Config with size=256 {
    11. symbol ConfigData, // This is, e.g., a C-level variable.
    12. last section ConfigHighWater
    13. };
    14. [...]
    Display All
    however, in version 6.20, it fails with error:
    block 'Config' is defined as optional with fixed-size and must have no selectors


    I cannot find the documentation for new version of segger-ld.


    Regards,
    adamu

    The post was edited 1 time, last by adamu ().

  • Hello Adamu,

    Thank you for your inquiry.
    Yes there was an update for the linker to improve error handling.
    Fixed size blocks may not contain data but are meant only to keep memory areas free for e.g. heap or stack.
    Otherwise this could cause issues in your application. This was also the case with the old linker version, it simply had no error handling for this.
    So we recommend to remove the size=256 directive if you plan on placing data into that block.

    We will check if the documentation can be improved in that regard.

    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.
  • Hi,


    adamu wrote:

    I would like to know what "is defined as optional" mean and what are the other options.
    I think there is a misunderstanding. Fixed size blocks are of "type" optional. So the linker can decide to place them or not.
    This is linker internal and nothing for you to worry about.

    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.