When a section is located into a memory using a wildcard, it only locates items in that wildcard not already located. How can we locate something twice?
#LCF snippet:
.firstsection:
{
*(.mysection)
} > firstmemblock
.secondsection:
{
*(.mysection) # this does not include anything because the items have already been included elsewhere
} > secondmemblock
Thanks,
Cap
Solved! Go to Solution.
Agreed, I could not find a way either.
It was for data tables that needed to appear in multiple places given some would be modified at runtime in flash. It was mainly a convenience to only maintain one copy in the source instead of several.
solution: In the end I just made identical objects in the code in unique section names.
Thanks,
Cap
Hello Cap,
Do you want to have the same code inside the 2 memory blocks ?
I don't think there is a way to duplicate it directly in the lcf file.
I don't undertand how this could be used in an application.
Regards
Pascal
Regards
Pascal
Agreed, I could not find a way either.
It was for data tables that needed to appear in multiple places given some would be modified at runtime in flash. It was mainly a convenience to only maintain one copy in the source instead of several.
solution: In the end I just made identical objects in the code in unique section names.
Thanks,
Cap
Cap,
we have a process using Copy ROM to RAM.
Not sure if this can help in this case.
This process is explained in the \MCU\Help\PDF\DSC_Compiler.pdf manual
Refer to 7.2.8 ROM to RAM Copying.
Regards
Pascal