From db80c0ed4678f4bacc6c7c9b67cbf26846fc21be Mon Sep 17 00:00:00 2001 From: Damien George Date: Wed, 11 May 2016 16:57:29 +0100 Subject: 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. --- esp8266/modules/_boot.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 esp8266/modules/_boot.py (limited to 'esp8266/modules/_boot.py') 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() -- cgit v1.2.3