Hi all,
I'm writing a program and until now the RO-data size wa around 2000 bytes.. Now, after some changes in the code, I saw the RO-data size is 33758 bytes... in the MAP file the compiler uses around 30000 bytes in the PAD area.. what's this?...
Thanks
The linker can add a "pad" block to fill up first RAM region before continuing to place new variables in the second RAM region.
It's most common when you have some very large variables that can't fit in one RAM region and are then moved to next region, leaving a unused hole at end of first RAM region.
Have you added any variables with absolute address, or specified that one or more source files should have their variables in a different RAM region? Or have you added one really large variable that can't fit together with all other variables in the first RAM region?
Hi,
Yes, I placed this code:
static const char VALOR_CALIBRACION __attribute__((at(0x0800FF00))) = 0;
Need to do the calibration in fabrication process. I think this PAD block is transparet for me, in other words, the compiler will change the size when I placed new code and this PAD block will not affect my code.. right?
Thanks Westermark
Exactly - the linker has basically just told you that it has skipped a lot of RAM to reach a new memory region to place variables in. So it doesn't represent wasted RAM space.
And it has given you a tip that some projects could potentially gain by strategic changes to variable placements to squeeze other things into this available hole.
Thanks for the explanation Westermark.
Why always answer all the questions? You work in Keil?