NRF - Frozen Modules not Available in REPL
3 Files in freeze folder, sh.py and flashbdev.py and symbolic links.
freeze % ls -all
-rwxrwxrwx 1 pac staff 118 5 січ 21:18 flashbdev.py
-rwxrwxrwx 1 pac staff 1463 7 кві 2019 sh.py
-rwxrwxrwx 1 pac staff 63 5 січ 21:18 test.py
Frozen Folder is called during make and all 3 are built with MPY:
make -j8 BOARD=holyiot_18010 SD=s140 FROZEN_MPY_DIR=freeze MICROPY_FATFS=1
Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity.
Warning: FROZEN_MPY_DIR is deprecated in favour of FROZEN_MANIFEST
.....
mkdir -p build-holyiot_18010-s140/py/
MPY freeze/test.py
MPY freeze/sh.py
MPY freeze/flashbdev.py
Create build-holyiot_18010-s140/pins_gen.c
But my 2 symbolic linked files not available in REPL:
>>> help('modules')
__main__ machine test uos
ble math time ustruct
board micropython uarray utime
builtins random ubluepy
gc sys ucollections
Plus any modules on the filesystem
Creating a directory named same as already frozen module makes the frozen module inaccessible.
I made my own firmware (1.21.0) with frozen module (just folder frozened with package("utils", base_path="/project/frozen")) named 'utils' with some py-files.
It works ok until i not upload new file 'newfile.py' that was not frozened, to folder 'utils'. Like 'utils/newfile.py'
After this, the files in the frozen module become inaccessible: ImportError: no module named 'utils.oldfile'
Only new file 'newfile.py' is accessible.
Even if i delete all the files from this folder, but leave the folder to exist, they remain inaccessible.
If i delete the folder with the name of the frozen module, then everything returns to its place.
I think this is bad behavior. I think new files should coexist and work together with frozen ones. Until I write a file with the exact same name of an already frozen file in this module into this folder. Just like overwriting a file.
In other words, now if i create folder with name of forzened module, i turn off the frozened module with this name.