Reduce mem footprint of ESP.getResetInfo() by dirkmueller · Pull Request #7030 · esp8266/Arduino (original) (raw)

This function has excessively long datastrings that can
better be stored in flash, reducing runtime memory footprint.

Also detailed formatting only makes sense when there is an
exception or a watchdog. In other cases instead of printing
an unhelpful "flag: 0" we can just return the ResetReason, which
is much more readable.

Saves about 120 bytes of (data) memory.