mpremote + mip: does not create MPY files #10398
Replies: 2 comments 4 replies
-
Just had a look in the mpremote code, it does just download files, so that means mpy files have to be hosted on the web site. Since each micropython version comes with its own mpy-cross (because bytecode seems to change from time-to-time) - how is that handled? How about adding on the fly compile to mpremote/mip version? |
Beta Was this translation helpful? Give feedback.
-
@jimmo, @ricksorensen thanks for your reply. I did afraid so. Anyway since the target generates the bytecode in RAM, I wonder if there could be a method to get the bytecode buffer and write it to a file on the target. Another idea is to extend the mpremote-mip by a "download" option, then run mpy-cross, then use mpremote-push to install the files. Hosting the mpy-files on the server is i.m.h.o sub-optimal, since one have to keep a bunch of precompiled modules dependent on the version of the bytecode for each version of the source code. I will dig in the code of mpremote-mip first, since this my preferred use case and will comeback to here if I have a working solution. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello community,
at first I want to express that I appreciate the recently started mpremote/mip concept.
This will shorten the time for publishing, deploying and testing of code amazingly. (My recent approach of running upip on the target was working but was always a bit fragile, due to establishing Wifi connection on almost empty ESP and messing around with credentials).
Here is now my question:
Just with my first trial I found that no MPY Files are created. I have done this steps:
package.json
and started a local fileserver in the directory of the package file:python3 -m http.server 8080
mpremote u0 mip install http://localhost:8080
in a second terminal.That json-file looks ok, because the module get installed correctly, but as source code not as mpy-files.
The
logging
module I used for testing was installed as expected as mpy file.Does It mean that I have to provide the mpy-files on the server?
I was hoping that the mip compiles the PY files directly while downloading.
Any explanation is appreciated, thanks, Axel.
Beta Was this translation helpful? Give feedback.
All reactions