View previous topic :: View next topic |
Author |
Message |
benoitstjean
Joined: 30 Oct 2007 Posts: 566 Location: Ottawa, Ontario, Canada
|
PIC24EP512 Stack Size Warning |
Posted: Mon Oct 07, 2019 11:30 am |
|
|
Device: PIC24EP512GP806
Compiler: 5.026
Hi again guys,
Another question beyone my scope of understanding!
I've been using <#build stack = 1024> for the longest time but just now I've seen this message from the compiler:
>>> WARNING 202: {filename}: Stack size needs to be increased. Stack may be too small, try 1558 bytes.
So, question is should I increase it to that specific value or should I just double it and go straight to 2048?
If I increase it to 2048 warning goes away although code seems to be working as expected with 1024 although I get the warning.
Are there any inconveniences or advantages of putting directly 2048 instead of 1558?
Thanks!
Ben |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19550
|
|
Posted: Mon Oct 07, 2019 11:55 am |
|
|
None. Just more RAM used.
It does suggest you have a huge number of functions using a lot of
variables. |
|
|
benoitstjean
Joined: 30 Oct 2007 Posts: 566 Location: Ottawa, Ontario, Canada
|
|
Posted: Mon Oct 07, 2019 12:03 pm |
|
|
Ah ok thanks.
And yes indeed, it's a monster of a program.
Doubling the size from 1024 to 2048 makes my RAM usage go from 41% to 42% so really that's nothing.
Thanks again!
Ben |
|
|
|