[fpc-devel] AVR HeapSize and StackSize
Florian Klämpfl
florian at freepascal.org
Sat Mar 23 20:37:14 CET 2019
Am 23.03.2019 um 11:52 schrieb Dimitrios Chr. Ioannidis via fpc-devel:
> Hi,
>
> I'm using the heapmgr unit and, for the atmega328p, AFAIU the default heap size is 80 bytes. Cause it's too small for
> my needs, I changed to 512 bytes ( -Ch512 ). But now I'm worrying for the stack and heap collision.
>
> Can anybody know any resources, docs regarding FPC stack and heap management for the AVR platform ? Any hints, tools ?
The sources ;) For the embedded targets, the stack grows downward from the highest ram address. So set a suitable stack
size so you do not exceed total memory, test with stack checking on, then you should be fine.
More information about the fpc-devel
mailing list