I guess i am not the first to get this . We have a pcb with atmega328p .
Global variables use 1,553 bytes (75%) of dynamic memory, leaving 495 bytes for local variables. Maximum is 2,048 bytes.
I will have to free up memory, and hence to understand a few things ,before showing my code.
1.I dont have many global variables, but i do have many arrays INSIDE functions , what i know is that these arrays are "dead" when function is ended. Is that right ? should i put some efforts on reducing these vars also ? are they effect my program ?
2.Is there any tool for the IDE, to show me where is my main consumption and how can i improve it ?
3.May be sound stupid, but lets say i used my vars space wisely, and yet i dont have enough room, my only option would be external memory or another chip ?
- I have many #defines in the code, are they take memory ? i know they dont. .is it wrong ?
thanks a lot .