cancel
Showing results for 
Search instead for 
Did you mean: 

How to specify RAM location ?

Oahme.1
Associate III

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 ,

which is what i need ,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 ? does this have to do with the

scatter file ,please help me out here's my file and scatter file in assembly  ,also these picture is in stlink debug mode not simulation. Although i did define AREA mydata, data,READWRITE and a space of 10 0693W000005CMEEQA4.png0693W000005CMDuQAO.png

3 REPLIES 3

You've placed it inside the ROM Load Region, you are responsible for unpacking the data. The scatter loader usually does this for you via the call to __main which initializes the statics and then calls your code at main().

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Oahme.1
Associate III

thanks but can you point which part i did wrong , the scatter file or asm file ? i know its a mistake but i just want to move ahead from this ! ,making the peripherals and coding work is itself challenging and then you find a problem like this ...

Oahme.1
Associate III

The RAM area is named with mydata , i placed it in my ram region shown below ,even then i see random data in ram when i debug ,please correct me if im wrong