Search found 10 matches
- Tue Sep 08, 2020 11:39 am
- Forum: Other Boards
- Topic: [Windows] New frozen module not present in executable
- Replies: 13
- Views: 6050
Re: [Windows] New frozen module not present in executable
"mypackage.__file__" says "mypackage.py". I am not sure whether this points to a frozen (baked) module or a local module. But I copied my new micropython.exe to a virtual machine running an empty Windows and it ran there, with the same symptoms: importing from the REPL works but importing from a scr...
- Tue Sep 08, 2020 9:35 am
- Forum: Other Boards
- Topic: [Windows] New frozen module not present in executable
- Replies: 13
- Views: 6050
Re: [Windows] New frozen module not present in executable
Hm, looks like I "cheered too soon" as we say. I can execute the generated micropython.exe and run something like: MicroPython v1.13-70-g7c1511b1d-dirty on 2020-09-08 (fork); win32 version Use Ctrl-D to exit, Ctrl-E for paste mode >>> import mypackage >>> led = mypackage.MyClass() >>> However , if I...
- Tue Sep 08, 2020 7:09 am
- Forum: Other Boards
- Topic: [Windows] New frozen module not present in executable
- Replies: 13
- Views: 6050
Re: [Windows] New frozen module not present in executable
I got it working! Thank you for your help, jimmo The problem from my last post relates to the first, I changed "#define MICROPY_OPT_CACHE_MAP_LOOKUP_IN_BYTECODE (0)" in 'mpconfigport.h' and now just simply changed it back. For completeness: The new Makefile: include ../../py/mkenv.mk -include mpconf...
- Tue Sep 08, 2020 6:56 am
- Forum: Other Boards
- Topic: [Windows] New frozen module not present in executable
- Replies: 13
- Views: 6050
Re: [Windows] New frozen module not present in executable
I only added the line: FROZEN_MANIFEST ?= manifest.py After including your bit into the Makefile too I get the bytecode error again: MPY mypackage.py GEN build/frozen_content.c CC build/frozen_content.c build/frozen_content.c:21:2: error: #error "incompatible MICROPY_OPT_CACHE_MAP_LOOKUP_IN_BYTECODE...
- Mon Sep 07, 2020 6:34 am
- Forum: Other Boards
- Topic: [Windows] New frozen module not present in executable
- Replies: 13
- Views: 6050
Re: [Windows] New frozen module not present in executable
So the Windows port as it is in the repository does not support the frozen modules as there is no manifest.py. I added it and updated the Makefile with the frozen modules line. In my version if I introduce a syntax error in manifest.py the build fails: Traceback (most recent call last): File "../../...
- Fri Sep 04, 2020 9:04 am
- Forum: Other Boards
- Topic: [Windows] New frozen module not present in executable
- Replies: 13
- Views: 6050
Re: [Windows] New frozen module not present in executable
If I try the same on the unix port (from inside the Linux subsystem) the new package does work. This port already as a manifest.py, so I just added a line pointing to "ports/windows/modules/python/mypackage.py". After compiling and running I can run "import mypackage" with no problems.
- Fri Sep 04, 2020 9:01 am
- Forum: Other Boards
- Topic: [Windows] New frozen module not present in executable
- Replies: 13
- Views: 6050
[Windows] New frozen module not present in executable
Following up https://forum.micropython.org/viewtopic.php?f=12&t=8224 I am trying to add a new module to the executable. I added the file "ports/windows/manifest.py" with the content: freeze('$(MPY_DIR)/ports/windows/modules/python', 'mypackage.py') And of course I created "ports/windows/modules/pyth...
- Fri Sep 04, 2020 6:53 am
- Forum: Other Boards
- Topic: [Windows / Linux] Error: 'module' object has no attribute 'Pin'
- Replies: 5
- Views: 3051
Re: [Windows / Linux] Error: 'module' object has no attribute 'Pin'
Sorry for reviving this thread, I somehow completely missed the last reply. With a 'dry implementation' I mean just class stubs, so empty definitions that don't do anything, but at least allow the code to run. But yes, something like that link would be good. Only how do I compile that class into my ...
- Sun Apr 26, 2020 5:22 pm
- Forum: Other Boards
- Topic: [Windows / Linux] Error: 'module' object has no attribute 'Pin'
- Replies: 5
- Views: 3051
Re: [Windows / Linux] Error: 'module' object has no attribute 'Pin'
Thank you for your replies.
I figured al the in-out related functions were already faked. I guess there is only the 'plain' Micro-Python executable then.
No such 'dry' implementations exist already?
I figured al the in-out related functions were already faked. I guess there is only the 'plain' Micro-Python executable then.
No such 'dry' implementations exist already?
- Sat Apr 25, 2020 4:37 pm
- Forum: Other Boards
- Topic: [Windows / Linux] Error: 'module' object has no attribute 'Pin'
- Replies: 5
- Views: 3051
[Windows / Linux] Error: 'module' object has no attribute 'Pin'
I want to develop Micro-Python for my microcontroller and figured it could be useful to be able to run it locally (i.e. on my PC) too. So I built Micro-Python for Windows (https://github.com/micropython/micropython/tree/master/ports/windows) using Microsoft Visual Studio 2019, which was successful. ...