Skip to content
\n

Debug Message

\n
None, comparing output program size for different Core versions\n
\n

Other Steps to Reproduce

\n

No, just run the nullprog.ino
\ntest results speak for themselves

\n

I have checked existing issues, online documentation and the Troubleshooting Guide

\n","upvoteCount":1,"answerCount":4,"acceptedAnswer":{"@type":"Answer","text":"

I dug deep into this and here is my conclusion:

\n\n

Now with that said:

\n\n

With all of the above, I conclude that this is not a real world issue. Yes, the WiFi stack has increased in size in ESP-IDF, but we have no control over that.

","upvoteCount":1,"url":"https://github.com/espressif/arduino-esp32/discussions/11274#discussioncomment-12932553"}}}

ESP32 Huge jump in Program Size for minimal program #11274

Answered by me-no-dev
brownrb asked this question in Q&A
Discussion options

You must be logged in to vote

I dug deep into this and here is my conclusion:

  • Size increase comes from the WiFi library after the network layer refactoring in v3
  • It is present on empty sketch, because we always instantiate the WiFi object
  • This was true even before, but now we include proper destructors for the AP and STA interfaces
  • The destructors call WiFi.mode() internally, which in turn links to all low level WiFi and Netif init/deinit methods
  • Commenting out the calls to WiFi.mode() in the destructors, brings back the flash size to 300+KB

Now with that said:

  • There is no real scenario, where you will include the WiFi library, but never use it. If you will use only ETH/PPP, then include Network.h instead.
  • Any use …

Replies: 4 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@ValdayMl
Comment options

Comment options

You must be logged in to vote
3 replies
@ValdayMl
Comment options

@brownrb
Comment options

@me-no-dev
Comment options

Answer selected by me-no-dev
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #11269 on April 22, 2025 11:16.