Direct access to a few ESP-IDF details. This module should not include any functionality that could be implemented by other frameworks. It should only include ESP-IDF specific things.


Return the total size of the ESP-IDF, which includes the CircuitPython heap.


Return total free memory in the ESP-IDF heap.


Return the size of largest free memory block in the ESP-IDF heap.


Erase all data in the non-volatile storage (nvs), including data stored by with microcontroller.nvm

This is necessary when upgrading from CircuitPython 6.3.0 or earlier to CircuitPython 7.0.0, because the layout of data in nvs has changed. The old data will be lost when you perform this operation.

exception espidf.IDFError

Bases: OSError

Raised for certain generic ESP IDF errors.

Initialize self. See help(type(self)) for accurate signature.

exception espidf.MemoryError

Bases: MemoryError

Raised when an ESP IDF memory allocation fails.

Initialize self. See help(type(self)) for accurate signature.