I’m trying to replicate the feature of the Web IDE where it shows you flash and ram usage into po-util.
Example (photon):
text data bss dec hex
5068 8 1528 6604 19
In a nutshell:
Flash used 5076 / 110592 4.6 %
RAM used 1536 / 20480 7.5 %
I realize that Flash is text + data, and RAM is bss + data, but what is the maximum Flash and RAM for each Particle Device? (photon, P1, electron, core, duo, pi)
I wouldn’t actually replicate the feature of the Web IDE, because it’s wrong. Those are the maximum values for the Spark Core, regardless of the device you have selected.
You can go over 100% of flash by a bit, fairly close to the 128K limit, I think. You can go way over the RAM limit, probably to around 60K, but I don’t have the exact numbers. They vary a bit depending on system firmware version.
@nrobinson2000, this came up in another topic. Here is what I know:
I had a discussion with some of the Particle folks the other day and we did some testing. With the latest firmware version (0.7.0) which gets compiled with gcc v5.3.1, there is an overhead of approx. 3KB on any user app (4KB on previous versions). So with 128KB of user flash, that leaves about 125KB or 128,000 bytes. As for RAM, there should be at least 60KB available to the user.
Note that this is context of the Photon and Electron. The Web IDE estimates are correct for the Core.