[SOLVED] linker creates loadable section even when I say load ="no"

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

  • [SOLVED] linker creates loadable section even when I say load ="no"

    Hi,

    I am trying to get linker to create a variable pointer to a specfic location. If I can't get linker to do this I will have to do by just defining a "char *" and setting the pointer to an absolute location. But I wanted to do this from linker file and I think it should work.


    <ProgramSection alignment="4" load="no" start ="$(FLASH_FW_REV_START)" size="$(REV_SIZE)" name=".firmwareRevisionRecord" address_symbol="__start_fw_revision_record" />

    but linker seems to create a loadable section....

    *fill* 0x000000002003fff0 0x10
    0x0000000020040000 __SoftSwitch_end__ = (__SoftSwitch_start__ + SIZEOF (.SoftSwitch))
    0x0000000000000020 __SoftSwitch_size__ = SIZEOF (.SoftSwitch)
    0x0000000020040000 __SoftSwitch_load_end__ = __SoftSwitch_end__
    0x0000000020040000 __RAM_segment_used_end__ = (0x2003ffe0 + SIZEOF (.SoftSwitch))
    0x0000000000040000 __RAM_segment_used_size__ = (__RAM_segment_used_end__ - __RAM_segment_start__)
    0x0000000000000001 . = ASSERT (((__SoftSwitch_start__ == __SoftSwitch_end__) || ((__SoftSwitch_end__ >= __RAM_segment_start__) && (__SoftSwitch_end__ <= __RAM_segment_end__))), error: .SoftSwitch is too large to fit in RAM memory segment)
    0x0000000000000001 . = ASSERT ((__fault_ram_end__ <= __SoftSwitch_start__), error: section .fault_ram overlaps absolute placed section .SoftSwitch)
    0x00000000000f8280 __firmwareRevisionRecord_load_start__ = 0xf8280

    .firmwareRevisionRecord
    0x00000000000f8280 0x100
    0x00000000000f8280 __firmwareRevisionRecord_start__ = .
    0x00000000000f8280 __start_fw_revision_record = __firmwareRevisionRecord_start__
    *(.firmwareRevisionRecord .firmwareRevisionRecord.*)
    0x00000000000f8380 . = ALIGN (MAX ((__firmwareRevisionRecord_start__ + 0x100), .), 0x4)
    *fill* 0x00000000000f8280 0x100
    0x00000000000f8380 __firmwareRevisionRecord_end__ = (__firmwareRevisionRecord_start__ + SIZEOF (.firmwareRevisionRecord))
    0x0000000000000100 __firmwareRevisionRecord_size__ = SIZEOF (.firmwareRevisionRecord)
    0x00000000000f8380 __firmwareRevisionRecord_load_end__ = __firmwareRevisionRecord_end__
    0x00000000000f8380 __FLASH_segment_used_end__ = (0xf8280 + SIZEOF (.firmwareRevisionRecord))
    0x00000000000f8380 __FLASH_segment_used_size__ = (__FLASH_segment_used_end__ - __FLASH_segment_start__)
    0x0000000000000001 . = ASSERT (((__firmwareRevisionRecord_start__ == __firmwareRevisionRecord_end__) || ((__firmwareRevisionRecord_end__ >= __FLASH_segment_start__) && (__firmwareRevisionRecord_end__ <= __FLASH_segment_end__))), error: .firmwareRevisionRecord is too large to fit in FLASH memory segment)
    0x0000000000000001 . = ASSERT ((__tdata_load_end__ <= __firmwareRevisionRecord_start__), error: section .tdata overlaps absolute placed section .firmwareRevisionRecord)


    I expected the load="no" to supress loading of this section.
  • Hello,

    Thank you for your inquiry.
    It is correct that the linker will create a section there, but it will not be downloaded. It is just information for the linker not to place code there.

    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.