Is there any way to keep the memory allocation in the linker command file in sync with the memory ownership registers of a c28x?
MemCfgRegs.GSxMSEL.bit.MSEL_GS0 = 1/0;
MemCfgRegs.LSxMSEL.bit.MSEL_LS0 = 1/0
MemCfgRegs.LSxCLAPGM.bit.CLAPGM_LS0 = 1/0;
My understanding is I will need to adjust my *.cmd file to allocate the memory that each CPU uses in the GSxMSEL but I also must then set the bit as shown above when CPU1 starts up to allow each CPU access to that memory. In essence if I didn't then the default power on state would determine ownership of the memory, and no matter what I put in my linker command file, the other processors wouldn't be able to write to that memory.
As such this creates a double update in coding... ie: I must change the same thing in two places, I must update how I allocate the memory in the linker cmd file, then I must in a different piece of code update the registers that assign the ownership.
Ideally in code we only update things in one place to avoid errors, at best I can put a comment in each place telling it about the other place they need to make an update.
Is there anyway to 'automate' this procedure? (fingers crossed)