This effectively reverts the change that introduced this new constant.
The reason is so that users do not need to rebuild the filesystem on
their modules when upgrading the firmware.
Users can change RESERVED_SECS by hand if they need the feature, and in
future firmware it may default to a non-zero value.
This code is no longer pertinent for some time - since switchover to
SDK2.0, there must be correct flash size set for bootloader, or there's
a risk of flash data corruption. And indeed, the correct flash size is
by default auto-detected by esptool.py 1.2.
Starting at esp.flash_user_start(), the reserved sectors are for general
purpose use, for example for native code generation. There is currently
one sector reserved as such.
Previously, it was included only in release builds, but it's important
tool which should be always at the fingertips to be useful (and to
pump up its usage).
As we're looking towards adding OTA support, calculation of a FlashROM
area which can be used for filesystem (etc.) may become complex, so
introduce C function for that. So far it just hardcodes current value,
0x90000. In the future the function may be extended (and renamed) to
return the size of area too.
The OneWire class is now in its own onewire.py module, and the temperature
sensor class is in its own ds18x20.py module. The latter is renamed to
DS18X20 to reflect the fact that it will support both the "S" and "B"
variants of the device.
These files are moved to the modules/ subdirectory to take advantage of
frozen bytecode.
The idea behind decrease is: bytecode and other static data is also kept on
heap, and can easily become half of heap, then setting threshold to half of
heap will have null effect - GC will happen on complete heap exhaustion like
before. But exactly in such config maintaining heap defragmented is very
important, so lower threshold to accommodate that.
To start with, the critical scripts _boot.py and flashbdev.py are frozen
to improve performance and reduce RAM consumption.
Saves about 1000 bytes of heap RAM for a bare boot with filesystem.