This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Issue with retain linker option for sections

Other Parts Discussed in Thread: SYSBIOS

Hello everyone,

Target is C6678, compiler is 7.4.11, SYSBIOS is used.

In my rtos config file I have

Program.sectMap[".DDR3appli"]                 = "DDR3";

I have a C file which defines variables like this  :

#pragma SET_DATA_SECTION(".DDR3appli")

int mydata;
short mydata2;

#pragma SET_DATA_SECTION()

This file is compiled (along other files) for each core of the DSP (8 in total)

Note that some cores DO NOT use mydata or mydata2.

As these variables are in shared memory we still want these cores to know that these variables exist in shared memory (for use by other cores).

When linking for each core we use the --retain=.DDR3appli option.

Unfortunately when we look at the memory map of the cores that DO NOT use mydata or mydata2, they don't have these 2 symbols mapped, despite the "retain" instruction.

Regards,
Clement