AnsweredAssumed Answered

RAM usage when transposing code from LP1768 to LPC1837

Question asked by René Brunier on Sep 14, 2018
Latest reply on Sep 17, 2018 by René Brunier

Hi All,


Because of RAM limitation, I'm transposing my code from a LPC1768 to a LPC1837.

On LPC1768, I was using CMSISv2p00_LPC17xx and RDB1768cmsis2_usbstack libraries.

Code size=321kb, ram 31kb very close to the max 32k available (upper bank, aka RAM2, is already used for Heap and Stack).

Here after extract from map file:

objects size

RAM usage

My initial plan was to increase ram availability by using a LPC1837. So I bought an evaluation board and start source code migration, using LPC_Open library.

Code size is now 405kb and ram usage is 53k ! In order to be able to load the code in the evaluation board, I did revisit the RAM mapping and allocate the RamLoc32 at location 0x20000000 so that I can get a contiguous RAM block of  64k (not sure it is a good idea by the way ??). And therefore, I locate Heap and Stack at location 0x10080000.


Here after extract from map file:

objects size (slight increase in size even for the same source code)

RAM usage (high increase in needs):


Global RAM usage for application code is very similar (0x6d24 instead of 0x6c84), but why is .bss section starting at ....006180 instead of ....000de8. This difference (21k) can almost explains why there is so much RAM required.


I there something I'm missing ?

What is this "reserved"  area for ?

How can I decrease this request ?



Thank's for the support