Cost in memory and my wallet

Having completed a project which might be wanted by others, I’m looking into OTA to provide updates. So I need an idea of how much code and data space I need available in an ESP32 (WRover if it matters) project to be able to implement the Blynk OTA system. For example, one reasonably complete project/sketch currently uses 1110589 bytes (84%) of program storage space. (Maximum is 1310720 bytes). Global variables use 62220 bytes (18%) of dynamic memory, leaving 265460 bytes for local variables. (Maximum is 327680 bytes.) . In such a case would adding Blynk be (1) no problem at all, plenty of room (2) I’ll have to restructure the sketch a lot to free up at least “n” bytes, or (3) No way! Forget about adding Blynk to this beast.

As a side point, perusing your website I didn’t see much in the way of adding Blynk without it costing $599 / month. Hopefully I’ve missed some obvious price point for retired hobbiests just getting started with ESP. Thanks!

I’m a bit confused. Is the only reason that you want to use Blynk is so that you can use the Blynk.Air OTA system?
If so, it seems a bit of a waste of Blynk’s other functionality, and an expensive way to add OTA.

The memory usage stats will vary depending on the partition scheme you use. The ESP32 core comes with some pre-defined schemes, but you can define others if you wish.

If you want to use Blynk commercially then you need the PRO subscription as a minimum. This costs $49 per month for 40 devices with the option to add more devices for an increased subscription.


Yes… remote updating of code is my main initial desire. I think I saw a free option which I was hoping would be enough to test. Maybe not? I’m also not aware yet about partitioning options, so I must be using a pre-defined scheme. And if the compile report is correct on the project I was hoping to test with, it currently has 200,131 remaining. So I figured it would be good to know if that was enough space.

Yes, the free option has fully functional Blynk.Air for a couple of devices.

I tepees on the patio I h scheme you’ve chosen.
If you’re using ESP32 core version 2.0.13 you should see partition scheme options like this…

as you can see, it depends on how much program and OTA space you allocate.
If you choose the highlighted option you should be fine.


1 Like

You need to test it.
If your sketch already uses WiFi, SSL, and other components - you should be good, the Blynk itself is rather small.
And yes, the default partitioning scheme is sub-optimal. We recommend shrinking SPIFFS to 512 Kb (or smaller)

Ah yes… that was just the option I wanted to try (Minimal Spiffs, (1.9MB app with OTA/190 KB spiffs). With that option checked, the sketch I am hoping to try this with only uses 56% of program storage space. As far as SPIFFS go, I never used them, but I do use the EEPROM library. As a C/C++ programmer, it always seemed easier to (and less overhead) to simple put all my configuration in a data structure and move the whole thing to flash (or eeprom depending on the platform). But so far I’ve never even exceeded 1K for any of my configuration data structures.

But anyway, to your point @vshymanskyy, the ketch already uses wifi, and also whatever protocols are pulled in to handle ntp time sync, so its likely some of what is needed is already there. And with the above partition scheme suggested by @PeteKnight , the sketch compiles with 855kb left. So hopefully that will be enough for any OTA scheme.

Anyway thanks guys. Looks like this will be doable!

Also, Blynk itself does not use SPIFFS or LittleFS, you can eliminate this partition completely if needed.

Thanks for that. I do use the EEPROM.h library, to store a C data structure of configurable items. I never use even a full 1K, but do any of those file systems use the sape space used by the EEPROM library? I believe the library automatically handles flash and eeprom the same from the coder’s point of view, but I thin in the esp32 its actually using eeprom. But anyway, no conflict if I used a partition that completely removed the SPIFFS area?

No, ESP32 does not use SPIFFS partition for EEPROM storage.
It also doesn’t have true EEPROM.
What it does, it puts EEPROM data inside NVS partition.
See here:

1 Like