• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

ESP32 bloatware – OTA webserver

Q&A Forum › Category: ESP32 › ESP32 bloatware – OTA webserver
0 Vote Up Vote Down
Bernie asked 4 years ago

1-  When compiling Blink for a Mega, the upload is 20 KB.  For the ESP32, the Blink upload (uncompressed) is 240 KB.  And the compile and uploading are proportionally that much slower too.

Now I understand that the firmware gets re-flashed everytime you upload.  If Blink and the libraries are 8 KB, and thus the firmware for the Mega is 12 KB, then the firmware for the ESP32 is approximately 230 KB. This does not sound right.  So what is all this bloatware in an ESP32 upload and how can it be eliminated?

The upload for OTA webserver is 800 KB!  Doesn’t leave much room for the code.

2- Is there a way to make the ESP32 call a function right before it reboots or uploads, to do some housecleaning or EEPROM saving?

3- What is Examples -> ArduinoOTA -> BasicOTA ?

Question Tags: ESP32
3 Answers
1 Vote Up Vote Down
Best Answer
Sara Santos Staff answered 4 years ago

Hi.
 
When you use OTA, it creates a partition with a fixed size of 8kB to handle over-the-air updates. You still have space for code.
 
I think this article explains well how partitions work: https://blog.espressif.com/how-to-use-custom-partition-tables-on-esp32-69c0f3fa89c8
 
The basic OTA example uploads code over the air via Arduino IDE, without the need for a web server.
 
Regards,
Sara
 

1 Vote Up Vote Down
Steve Mercer answered 4 years ago

My guess is the ESP32 base includes all of the libraries required for all of the peripherals on board (ie. WiFi, Bluetooth etc) whereas the mega has no such peripherals.

You could try recompiling the base ESP32 removing all of the code it uses for those items OR try adding all of those libraries to the mega blink code and see how large it is.

Take a look at the documentation (Especially the API reference) and GitHub to see all of the included code of the ESP32.

0 Vote Up Vote Down
Bernie answered 4 years ago

Hi Steve.  The blink code is 6 lines and only calls pinmode() and digitalwrite().  20K on Mega and 230K on ESP32 DOIT dev V1.

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [eBook Updated] Learn Raspberry Pi Pico/Pico W with MicroPython eBook – Version 1.2 May 26, 2025
  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.