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.

TMS320F28379D: program crashing depending on which RAM .stack is stored in?

Part Number: TMS320F28379D
Other Parts Discussed in Thread: C2000WARE

Hello, 

I am seeing some strange behavior with the stack memory allocation and can't find many resources describing the behavior of the stack or stack pointer that might be causing it. My .cmd file allocates .stack and .ebss to RAMM or RAMD as shown below:

   .stack              : >	RAMM | RAMD,		PAGE = 1
   .ebss               : >	RAMM | RAMD,		PAGE = 1

The stack size is 0x200 which should be able to fit in either RAMM or RAMD.

My program was working fine until I added a new class which increased the size of .ebss. Before I added the class, .ebss was placed into RAMM and .stack was placed into RAMD and everything worked fine. After adding the class, .ebss increased and thus the new memory allocations flipped with .ebss placed into RAMD and .stack placed into RAMM which causes the program to crash. If I force .stack to also be placed into RAMD then the program starts working again. Does anyone know why this would be happening or be able to provide me some resources about the stack and stack pointer that would help me find an explanation?

Thanks!