I am using MPC5777C controller and T32 Debugger. In my source code there are several global variables and below are the test scenarios explaining the problem.
Test case 1 : If the Global variables are initialized on code(to be specific "initialized/.data"section of SRAM Address Range 2). So whenever I FULL RUN the code after flashing it shows the Garbage value, if i run it in the Debug mode (means with break at random times/functions,eg case: that global variable can store the return value from a function) then the value is correct/ initialized value.
Test case 2 : If the Global variables are uninitialized on the code (to be specific "uninitialized/.bss"section of SRAM Address Range 2), then the no problem exist.
Can anyone please let me know is it something to do with the SRAM settings or Section mapping?
Test case 3 :Also if i move//Map those variables to Address Range 0 then no problem exists.
MPC5777C System RAM/SRAM Details :
Address Range 0 : 0x4000_0000–0x4000_FFFF Standby SRAM on XBAR Slave Port 2 (64 KB)
Address Range 1: 0x4001_0000–0x4003_FFFF SRAM on XBAR Slave Port 2 (192 KB)
Address Range 2: 0x4004_0000–0x4007_FFFF SRAM on XBAR Slave Port 4 (256 KB)
Thanks in advance!!