freezing modules...

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Post Reply
cyberlab
Posts: 42
Joined: Sat Apr 21, 2018 5:02 am

freezing modules...

Post by cyberlab » Mon Nov 05, 2018 4:47 am

hello to all, finally I managed to freeze my modules, before freezing them my application ran with import my_module
my_module
in main.py I thought that after freezing the modules I would work in the same way but it does not work, my_module is really the main application and it calls other modules, can someone explain how an application would work after freezing the custom modules?

User avatar
pythoncoder
Posts: 3137
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: freezing modules...

Post by pythoncoder » Mon Nov 05, 2018 6:07 am

I think you need to provide a clearer explanation about what goes wrong: what error message is produced? If you have successfully frozen my_module you should be able to issue

Code: Select all

import my module
my_module.run()  # Or however you start it
at the REPL. It can import other modules, either frozen or in the filesystem in the path.

You cannot freeze main.py.
Peter Hinch

cyberlab
Posts: 42
Joined: Sat Apr 21, 2018 5:02 am

Re: freezing modules...

Post by cyberlab » Mon Nov 05, 2018 11:45 pm

Thanks for answering Pythoncoder, the application did not work because I forgot a file, it's already working, thanks,
A couple of questions, I followed the instructions of this address https://www.youtube.com/watch?v=jG7WBY_vmpE, I did not use a virtual machine but I did a new installation of ubuntu, almost all the steps were completed as in the video, only the step of: make axtls did not do it as such in the video, I got a message: nothing to do with axtls.
In any case I followed the following steps and I managed to freeze my modules, apparently they all work well.
what is it or does it do: make axtls?

User avatar
pythoncoder
Posts: 3137
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: freezing modules...

Post by pythoncoder » Tue Nov 06, 2018 7:18 am

AXTLS provides transport layer security formerly known as SSL. I think the build process was changed recently so that an explicit make axtls is no longer required. If you look at the output when you create your ESP8266 build you will see that AXTLS is incorporated:

Code: Select all

...
CC ../../lib/axtls/ssl/asn1.c
CC ../../lib/axtls/ssl/loader.c
CC ../../lib/axtls/ssl/tls1.c
CC ../../lib/axtls/ssl/tls1_svr.c
CC ../../lib/axtls/ssl/tls1_clnt.c
CC ../../lib/axtls/ssl/x509.c
CC ../../lib/axtls/crypto/aes.c
CC ../../lib/axtls/crypto/bigint.c
CC ../../lib/axtls/crypto/crypto_misc.c
CC ../../lib/axtls/crypto/hmac.c
CC ../../lib/axtls/crypto/md5.c
CC ../../lib/axtls/crypto/rsa.c
CC ../../lib/axtls/crypto/sha1.c
...
Peter Hinch

cyberlab
Posts: 42
Joined: Sat Apr 21, 2018 5:02 am

Re: freezing modules...

Post by cyberlab » Wed Nov 07, 2018 3:37 am

hello pythoncoder, I think if it is not necessary anymore because my build works perfectly, but if for some reason I want to do a rebuild after a make clean, it is not possible for me, what I do is delete the micropython folder and start again, that way the build is done successfully.
again a question how can I change the ip by default: 192.168.4.1?
Thank you for your time answering, greetings.

profra
Posts: 39
Joined: Sat Jan 03, 2015 12:23 am

Re: freezing modules...

Post by profra » Wed Nov 07, 2018 9:44 am

@pythoncoder I'm a little confused because on the official page https://github.com/micropython/micropyt ... ts/esp8266 is still written...

$ cd ports/esp8266
$ make axtls
$ make

... It might be good to fix it, at least for people who do not have so much knowledge of all processes around MP.

Post Reply