I need to load a Python module in a Wemos ESP8266 wi-fi board with 4kB of Flash. The module in question is Tronpy. I'm facing some memory allocation errors and, reading https://docs.micropython.org/en/latest/ ... kages.html, I understood that I should compile my module into bytecode. Such procedure would shrink the module size, making it easier to fit inside my device. I understand that, in order to do that, I need mpy-cross and the ESP8266 port.
I downloaded the micropython-1.17 source code from Github and I'm following the instructions on the README files. I understood that the first thing I should do was to compile mpy-cross. So I entered the comands:
Code: Select all
cd mpy-cross/
make
My next step was to compile ports/esp8266. According to the README.md file in such directory, the recomnended approach was to use a docker image. On the root directory of the project, I entered the following commands:
Code: Select all
docker run --rm -v $HOME:$HOME -u $UID -w $PWD larsks/esp-open-sdk make -C ports/esp8266 submodules
Code: Select all
make: Entering directory '/home/gscofano/Documentos/dev/micropython/micropython-1.17_2/ports/esp8266'
make: stat: Makefile: Permission denied
make: *** No rule to make target 'submodules'. Stop.
make: Leaving directory '/home/gscofano/Documentos/dev/micropython/micropython-1.17_2/ports/esp8266'
Code: Select all
docker run hello-world
I belive I followed all the instructions on the README files correctly. What could I possibly be missing? Is there any easier way to load a module in Micropython?
Thank you very much in advance.