This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

how to set heap base and limit

Hi,

I am using keil uVision4 and working on ARM7 processor. I want to know how can we set values for __heap_base and __heap_limit. I have seen these parameters in startup.s file but I could n't find where the definitions have been given. Also what can be the maximum size that we can set for heap. Also I have another question. Its a basic question, please dont mind because Iam new to ARM7 and keil. When I run the code I get the following message in output window

Program Size: Code=3874 RO-data=98 RW-data=12 ZI-data=1292

Code size means size of the code we wrote. That is fine

What does RO-data and ZI-data correspond to and how can we determine what is the maximum RAM that my application needs from the above statement

Thanks in advance

Parents Reply Children
  • const variables are not allowed to be changed. So they are read-only, and can be stored in flash instead of RAM. So it's important for the linker to separate the information about read-only and read/write variables.

    The oneliner you see at end of linking is just a quick summary. Best way to figure out the memory consumption is by looking at the map file (which you have to manually turn on the generation of in the project settings). The map file doesn't just tell how much flash an RAM the project consumes. It also tells what is consuming space, and where everything is stored.