Is there any a way to determine how much ram/memory is being consumed by the entire project in keil uVision?
It looks like the program is using memory/addresses beyond the certain range allocated so I need to compute certain things.
Also, is there any profiler for ARM embedded systems (C++)?
Thanks for the response.
I am not using new or malloc so I guess I shouldn't be concerned about heap size. Just to be sure, startup.s file states the stack size of the program or what we have in total? According to the startup.s file, Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>. Is number of bytes stated in hexadecimal here 'cause usually it's a numeric value.
Just below that, it also states Stack_Size EQU 0x00000400. So I am not sure which one is which.
I couldn't find .MAP file in my project. :/
There may be a possibility that stack is getting full which is why it's putting out garbage.
Hello Huzaifa,
The startup defines the amount of stack available to the ARM C/C++ library, during startup, rather than any total RAM usage.
For a map file, go to Project => Options for Target => Listing tab => Linker Listing. Enable this option.
Have you looked in the code yet to find where the issue starts?
Thanks, Zack
Stack_Size EQU 0x00000400 ; Make this bigger, evaluate how much you use
The former reference is for the "wizard view"
The .MAP should be in the output directory, as I recall you can double click the top of the project to have it loaded.
Thanks for the response. Right so is it Stack Size (in Bytes) <0x0-0xFFFFFFFF:8> or Stack_Size EQU 0x00000400?
Also, if this is the available stack, how do I determine how much is being used by my program because that will help me determine if things are going beyond the limit or not.
I did debug my code, and I can't seem to find an issue. I mean as I continue to step in, it outputs as expected except for a few of them. If add even more variables, everything will be messed up (filled with random characters).
Below is just a simple representation (to give you an idea) of the outputs
a = 10
b = 100
è, ë 4 d, ë
d = 5
I forgot to include that Linker Listing is already marked. How do I access .map file?
So this is the stack size -> 0x00000400 ?
Is .map file a notepad file with the same name as the project inside Listings folder?
I found this inside the file; is this relevant?
Memory Map of the image
Image Entry point : 0x08000195
Load Region LR_IROM1 (Base: 0x08000000, Size: 0x00007738, Max: 0x00080000, ABSOLUTE)
Execution Region ER_IROM1 (Base: 0x08000000, Size: 0x00007724, Max: 0x00080000, ABSOLUTE)