How to do... frozen modules in WSL
Posted: Tue Jul 25, 2017 4:41 pm
Being on vacation and having plenty of free time, fast WiFi and notebook with W10 I have decided to install Bash Shell and the whole toolchain for building of MicroPythone (my Linux machine is sleeping at home). Success!!! I have taken also one Feather HUZZAH with and the result is fully functional MicroPython on esp8266.
But I found new problems I had not solved yet... frozen modules.
a/ My first naive idea was to put my_module.py in the directory "micropython/esp8266/modules/" and start building... unfortunately, no my_module.mpy in the directory "micropython\esp8266\build\frozen_mpy"... I went through the MicroPython Forum but I haven't found anywhere clear description "step by step" how to organize "things" to build the image including also my modules.
b/ The second problem was that I wanted to use mpy-cross to compile my_module.py into my_module.mpy. I did it exactly according to the instructions...
... but I get always the same output OSError: 2 (i.e. /* No such file or directory */), even though the blink.py file is in the directory as mpy-cross (the same for ./blink.py).
I would like to ask for advice (point a/ and b/) anybody who has better knowledge and experience than me. Thank you very much in advance.
But I found new problems I had not solved yet... frozen modules.
a/ My first naive idea was to put my_module.py in the directory "micropython/esp8266/modules/" and start building... unfortunately, no my_module.mpy in the directory "micropython\esp8266\build\frozen_mpy"... I went through the MicroPython Forum but I haven't found anywhere clear description "step by step" how to organize "things" to build the image including also my modules.
b/ The second problem was that I wanted to use mpy-cross to compile my_module.py into my_module.mpy. I did it exactly according to the instructions...
Code: Select all
fp@FP_Z30B10V:~/github/micropython/mpy-cross$ ./mpy-cross blink.py
OSError: 2
I would like to ask for advice (point a/ and b/) anybody who has better knowledge and experience than me. Thank you very much in advance.