I'm trying to use the union/group functionality for linker command script files. I have 3 libraries, two of them should be unionized. I'm only seeing one image created with the generated map saying only two were created. I was interested in knowing if what I'm trying to do is possible and how to do this. So, the union should have two groups who will occupy the same memory region in DDR2, where one image is loaded or the other, but not both.
Thanks for any help, in advance!
MEMORY
{
FLASH_LOC_BIST (RWX) :org = 0xB0000000, len = 0x001FFFFF
FLASH_LOC (RWX) :org = 0xB0200000, len = 0x001FFFFF
APPLICATION (RWX) : org = 0xe0000000, len = 0x40000000
}
UNION
{
GROUP(RUN_IMAGE)
{
/* Initialized Sections */
.header_RUN
.RUN_const { -l=RUN.lib(.const) }
.RUN_text { -l=RUN.lib(.text) }
.RUN_c6xabi.extab { -l=RUN.lib(.c6xabi.extab) }
.RUN_c6xabi.exidx { -l=RUN.lib(.c6xabi.exidx) } END(RUN_text_end)
.RUN_fardata { -l=RUN.lib(.fardata) } START(RUN_data_start)
.RUN_rodata { -l=RUN.lib(.rodata ) } START(RUN_data_end) END(RUN_edata)
.RUN_bss { -l=RUN.lib(.bss ) } START(RUN_bss_start)
.RUN_far { -l=RUN.lib(.far ) } END(RUN_bss_end)
} > FLASH_LOC // load addr
GROUP(BIST_IMAGE)
{
/* Initialized Sections */
.header_BIST
.BIST_const { -l=BIST.lib(.const) }
.BIST_text { -l=BIST.lib(.text) }
.BIST_c6xabi.extab { -l=BIST.lib(.c6xabi.extab) }
.BIST_c6xabi.exidx { -l=BIST.lib(.c6xabi.exidx) } END (BIST_text_end)
.BIST_fardata { -l=BIST.lib(.fardata) } START(BIST)
.BIST_rodata { -l=BIST.lib(.rodata ) } START(BIST_data_end) END(BIST_edata)
.BIST_bss { -l=BIST.lib(.bss ) } START(BIST_bss_start)
.BIST_far { -l=BIST.lib(.far ) } END(BIST_bss_end)
} > FLASH_LOC_BIST // load addr
} > APPLICATION // run addr
// roms file to demonstrate creating 3 images needed (not a syntactically superior example)
ROMS
{
BIST: origin = 0xb0000000, len=0x01000000
RUN: origin = 0xB0200000, len=0x01000000
OTHER: origin = 0xe0000000, len=0x01000000
}