summaryrefslogtreecommitdiffstatshomepage
path: root/esp8266/modules/_boot.py
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2016-05-11 16:57:29 +0100
committerDamien George <damien.p.george@gmail.com>2016-06-29 13:59:19 +0100
commitdb80c0ed4678f4bacc6c7c9b67cbf26846fc21be (patch)
treee791f46f5b23eba79ff6e1eaa4a6383264faddd4 /esp8266/modules/_boot.py
parentb9e3fde21a1de61c69e283ab7d756297655a2496 (diff)
downloadmicropython-db80c0ed4678f4bacc6c7c9b67cbf26846fc21be.tar.gz
micropython-db80c0ed4678f4bacc6c7c9b67cbf26846fc21be.zip
esp8266: Enable frozen bytecode, with scripts in modules/ subdir.
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.
Diffstat (limited to 'esp8266/modules/_boot.py')
-rw-r--r--esp8266/modules/_boot.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/esp8266/modules/_boot.py b/esp8266/modules/_boot.py
new file mode 100644
index 0000000000..c950de6758
--- /dev/null
+++ b/esp8266/modules/_boot.py
@@ -0,0 +1,9 @@
+import uos
+from flashbdev import bdev
+
+try:
+ if bdev:
+ vfs = uos.VfsFat(bdev, "")
+except OSError:
+ import inisetup
+ vfs = inisetup.setup()