2016-07-02 17:20:13 +01:00
|
|
|
import gc
|
2016-07-23 11:56:24 +01:00
|
|
|
gc.threshold((gc.mem_free() + gc.mem_alloc()) // 4)
|
esp8266: Add Python modules for initial configuration.
Main entry point is _boot.py which checks whether FAT FS in flash mountable,
and if so, mounts it. Otherwise, it checks if flash is empty, and if so,
performs initial module setup: makes FAT FS, configures default AP name,
etc. As a last option, if flash is not empty, and could not be mounted,
it means filesystem corruption, and warning message with instructions is
printed in an infinite loop.
2016-04-11 22:37:04 +01:00
|
|
|
import uos
|
|
|
|
from flashbdev import bdev
|
|
|
|
|
|
|
|
try:
|
2016-04-18 15:14:00 +01:00
|
|
|
if bdev:
|
2017-03-10 06:14:21 +00:00
|
|
|
uos.mount(bdev, '/')
|
esp8266: Add Python modules for initial configuration.
Main entry point is _boot.py which checks whether FAT FS in flash mountable,
and if so, mounts it. Otherwise, it checks if flash is empty, and if so,
performs initial module setup: makes FAT FS, configures default AP name,
etc. As a last option, if flash is not empty, and could not be mounted,
it means filesystem corruption, and warning message with instructions is
printed in an infinite loop.
2016-04-11 22:37:04 +01:00
|
|
|
except OSError:
|
|
|
|
import inisetup
|
2017-05-26 08:05:58 +01:00
|
|
|
inisetup.setup()
|
2016-07-02 17:20:13 +01:00
|
|
|
|
|
|
|
gc.collect()
|