MoonModules / WLED

Control WS2812B and many more types of digital RGB LEDs with an ESP8266 or ESP32 over WiFi! MoonModules adds features on top of upstream.
https://mm.kno.wled.ge
GNU General Public License v3.0
202 stars 64 forks source link

Custom Arduino Build to save on code size? #136

Open DedeHai opened 3 months ago

DedeHai commented 3 months ago

@softhack007 we recently had a quick discussion in discord about reducing code size as there seem to be many options, described here: https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-guides/performance/size.html

this is however using the Espressif IDF and not the arduino platform. There is the option to custom compile the arduino platform: https://community.platformio.org/t/using-arduino-framework-point-to-custom-sdkconfig-h-file/12622/3 https://github.com/espressif/esp32-arduino-lib-builder

is this something you are aware of already?

softhack007 commented 3 months ago

Hi @DedeHai, I've seen your message - right now I'm busy with getting a new WLEDMM release ready. I'll come back to the topic afterwards.

Actually, I have no experience with using ESP-IDF 'kconfig' for creating a custom IDF component for arduino-esp32. Just I would be careful about this, because it's very easy to drop a component that might later be needed in some usermod.

About making "LTO" the default for compiling - i have played with it some time ago; it does help, however I see some potentially problematic areas: