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.

CCS/TMS320F28375D: GS Memory is getting initialized to different memory locations between CPUs

Part Number: TMS320F28375D


Tool/software: Code Composer Studio

I have a variable, CPU2bootComplete, that I need to be read accessible by both CPUs.  As you can see from the debugger screenshots below, each CPU recognized the variable in different RAM memory space.  Given that my data structures are the same size in my declarations, I don’t understand why this is happening.

Any idea why this is happening and what I can do to avoid it?

For CPU1 this variable is located in 0x00019541, for CPU2, 0x00019540.  Why?

CPU2 Memory Addressing

Variable declarations

  • Hi Nicholas,

    Have you checked if there are any warning during compilation?

    Also how did you define the SPU1STATUSBITS and CPU2STATUSBITS section in linker cmd file?

    Vivek Singh

  • Hi Vivek,

    No warnings. I had multiple variables declared under one memory boundary in the linker command file. I had assumed that they should be allocated in the same way for each processor, but it seems like maybe not.

    I made a change: I put the variables in a struct to ensure they are allocated the same between the two processors and it seems to be working. Can I get confirmation that this is true? Could point me to any documentation on this?

    Thanks,
    Nick

  • Hi,

    I made a change: I put the variables in a struct to ensure they are allocated the same between the two processors and it seems to be working. 

    This is right way to ensure same address assuming struct is placed in section which has same length as struct. If you have multiple variable in same section, same address on two different compile can not be guaranteed.

    Regards,

    Vivek Singh