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.
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.