As the image shown that a small Arduino test code (board config: Mega2560) consumes a large flash (10%) and ram (51%) usage after compilation, is there anything I missed? Thanks in advance for any hints.
Here is the code
testRotary.ino:
#include <a.h>
void setup()
{
int a = 0;
}
void loop()
{
int b = 1;
}
and a.h is just an empty file existed in somewhere that the path Arduino can include as libraries.
What happens if you don’t include a.h ? What’s in there ?
Side note:
Please never post a picture of text again. Just post text using code tags (for the code and compiler message ). please read How to get the best out of this forum
Sketch uses 662 bytes (0%) of program storage space. Maximum is 253952 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 8183 bytes for local variables. Maximum is 8192 bytes.
Is a a true library or is it in the same directory as your .ino file?
You could try #include "a.h"
There might be somewhere in the search path another a.h....
Maybe such a short name is not a good idea...
@joneschung
Why did you decide that the code is small? Everything that is in the file included by the #include directive is also a part of the code. Maybe you have 10 thousand lines of code there - that's how the size of the firmware turns out