I am working through some examples to familiarize myself with certain libraries and how the Spark Cores work. Currently, I am using the libraries for MCP23017 I/O port expander and 16x2 I2C RGB LCD found at this GitHub repository owned by @peekay123.
I am working in the web-based IDE and when I compile, I look at the Ⓘ symbol and click on it to see how my resources look. What I saw doesn’t make a whole lot of sense.
It says that I have used:
Flash used: 83872/110592 75.8%
RAM used: 10284/20480 50.2%
I looked at the GitHub and looked at the file sizes for each .cpp and .h file. These are the file sizes:
My own sketch.ino 3kb
which total 30kb.
The STM32 on the Spark Core has 128kb of Flash memory (110kb actually usable).
Why am I seeing that it is taking 2.8x the amount of space than what it should be using? I understand there is a little overhead but not at that much of a cost!