Need help: How to build a "Release" version

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
Mike Teachman
Posts: 27
Joined: Mon Jun 13, 2016 3:19 pm
Location: Victoria, BC, Canada

Need help: How to build a "Release" version

Post by Mike Teachman » Wed Jun 13, 2018 6:27 pm

I'm trying to figure out how the binary Released versions of MicroPython are built (e.g. esp8266-20180511-v1.9.4)

Why? The stable Release versions of MicroPython support more modules than the nightly builds (and my local build). For example, the Release of v1.9.4 includes the following modules, that are not in the nightly builds (or my local build):

example_pub_butt
example_sub_led
http_client
http_client_ssl
http_server
http_server_ssl
ssd1306
uasyncio/__init__
uasyncio/core
umqtt/robust
umqtt/simple
upysh
urequests
urllib/urequest


Does anyone know of documentation or Makefiles describing how the binary for a Released build is created.

Any help is greatly appreciated !

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

Re: Need help: How to build a "Release" version

Post by pythoncoder » Thu Jun 14, 2018 6:28 am

One solution is to clone micropython-lib, then put symlinks to the necessary libraries in your modules directory. I do this, but I appreciate it doesn't answer your question. Rather it answers the question "How can I incorporate libraries in a way that uses the latest MicroPython and micropython-lib code?".

You may well have your reasons for wanting to use a release build. Perhaps some Git guru will come forward with information on pulling a tagged version.
Peter Hinch

User avatar
Mike Teachman
Posts: 27
Joined: Mon Jun 13, 2016 3:19 pm
Location: Victoria, BC, Canada

Re: Need help: How to build a "Release" version

Post by Mike Teachman » Thu Jun 14, 2018 1:58 pm

I've never tried the symbolic link approach to including modules from micropython-lib. Very powerful. Thanks for taking the time to describe it.

A lot of my question is based on curiousity. I've wondered where the config files are stored that control the content of the release builds. Right now I find the MicroPython release build content a bit of a mystery. I wish it was more transparent and documented.

There is one practical example for needing the release config files on github - I want to submit a pull request to get the MQTT package supported on the ESP32 released builds. But, if there isn't any configuration file on github I don't see how it will be possible to submit a pull request.

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

Re: Need help: How to build a "Release" version

Post by pythoncoder » Fri Jun 15, 2018 6:32 am

I see the problem but alas I don't know the answer. If nobody turns up a solution here you might raise an RFC issue on GitHub.

Are you aware that you can specify FROZEN_MPY_DIR=$DIRECTORY in a build script? This is extremely powerful. You write a build script for each project. Projects have their own modules directory, each with symlinks to their required libraries.

There are some examples of build scripts here. The Pyboard one also saves errors by checking and adapting for the Pyboard variant at runtime.
Peter Hinch

User avatar
Mike Teachman
Posts: 27
Joined: Mon Jun 13, 2016 3:19 pm
Location: Victoria, BC, Canada

Re: Need help: How to build a "Release" version

Post by Mike Teachman » Tue Jun 19, 2018 3:14 am

That's new to me as well. I tried it out with "make FROZEN_MPY_DIR=$DIRECTORY". A good technique to easily create custom binaries with a unique sets of modules. Thanks for taking the time to share this!

Post Reply