I'm having some odd behaviors while debugging a project in CCS v6.1. One such case is that there's two local variables that are assigned to the same register so when one variable changes, the other changes too. I'm not sure why it's being assigned to the same register.
Here's the code snippet when the variables are defined, this is from the CheckImageCRC32 function within the bl_crc32.c file:
uint32_t ui32Loop, ui32FlashSize, ui32CRC;
And here's the image showing that two of these variables, ui32CRC and ui32FlashSize, are stored in the same register:
Another interesting behavior I'm seeing while debugging is that the code jumps from line to line at times, it's not executing in the sequential order that I was expecting as I'm stepping through the code. There will be times it would jump back up a few lines and then jump back to the line I was expecting to be executed.
Is there something incorrectly configured on my setup that's causing this, either in the compiler or the linking?
Thanks!