Part Number: TMS320F28377S
Tool/software: Code Composer Studio
I got an issue with optimization of the compiler:
mem = (SBLOCK_t *)((memblocks->memoryAddress + memblocks->size));
mem->memoryAddress = 10;
The problem is mem->memoryAddress(uint32_t) is not allocated. When it is uint16_t is works fine.
After hours disassemble I think I found the problem:
The compiler is re arranging this line of code. The problem with that is that mem->memoryAddress is unknown before mem is allocated.
So How do I prevent this from happening? So how do I force the compiler to allocate mem before continue.
Thanks