I use two different µC (C505 and C164). I use the following compilers: C51: V7.06i / BL51: 5.03 C166: V4.11 / L166: 4.10 (Updates not possible. I couldn't use newer one.)
How can I get information about used RAM (IRAM, XRAM, ...)? = How much RAM do my program needed?
I know that I can use the map files. But that's complicated and not easy and not fast.
Do anybody know an other method? How could I evaluate the map file (to know how many RAM my source code needed)?
Thanks for help
That's better. The question now is what are all of the ABSOLUTEs about? Looks like you're positioning variables at fixed locations. Any particular reason for it?
It's making a lot of gaps, so the overall area of your XDATA is large:
190Ch-1100h = 080Ch bytes = 2060d bytes
How could this work? The controller only have 1kByte XRAM.
In my opinion the listed value for xdata (e.g. 2615) is NOT the realy program needed XRAM value.
But I searched the entire realy needed RAM/XRAM value for my compiled program.
This can work since the controller has an external memory bus. From looking at the User Manual of your device you will see that this is located from 0x0000 to 0xF6FF in the XDATA space.
Might be helpful for you: http://www.keil.com/dd/docs/datashts/infineon/c505c_um.pdf
All the XDATA segments that have been located absolute in that address space indicate that there is some memory mapped peripheral on the external bus, right? In that case the linker does not distinguish between veriables in real memory or on a peripheral and counts them into the used memory sum (actually it can't see the difference).
To get the real numbers and also check if all variables have been located into valid areas you will find a guide line to read the MAP here: http://www.keil.com/support/docs/2204.htm
You might also want to check the addresses against the memory map you see in the user manual.