ssd1306.mpy frozen? Y/N

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Post Reply
User avatar
MrWheeliebin
Posts: 3
Joined: Fri Apr 14, 2017 7:42 pm
Location: Wheeliebinland, UK

ssd1306.mpy frozen? Y/N

Post by MrWheeliebin » Fri Sep 15, 2017 3:07 pm

Very quick yes/no question:

Is the above module currently frozen into the latest release for ESP8266 board build? I.e. by default is it compiled into the upython installation?

It seems to import without being added but I'm not sure if this is from a previous install (I did erase but I'm not sure if that flattens all the flash).

It would be good for me if it is in there by default but I'm surprised as surely it uses space even if I'm not using it and not everyone has one of these devices. Perhaps it isn't considered too big an overhead.

MrW.

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

Re: ssd1306.mpy frozen? Y/N

Post by pythoncoder » Sat Sep 16, 2017 5:11 am

If you installed a release build and can import it after a flash erase it must be a part of the build. A flash erase does just that - erases everything including the filesystem, which is re-created on the first boot. So there is no possibility of a hangover from previous work.

Frozen modules use flash space but use zero RAM until you import them. The flash space used for firmware and frozen modules is defined in the build configuration, so even if you compiled a build without that module you would gain nothing in RAM or filesystem space. You could in principle gain filesystem space by removing unused modules from the modules directory, adjusting the partitioning between filesystem and firmware and recompiling but unless your filesystem is nearly full I wouldn't bother.
Peter Hinch
Index to my micropython libraries.

User avatar
MrWheeliebin
Posts: 3
Joined: Fri Apr 14, 2017 7:42 pm
Location: Wheeliebinland, UK

Re: ssd1306.mpy frozen? Y/N

Post by MrWheeliebin » Fri Sep 22, 2017 1:16 pm

Thanks pythoncoder.
In the end I erased and reinstalled and it still seemed to be there. So I guess it is a built in library. I assume then that it is commonly used by the community. Which is good because I am one of those now. :-D

Happy to have my little web-server now display messages POSTed to it now.

Post Reply