Esp32 and mega flash memory comparison issue

FOR A SKETCH WITH SAME FUNCTION THE ARDUINO MEGA SHOW THE CAPACITY LIKE THIS

Sketch uses 8844 bytes (3%) of program storage space. Maximum is 253952 bytes.
Global variables use 746 bytes (9%) of dynamic memory, leaving 7446 bytes for local variables. Max

FOR THE SAME SKETCH WITH ESP32 IT SHOWS LIKE

Sketch uses 286797 bytes (21%) of program storage space. Maximum is 1310720 bytes.
Global variables use 22656 bytes (6%) of dynamic memory, leaving 305024 bytes for local variables.

Mega has a flash memory of 256kB
esp32 has 4MB

then why ESP32 shows 21% occupied and MEGA is only 3%

Mutually Opposite ??
Why ??

I believe it is the way the esp32 flash has been partitioned when using the arduino esp32 core default partition scheme.

  • from factory, i believe only a small amount of memory is allocated for your code/firmware and a large amount of the advertised memory is set aside for other things??? What the other things are… im not sure

You can change the partition under tools/partition scheme BUT I would read and educate yourself before doing this or even better… hopefully the helpful arduino team reps will point you to a good link or two :wink::+1:t3:

Wish i could provide more detail! LOL

From there comes 21%

To have the 4MB free of flash you must disable OTA and FFS/SPIFF.

Regards

O that is really a nice info all the way

Ya please get me more details to sort out the issue!

Thanks :blush:

I see . . its the reason behind !!

How to disable that ?
Anything I need to add within code or need to make changes in hardware part

Please make a small brief for me as I am totally new with the ESP model
Thanks !!

This shows the board is not an Arduino Nano ESP32 (on it, the max program size is 3MB), so this should be moved to a different section of the Forum.


You are comparing apples to oranges, and this can be misleading. On the ESP32, even the most basic blink sketch is "big" because it includes and an operating system with multitasking and multicore support, which is what enables you to use Wi-Fi and/or Bluetooth. The Mega had none of that :wink:

Still, I'm not sure what the issue is. You still have more than one megabyte of free program memory, which is a lot. What kind of program does not fit in there?

I moved your topic to a more appropriate forum category @King_RAJ_Enters.

The Nano ESP32 category you chose is only used for discussions directly related to the Arduino Nano ESP32 board.

In the future, please take the time to pick the forum category that best suits the subject of your question. There is an "About the _____ category" topic at the top of each category that explains its purpose.

Thanks in advance for your cooperation.

Why ?

If the programs you want to run, and do run, and have heaps of free space, why be worried ?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.