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.

C2000WARE: Does the cpu1 linker look at a previously built cpu2 map?

Part Number: C2000WARE

The following seems to always work: the .map files show that the pointers are correctly shared between the two cpu's but I'm completely baffled how you do it? How does the cpu1 linker know to put those extern pointers into .sharedPtrs section. 

Does the linker for cpu1 look at symbols defined in cpu2 and try to match them up?  I do not have anything in my build command to point the cpu's to each other.

Voodoo !!

cpu1 main.c
extern Uint16 *CBdataProcess;
extern int16 *MB1dataProcess;
extern int16 *MB2dataProcess;

cpu1 link.cmd
.sharedPtrs : > RAMGS12, PAGE = 1

cpu2 main.c
#pragma DATA_SECTION(CBdataProcess,  ".sharedPtrs");
#pragma DATA_SECTION(MB1dataProcess, ".sharedPtrs");
#pragma DATA_SECTION(MB2dataProcess, ".sharedPtrs");
Uint16 *CBdataProcess = 0;
int16 *MB1dataProcess = 0;
int16 *MB2dataProcess = 0;

cpu2 link.cmd
.sharedPtrs : > RAMGS12, PAGE = 1

  • Hi, 

    Pls provide more details - is this a system project wherein you have projects for each cpu? 

    Or 
    Do you have separate projects for each cpu. 

    Also, let me know which tool chain are you using  - CCS version /compiler verstion and the c2000 device that you are using

    Best Regards

    Siddharth 

  • Hi Siddharth, separate projects for each Cpu. CCS version 20.3.1.5__1.9.1, TMS320F2837xD.

    I am starting to think it was coincidence. My plan for the moment is read the address from cpu_x map and hard code that in the linker for the cpu_y cmd (unless you have better advice?)

    Regards, John

  • John

    Since in both the linker command files, the sharedPtrs is getting allocated to RAMGS12, you maybe seeing this behavior. 

    But I think it's better to have the addresseses hard coded in the cpu linker command file.

    Best Regards

    Siddharth