You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The size of our binary is creeping up. With addition of vehicle occupancy the binary is now over 90% of available space.
So I investigated whether we can tell Arduino / ESP not to compile pieces we don't use... in other words use menuconfig to configure what components we want. It turns out that Arduino framework defaults to a pre-compiled default ESP32 framework. To change that we can add a sdkconfig.defaults file and make minor tweaks to platform.ini. There is an example here.
I have tried this and modified the example sdkconfig to this...
CONFIG_AUTOSTART_ARDUINO=y
# CONFIG_WS2812_LED_ENABLE is not set
CONFIG_FREERTOS_HZ=1000
CONFIG_MBEDTLS_PSK_MODES=y
CONFIG_MBEDTLS_KEY_EXCHANGE_PSK=y
CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH=y
CONFIG_ESP_HTTPS_SERVER_ENABLE=n
CONFIG_ESP_HTTP_CLIENT_ENABLE_HTTPS=n
CONFIG_ESP_INSIGHTS_TRANSPORT_HTTPS=n
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
CONFIG_LOG_COLORS=n
CONFIG_LOG_DEFAULT_LEVEL_NONE=y
I have added the necessary changes to PR #16 but it is not enabled because it adds considerable time to the builds.
In addition to the space savings, we can also enable CONFIG_FREERTOS_USE_TRACE_FACILITY which gives us the ability to monitor FreeRTOS task memory usage. But that is niche so leave disabled.
The size of our binary is creeping up. With addition of vehicle occupancy the binary is now over 90% of available space.
So I investigated whether we can tell Arduino / ESP not to compile pieces we don't use... in other words use menuconfig to configure what components we want. It turns out that Arduino framework defaults to a pre-compiled default ESP32 framework. To change that we can add a
sdkconfig.defaults
file and make minor tweaks toplatform.ini
. There is an example here.I have tried this and modified the example sdkconfig to this...
and platformio.ini to include...
and
The result of this is binary reduced by about 6% to just under 85% of available flash.
The downside to this is that builds take significantly longer, even incremental builds.
The text was updated successfully, but these errors were encountered: