How to specify RAM location ?

hi,

i have an stm32f103 with me ,basically when i run it on keil in simulation mode , i have allotted space in RAM to store variables and data in the picture below ,and although when i look at the address where ram starts at (0x200000000), there is no data init ,good enough  ,but ,when i use my mcu with stlink debugger,run it and open the same RAM location ,there's already data stored there and after that the whole area is showing FF which i dont understand why ? i did write the RAM area in my scatter file also    ,also these pictures are with  st-link debug mode not simulation.

  • Difficult to answer without knowing the setup of your project, but the data is probably copied from Flash to RAM by the startup code. the latter code is executed by the reset handler, before jumping to your main. If you break at the reset handler adress, you should not see data already in RAM.

More questions in this forum