Hi,
I try to write a application where I have to copy three different algorithms in the RAM, to safe RAM I like to use UNION's to allocate the RAM three times.
Each algo consists out of different functions, one function will be used in two algos.
I wrote the following LCF, which works:
UNION : run=RAM
{
GROUP : table(__SetActiveBank_Table), load=FLASH0
{
.text:Fapi_setActiveFlashBank : {} palign=8
.text:_scaleEEFclk : {} palign=8
.text:_scaleMainFclk : {} palign=8
}
GROUP :
{
UNION :
{
GROUP : load=FLASH0, table(__ProgrammFlash_Table)
{
.flashBytesWithEcc : {} palign=8
.text:Fapi_issueProgrammingCommand : {} palign=8
.text:Fapi_calculateEcc : {} palign=8
}
GROUP : table(__EraseSector_Table), load=FLASH0
{
.flashEraseSector : {} palign=8
.text:Fapi_issueAsyncCommandWithAddress : {} palign=8
}
}
.text:_Fapi_issueFsmCommand : {} palign=8, load=FLASH0, table(__issueFsmCommand_Table)
}
}
Then I tried to get rid of the copy TABLE(__issueFsmCommand_) and replaced it by table(__ProgrammFlash_Table), table(__EraseSector_Table).
Now the Linker gives me the following warnings:
"../sys_link.cmd", line 96: warning #10110-D: table(__EraseSector_Table)
operator ignored: table(__EraseSector_Table) has already been applied to a
section in the UNION "UNION_1" in which ".text:_Fapi_issueFsmCommand" is a
descendant
"../sys_link.cmd", line 96: warning #10110-D: table(__ProgrammFlash_Table)
operator ignored: table(__ProgrammFlash_Table) has already been applied to
a section in the UNION "UNION_1" in which ".text:_Fapi_issueFsmCommand" is a
descendant
And the resulting tables don't contain: .text:_Fapi_issueFsmCommand
Combining these would help to make the application less complex as it would save some calls of copy_in().
Is there a reason why I can't combine a GROUP member and UNION members in one COPY table, or is this a bug?
Thanks,
Christian