Tool/software:
Hi all,
I have a software which has multiple work modes.
The code uses either CPU and CLA. As the CLA part is splitted in many functions which I use according the current working mode.
But memory available for CLA is constrained (only LS space), I would like to know if it is possible to define an overlay?
As I only use a couple of CLA function in each configuration, the idea is to load the corresponding functions for the actual working mode.
My CLA function are named as follow:y
- CLA1ModeA_xxxx : all CLA functions used for mode A
- CLA1ModeB_xxxx : all CLA functions used for mode B
- etc.
My CLA sections are defined as follow in the linker file:
Cla1Prog : LOAD = FLASHG,
RUN = RAMLS1_5,
LOAD_START(_Cla1funcsLoadStart),
LOAD_END(_Cla1funcsLoadEnd),
RUN_START(_Cla1funcsRunStart),
LOAD_SIZE(_Cla1funcsLoadSize),
PAGE = 0, ALIGN(4)
CLAscratch :
{ *.obj(CLAscratch)
. += CLA_SCRATCHPAD_SIZE;
*.obj(CLAscratch_end) } > RAMLS0, PAGE = 1
.scratchpad : > RAMLS0, PAGE = 1
.bss_cla : > RAMLS0, PAGE = 1
.const_cla : LOAD = FLASHG,
RUN = RAMLS0,
RUN_START(_Cla1ConstRunStart),
LOAD_START(_Cla1ConstLoadStart),
LOAD_SIZE(_Cla1ConstLoadSize),
PAGE = 1
How do I have to change this to use overlay with UNION and GROUP?
UNION
{
GROUP
{
???
} load = FLASHG, LOAD_START(_taskA_load_start), SIZE(_taskA_size)
GROUP
{
???
} load = FLASHG, LOAD_START(_taskB_load_start), SIZE(_taskB_size)
} run = RAMLS1_5, RUN_START(_task_run_start)
Thanks for any help.
Best regards
Fabrice