# esp-idf-size

In the field of IoT development, memory constraints are a common challenge,
often requiring developers to optimize their application size. Whether it
involves ensuring the firmware fits within available flash memory or analyzing
impact of code changes on the final  binary size, effective firmware size
management is essential for resource efficiency.  The esp-idf-size tool
provides developers with the means to explore statically allocated RAM used by
the final binary firmware image generated by
[ESP-IDF](https://github.com/espressif/esp-idf) SDK for Espressif devices.

The `esp-idf-size` tool is included in the ESP-IDF and is installed
automatically. It can be accessed using the `idf.py` command or the
`idf_size.py` wrapper. The `idf.py` command provides access to the most
commonly used `esp-idf-size` commands and automatically sets some options for
user convenience, while the `idf_size.py` wrapper allows full access to all
`esp-idf-size` features. For more information on using `esp-idf-size` in
ESP-IDF, please refer to
[Minimizing Binary Size](https://docs.espressif.com/projects/esp-idf/en/stable/api-guides/performance/size.html).


Starting from version 2.0.0, `esp-idf-size` uses the new generation (NG) 
implementation by default, providing improved performance and additional features
compared to the legacy version.

**Breaking Changes in v2.0.0:**
- The new generation functionality is now the default behavior
- Legacy `--ng` flag and `ESP_IDF_SIZE_NG` environment variable are no longer needed
- Output formats may differ from the legacy version (`json` vs `json2`)

**Migration Guide:**
- Remove `--ng` flags from your commands - the new functionality is now default
- Update any imports from `esp_idf_size.ng` to `esp_idf_size`
- Review and update any scripts that parse the output format

For more detailed information about the available features and options, please refer to the
documentation available [here](esp_idf_size/docs/readme.md).
